public ActionResult Edit(SalaryDefaultValueViewModel model)
        {
            Responses responses = SalaryDefaultValueRepo.Update(model);

            if (responses.Success)
            {
                return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { success = false, message = responses.Message }, JsonRequestBehavior.AllowGet));
            }
        }
 public ActionResult Edit(SalaryDefaultValueViewModel model)
 {
     if (ModelState.IsValid)
     {
         Responses responses = SalaryDefaultValueRepo.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));
 }
 // PUT api/<controller>/5
 public Responses Put(int id, [FromBody] SalaryDefaultValueViewModel entity)
 {
     entity.Id = id;
     return(SalaryDefaultValueRepo.Update(entity));
 }
 // POST api/<controller>
 public Responses Post([FromBody] SalaryDefaultValueViewModel entity)
 {
     return(SalaryDefaultValueRepo.Update(entity));
 }