public dynamic Update(OtherExpense model) { try { if (!AuthenticationModel.IsAllowed("Edit", Core.Constants.Constant.MenuName.OtherExpense, Core.Constants.Constant.MenuGroupName.Setting)) { Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "You are Not Allowed to Edit record"); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } var data = _otherExpenseService.GetObjectById(model.Id); //data.SalaryItemId = model.SalaryItemId; data.Code = model.Code; data.Name = model.Name; data.Description = model.Description; data.SalaryStatus = model.SalaryStatus; model = _otherExpenseService.UpdateObject(data, _salaryItemService); } catch (Exception ex) { LOG.Error("Update Failed", ex); Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "Error " + ex); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } return(Json(new { model.Errors })); }