public void UpdateCustomer(string Customers) { //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.Controller38 o38 = new Controller.Controller38(); Response response = o38.UpdateCustomer(Customers); Context.Response.Clear(); Context.Response.ContentType = "application/json"; Context.Response.Flush(); Context.Response.Write(JsonConvert.SerializeObject(response)); Context.Response.End(); } }
public void getCustomerList(string COMPANY_NAME, string COMPANY_NAME_READING, string BILL_COMPANY_NAME, string COMPANY_NO_BOX, string ACCOUNT_NAME) { //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.Controller38 o38 = new Controller.Controller38(); Response response = o38.GetCustomerList(COMPANY_NAME, COMPANY_NAME_READING, BILL_COMPANY_NAME, COMPANY_NO_BOX, ACCOUNT_NAME); Context.Response.Clear(); Context.Response.ContentType = "application/json"; Context.Response.Flush(); Context.Response.Write(JsonConvert.SerializeObject(response)); Context.Response.End(); } }