From 692acf831aa8edd744b3aa978191d8e7f60de044 Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 20 Dec 2024 12:00:41 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=AD?= =?UTF-8?q?=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=87=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DisciplineResultController.cs | 44 +++++-------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index ac0cbc1e..36028d83 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -823,13 +823,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, isGovernment = false, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -923,13 +921,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, isGovernment = false, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1095,14 +1091,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - isGovernment = false + isGovernment = false, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1211,14 +1205,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - isGovernment = false + isGovernment = false, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1326,13 +1318,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1440,13 +1430,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1554,13 +1542,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1668,13 +1654,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1782,13 +1766,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1912,12 +1894,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers amount = r.amount, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, + profileType = p.profileType, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - if(data.profileType =="EMPLOYEE"){ - apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; - } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));