예제 #1
0
 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);
 }
예제 #2
0
        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, ", "));
        }
예제 #3
0
        /* 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);
        }
예제 #4
0
        /* METHODS ********************************************************************************************************************************************/

        public void setViewBag(string FILTER_Keyword)
        {
            ViewBag.FILTER_Keyword = FILTER_Keyword;
            LessonPackagesController.setDropDownListViewBag(this);
            LanguagesController.setDropDownListViewBag(this);
        }