public int EditPassengerNWaySale(PassengerNWaySaleModel model)
 {
     Hashtable HT = new Hashtable();
     HT.Add("PassengerNWaySaleID", model.PassengerNWaySaleID);
     HT.Add("PassengerID", model.PassengerID);
     HT.Add("MemberID", model.MemberID);
     HT.Add("Amount", model.Amount);
     HT.Add("SaleDate", model.SaleDate);
     HT.Add("InvoiceNo", model.InvoiceNo);
     int i = dbContext.ExecuteSP("udp_PassengerNWaySale_ups", HT);
     return i;
 }
 //insert customer
 public HttpResponseMessage Post(PassengerNWaySaleModel nwaySale)
 {
     if (ModelState.IsValid)
     {
         db.AddPassengerNWaySale(nwaySale);
         HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, nwaySale);
         response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = nwaySale.PassengerNWaySaleID }));
         return response;
     }
     else
     {
         return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
     }
 }
 //update customer
 public HttpResponseMessage Put(int id, PassengerNWaySaleModel nwaySale)
 {
     if (!ModelState.IsValid)
     {
         return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
     }
     if (id != nwaySale.PassengerNWaySaleID)
     {
         return Request.CreateResponse(HttpStatusCode.BadRequest);
     }
     try
     {
         db.EditPassengerNWaySale(nwaySale);
     }
     catch (DbUpdateConcurrencyException ex)
     {
         return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
     }
     return Request.CreateResponse(HttpStatusCode.OK);
 }