public ActionResult Edit(SellingDetailViewModel model)
 {
     if (ModelState.IsValid)
     {
         Responses responses = SellingDetailRepo.Update(model);
         if (responses.Success)
         {
             return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
         }
         else
         {
             return(Json(new { success = false, message = "Error msg" }, JsonRequestBehavior.AllowGet));
         }
     }
     return(Json(new { success = false, message = "Invalid" }, JsonRequestBehavior.AllowGet));
 }
Beispiel #2
0
 // PUT api/<controller>/5
 public Responses Put(int id, [FromBody] SellingDetailViewModel entity)
 {
     entity.Id = id;
     return(SellingDetailRepo.Update(entity));
 }
Beispiel #3
0
 // POST api/<controller>
 public Responses Post([FromBody] SellingDetailViewModel entity)
 {
     return(SellingDetailRepo.Update(entity));
 }