diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index ecbb2e6a..ac0cbc1e 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -827,6 +827,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -924,6 +927,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1094,6 +1100,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1207,6 +1216,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1318,6 +1330,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1429,6 +1444,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1540,6 +1558,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1651,6 +1672,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1762,6 +1786,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers 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 ", "")); @@ -1888,6 +1915,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers }).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 ", ""));