public HttpResponseMessage DeleteCourier(int PID) { try { int result = new Couriercls().DeleteCourier(PID); if (result == 1) { return(Request.CreateResponse(HttpStatusCode.OK)); } else { return(Request.CreateResponse(HttpStatusCode.NotAcceptable)); } } catch (Exception Ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, Ex.Message)); } }
public HttpResponseMessage UpdateCourier(MisPrty misPrty) { try { int result = new Couriercls().UpdateCourier(misPrty); if (result == 1) { return(Request.CreateResponse(HttpStatusCode.OK, result)); } else { return(Request.CreateResponse(HttpStatusCode.NotModified)); } } catch (Exception Ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, Ex.Message)); } }
public HttpResponseMessage GetCourierById(int PID) { try { var salesCoDt = new Couriercls().GetCourierById(PID); if (salesCoDt != null) { return(Request.CreateResponse(HttpStatusCode.OK, salesCoDt)); } else { return(Request.CreateResponse(HttpStatusCode.NoContent, salesCoDt)); } } catch (Exception Ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, Ex.Message)); } }
public HttpResponseMessage InsertCourier(MisPrty misPrty) { try { int result = new Couriercls().InsertCourier(misPrty); if (result == 1) { return(Request.CreateResponse(HttpStatusCode.OK)); } else { return(Request.CreateResponse(HttpStatusCode.NotAcceptable)); } } catch (Exception Ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, Ex.Message)); } }
public HttpResponseMessage GetCourierGrid() { try { var CourierDt = new Couriercls().GetCourierGrid(); if (CourierDt != null) { return(Request.CreateResponse(HttpStatusCode.OK, CourierDt)); } else { return(Request.CreateResponse(HttpStatusCode.NoContent, CourierDt)); } } catch (Exception Ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, Ex.Message)); } }