public ActionResult FundPendingApproveBySpoc(FundPendingApprovalViewModel model) { try { if (ModelState.IsValid) { if (model.PersonalRowID > 0 && model.VerificationRowID > 0 && model.CheckFamilyRowID > 0 && model.SubCheckRowID > 0) { model.CheckStatus = "WIP-Pending"; model.ModifiedBy = Convert.ToInt16(Session["TeamMemberRowID"]); model.ModifiedDate = DateTime.Now; repoVerificationInfo.FundPendingChecksUpdateByDepartmentTL(model); #region Check Action History Save clsCommonMethods.AddCheckActionHistory(model.PersonalRowID, model.SubCheckRowID, model.CheckStatus, model.Remarks); #endregion ModelState.Clear(); ViewBag.SuccessMsg = "Record Updated Successfully!"; //TempData["SuccessMsg"] = "Record Updated Successfully!"; //RedirectToAction("ManageFundPendingChecksForDeprtTL"); } else { ViewBag.ErrorMsg = "All fields are mandatory!"; } } else { var query = from state in ModelState.Values from error in state.Errors select error.ErrorMessage; var errorList = query.ToList(); string strError = string.Empty; foreach (string str in errorList) { strError += str + "\n"; } ModelState.AddModelError("", strError); } } catch (Exception Ex) { ViewBag.ErrorMsg = Ex.Message; clsCommonMethods.ErrorLog(Server.MapPath("~\\ErrorLogs\\Logfiles"), Ex.Message, Ex.StackTrace); } return(View(model)); }
public ActionResult FundPendingApproveBySpoc(int PersonalId = 0, int VerId = 0, short chkFmlyId = 0, short SubchkFmlyId = 0) { FundPendingApprovalViewModel model = new FundPendingApprovalViewModel(); try { if (PersonalId > 0 && VerId > 0 && chkFmlyId > 0 && SubchkFmlyId > 0) { model.PersonalRowID = PersonalId; model.VerificationRowID = VerId; model.CheckFamilyRowID = chkFmlyId; model.SubCheckRowID = SubchkFmlyId; } } catch (Exception) { throw; } return(View(model)); }