public ActionResult SpotterPaymentNew(string SubMenuId) { #region Check UserGroup when user direct key in URL if (!(_clsGlobal.CheckUserGroup(((ClaimsIdentity)User.Identity).FindFirst("UserGroupCode").Value, Convert.ToInt16(SubMenuId)))) { ViewData["Message"] = "You Have No Access Rights For This Module!, error: Invalid Access Rights"; } #endregion Check UserGroup when user direct key in URL var vm = new SpotterFeeViewModel(); var outstandingSpotterFee = new List <OutstandingSpotterFeeViewModel>(); outstandingSpotterFee = _clsPayment.FnRetrieveOutstandingSpotterFee(DateTime.Now.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture)); System.Web.HttpContext.Current.Session.Add("OutstandingFee", outstandingSpotterFee); return(View(vm)); }
public ActionResult ApprovalView(string SubMenuId) { #region Check UserGroup when user direct key in URL if (!(_clsGlobal.CheckUserGroup(((ClaimsIdentity)User.Identity).FindFirst("UserGroupCode").Value, Convert.ToInt16(SubMenuId)))) { ViewData["Message"] = "You Have No Access Rights For This Module!, error: Invalid Access Rights"; } #endregion Check UserGroup when user direct key in URL PendingApprovalViewModel vm = new PendingApprovalViewModel(); string AssignedTo = _clsApproval.GetCurrentAssignToCode(User.Identity.Name); string BatchNo = String.Empty; vm = _clsApproval.GetApproval(AssignedTo, BatchNo, "", "", "", "IsPending"); vm.ApprovalPage = "IsPending"; return(View(vm)); }
public ActionResult PropertyNew(string SubMenuId) { #region Check UserGroup when user direct key in URL if (!(_clsGlobal.CheckUserGroup(((ClaimsIdentity)User.Identity).FindFirst("UserGroupCode").Value, Convert.ToInt16(SubMenuId)))) { ViewData["Message"] = "You Have No Access Rights For This Module!, error: Invalid Access Rights"; } #endregion Check UserGroup when user direct key in URL var model = new SecurityPropertyViewModel(); SelectList lstType = new SelectList(_clsGlobal.GetListOfValue("PROPERTY_TYPE_LEVEL1", "", "O", "", ""), "Value", "Text"); ViewBag.PropertyTypeLevel1 = lstType; lstType = new SelectList(_clsGlobal.GetListOfValue("PROPERTY_TYPE_LEVEL2", "", "O", "", ""), "Value", "Text"); ViewBag.PropertyTypeLevel2 = lstType; ViewData["IsNew"] = true; return(View(model)); }
// GET: LEFSInterestCode public ActionResult LEFSInterestCodeNew(string SubMenuId, int?InterestCodeId, bool IsEnable = true) { Session.Clear(); var db = new MainDbContext(); ViewBag.IsPrePostContrat = 0; LEFSInterestCodeViewModel obj = new LEFSInterestCodeViewModel(); #region Check Whether LEFS Interest Code in active Pre/Posted contract. If yes, not allowed to modify. if (InterestCodeId > 0) { obj = _clsLEFSInterestCode.GetLEFSInterestCodeById(InterestCodeId); if (obj != null) { var contractQuery = (from pre in db.PreContract_Master select new { pre.LEFSInterestCode, pre.Status } ).Where(x => x.LEFSInterestCode != null && x.Status != null && x.Status.ToLower() != "x") .Union (from post in db.Contract_Master select new { post.LEFSInterestCode, post.Status }).Where(x => x.LEFSInterestCode != null && x.Status != null && x.Status.ToLower() != "x"); int count = contractQuery.Where(x => x.LEFSInterestCode.ToLower().Equals(obj.InterestCode.ToLower())).Count(); ViewBag.IsPrePostContrat = count; TempData.Keep("SubMenuId"); } } else { #region Check UserGroup when user direct key in URL if (!(_clsGlobal.CheckUserGroup(((ClaimsIdentity)User.Identity).FindFirst("UserGroupCode").Value, Convert.ToInt16(SubMenuId)))) { ViewData["Message"] = "You Have No Access Rights For This Module!, error: Invalid Access Rights"; } #endregion Check UserGroup when user direct key in URL } #endregion List <SelectListItem> lstInterestType = _clsGlobal.GetListOfValue("LEFS_INTEREST_TYPE", "", "O", "", ""); ViewData["getType"] = lstInterestType; var lstContractType = _clsGlobal.GetListOfValue("SUB_CONTRACT_TYPE", "CT-1004", "O", "", ""); ViewData["getContract"] = lstContractType; List <SelectListItem> lstStatus = _clsGlobal.GetListOfValue("GENERAL_STATUS", "", "", "", ""); ViewData["status"] = lstStatus; List <SelectListItem> lstRepaymentPeriod = new List <SelectListItem>(); lstRepaymentPeriod.Add(new SelectListItem { Text = "--Select--", Value = "" }); for (int i = 1; i <= 20; i++) { lstRepaymentPeriod.Add(new SelectListItem { Text = i.ToString(), Value = i.ToString() }); } ViewBag.RepaymentPeriodFrom = new SelectList(lstRepaymentPeriod, "Value", "Text", obj.RepaymentPeriodFrom); ViewBag.RepaymentPeriodTo = new SelectList(lstRepaymentPeriod, "Value", "Text", obj.RepaymentPeriodTo); ViewBag.IsEnable = IsEnable; return(View(obj)); }