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 ", ""));