public void UpdateList(string List) { //get Authorization header HttpContext httpContext = HttpContext.Current; string authHeader = httpContext.Request.Headers["Authorization"]; Response auth = Controller.ControllerCheckIn.CheckLogIn_forProcess(authHeader); if (auth.Message != "") { Context.Response.Clear(); Context.Response.ContentType = "application/json"; Context.Response.Flush(); Context.Response.Write(JsonConvert.SerializeObject(auth)); Context.Response.End(); } else { Controller.ControllerUsageChargeMaster usageChargeMasterList = new Controller.ControllerUsageChargeMaster(authHeader); MetaResponse response = usageChargeMasterList.UpdateUsageFeeMasterList(List); Context.Response.Clear(); Context.Response.ContentType = "application/json"; Context.Response.Flush(); Context.Response.Write(JsonConvert.SerializeObject(response)); Context.Response.End(); } }
public void GetUsageChargeMasterList(string CONTRACT_CODE, string CONTRACT_NAME, int OFFSET = 0, int LIMIT = 30) { //get Authorization header HttpContext httpContext = HttpContext.Current; string authHeader = httpContext.Request.Headers["Authorization"]; Response auth = Controller.ControllerCheckIn.CheckLogIn_forProcess(authHeader); if (auth.Message != "") { Context.Response.Clear(); Context.Response.ContentType = "application/json"; Context.Response.Flush(); Context.Response.Write(JsonConvert.SerializeObject(auth)); Context.Response.End(); } else { Controller.ControllerUsageChargeMaster companyList = new Controller.ControllerUsageChargeMaster(); MetaResponse response = companyList.getUsageFeeMasterList(CONTRACT_CODE, CONTRACT_NAME, OFFSET, LIMIT); Context.Response.Clear(); Context.Response.ContentType = "application/json"; Context.Response.Flush(); Context.Response.Write(JsonConvert.SerializeObject(response)); Context.Response.End(); } }