public JsonResult SearchOpInsByCodeNo(string CodeNumber) { OperatingInstructionDataAccess obj = new OperatingInstructionDataAccess(); tbl_OperatingInstructions lst = new tbl_OperatingInstructions(); lst = obj.GetOperatingInstructionsbyCode(CodeNumber); if (lst != null) { return(Json(new { result = lst, ErrorMessage = CustomMessages.Success }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { result = lst, ErrorMessage = CustomMessages.NoValueExist }, JsonRequestBehavior.AllowGet)); } }
public JsonResult UpdateOperatingInstruction(string OperatingInstruction, string Code, bool?IsActive) { bool success; OperatingInstructionDataAccess obj = new OperatingInstructionDataAccess(); tbl_OperatingInstructions lst = new tbl_OperatingInstructions(); //ConfigurationVM lst = new ConfigurationVM(); lst.Description = OperatingInstruction; lst.Code = Code; lst.IsActive = IsActive; success = obj.UpdateOperatingInstructions(lst); if (success == true) { return(Json(new { result = success, ErrorMessage = CustomMessages.Success }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { result = success, ErrorMessage = CustomMessages.GenericErrorMessage }, JsonRequestBehavior.AllowGet)); } }