// GET: User/EmployeeGrants public ActionResult Index() { ViewBag.EmployeeDebts = employeeDebts; DebtVwViewModel model = new DebtVwViewModel(); DebtVwFilter filter = new DebtVwFilter(); filter.EmployeeId = int.Parse(CurrentUser.UserName); model.List = DebtVwServices.Get(filter, db); return(View(model)); }
/// <summary> /// Returns a list of DebtVw objects /// </summary> /// <returns></returns> public ActionResult Index(DebtVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); ViewBag.EmployeeDepartmentSalaryWorkPlaceId = new SelectList(SalaryWorkPlaceServices.List(db), "Id", "Name"); ViewBag.Issuer = new SelectList(IssuerServices.List(db), "Id", "Name"); if (Model.Filter.HasCriteria) { Model.List = DebtVwServices.Get(Model.Filter, db); } else { Model.List = new List <DebtVw>(); } return(View(Model)); }