public PartialViewResult GetCashAndEquivalentCompany(bool IsView, string SecurityId) { CashEquivalentModel model = new CashEquivalentModel(); SelectList guaranteeBondsType = new SelectList(_clsGlobal.GetListOfValue("CASH_EQUIVALENT_GUARANTEE_BONDS_TYPE", "", "O", "", ""), "Value", "Text"); ViewBag.GuaranteeBondsTypeList = guaranteeBondsType; SelectList address = new SelectList(new List <AddressViewModel>(), "AddressId", "Address"); SelectList departmentList = new SelectList(new List <DepartmentViewModel>(), "cd_ref_num", "cd_dept_desc"); SelectList contact = new SelectList(new List <ContactPersonModel>(), "Value", "Contact"); SelectList lstStatus = new SelectList(_clsGlobal.GetListOfValue("SECURITY_ITEM_STATUS", "", "O", "", ""), "Value", "Text"); ViewBag.StatusList = lstStatus; if (!string.IsNullOrEmpty(SecurityId)) { model = _clsSecurity.GetCashAndEquivalentCompanyDetails(SecurityId); if (model != null) { if (model.BillToModel != null) { address = new SelectList(_clsCRM.getAddress(model.BillToModel.Customer, "Customer"), "AddressId", "Address"); departmentList = new SelectList(_clsCRM.getDepartmentList(model.BillToModel.Address), "cd_ref_num", "cd_dept_desc"); contact = new SelectList(_clsCRM.getContactPerson(model.BillToModel.Department), "Value", "Contact"); model.BillToModel.ROCUEN = _clsCRM.getRocUenType(model.BillToModel.Customer); } } } ViewBag.AddressList = address; ViewBag.DepartmentList = departmentList; ViewBag.Contact = contact; ViewBag.Viewable = IsView; return(PartialView("_CashAndEquivalentCompanyPartial", model)); }
public ActionResult CashAndEquivalentCompanyNew(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 CashEquivalentModel model = new CashEquivalentModel(); SelectList guaranteeBondsType = new SelectList(_clsGlobal.GetListOfValue("CASH_EQUIVALENT_GUARANTEE_BONDS_TYPE", "", "O", "", ""), "Value", "Text"); ViewBag.GuaranteeBondsType = guaranteeBondsType; SelectList address = new SelectList(new List <AddressViewModel>(), "AddressId", "Address"); ViewBag.Address = address; SelectList departmentList = new SelectList(new List <DepartmentViewModel>(), "cd_ref_num", "cd_dept_desc"); ViewBag.DepartmentList = departmentList; SelectList contact = new SelectList(new List <ContactPersonModel>(), "Value", "Contact"); ViewBag.Contact = contact; ViewData["IsNew"] = true; return(View(model)); }