private void setViewBag(SettingsModel model) { ViewBag.ResetPassword = model.ResetPassword; ViewBag.PettyCashRecordsCategories = new SelectList(db.PettyCashRecordsCategories.OrderBy(x => x.Name).ToList(), PettyCashRecordsCategoriesModel.COL_Id.Name, UserAccountRolesModel.COL_Name.Name); UserAccountRolesController.setDropDownListViewBag(this); LessonPackagesController.setDropDownListViewBag(this); }
private string append <T>(string log, string value, string delimiter) { if (typeof(T) == typeof(UserAccountRolesModel)) { value = db.UserAccountRoles.Where(x => x.Id.ToString() == value).FirstOrDefault().Name; } else if (typeof(T) == typeof(LessonPackagesModel)) { value = LessonPackagesController.get(new Guid(value)).Name; } return(Util.append(log, value, ", ")); }
/* METHODS ********************************************************************************************************************************************/ public void setViewBag(string FILTER_Keyword, string FILTER_PaymentNo, int?FILTER_Cancelled, int?FILTER_Approved, int?FILTER_HasDueAmount, bool?FILTER_chkDateFrom, DateTime?FILTER_DateFrom, bool?FILTER_chkDateTo, DateTime?FILTER_DateTo) { ViewBag.FILTER_Keyword = FILTER_Keyword; ViewBag.FILTER_Cancelled = FILTER_Cancelled; ViewBag.FILTER_Approved = FILTER_Approved; ViewBag.FILTER_HasDueAmount = FILTER_HasDueAmount; ViewBag.FILTER_chkDateFrom = FILTER_chkDateFrom; ViewBag.FILTER_DateFrom = FILTER_DateFrom; ViewBag.FILTER_chkDateTo = FILTER_chkDateTo; ViewBag.FILTER_DateTo = FILTER_DateTo; ViewBag.FILTER_PaymentNo = FILTER_PaymentNo; LessonPackagesController.setDropDownListViewBag(this); LessonPackagesController.setViewBag(this); ProductsController.setDropDownListViewBag(this, ProductsModel.COL_DDLDescription.Name, 1, 1); ProductsController.setViewBag(this); ServicesController.setDropDownListViewBag(this); ServicesController.setViewBag(this); VouchersController.setDropDownListViewBag(this); VouchersController.setViewBag(this); }
/* METHODS ********************************************************************************************************************************************/ public void setViewBag(string FILTER_Keyword) { ViewBag.FILTER_Keyword = FILTER_Keyword; LessonPackagesController.setDropDownListViewBag(this); LanguagesController.setDropDownListViewBag(this); }