public ActionResult Create() { try { Db db = new Db(DbServices.ConnectionString); // For Product //ViewBag.EmployeeList = new SelectList(EmployeeServices.List(db), "Id", "Id_Name"); //Just Show Loan Type ViewBag.ProductTypeList = new SelectList(LoanTypeVwServices.List(db), "ProductTypeId", "ProductTypeName"); // For Request //We need to customise the droplist for two options ViewBag.BypassStatusList = new SelectList(BypassStatusServices.List(db).Where((c => (c.Id == 0 || c.Id == 2))), "Id", "Name"); } catch (CfException cfex) { TempData["Failure"] = cfex.ErrorDefinition.LocalizedMessage; } catch (Exception ex) { TempData["Failure"] = ex.Message; } return(View()); }
private void FormLoanTypeView_Load(object sender, EventArgs e) { if (dataSource == null) { DateTime dt = DateTime.Now; DataSource = LoanTypeVwServices.List(new Db(DbServices.ConnectionString)); slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString(); } }
/// <summary> /// Returns a list of RefundableProductVw objects /// </summary> /// <returns></returns> public ActionResult Index(RefundableProductVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); ViewBag.ProductTypeList = new SelectList(LoanTypeVwServices.List(db), "ProductTypeId", "ProductTypeName"); if (Model.Filter.HasCriteria) { Model.List = RefundableProductVwServices.Get(Model.Filter, db); } else { Model.List = new List <RefundableProductVw>(); } return(View(Model)); }
public ActionResult EmployeeDebts() { try { Db db = new Db(DbServices.ConnectionString); List <ProductType> f = ProductTypeServices.List(db); ViewBag.ProductTypeList = new SelectList(LoanTypeVwServices.List(db), "ProductTypeId", "ProductTypeName"); ViewBag.IssuerList = new SelectList(IssuerServices.List(db), "Id", "Name"); } catch (CfException cfex) { TempData["Failure"] = cfex.ErrorDefinition.LocalizedMessage; } catch (Exception ex) { TempData["Failure"] = ex.Message; } return(View()); }