コード例 #1
0
        public ActionResult DictionaryEdit(long id)
        {
            EditDictionary editDictionary = new EditDictionary();

            editDictionary.BaseDictionary = BaseService.GetDictionaryById(id);
            editDictionary.ValueTypes     = EnumTools.GetEnumDescriptions <ValueTypeEnum>();
            return(View(editDictionary));
        }
コード例 #2
0
        public ActionResult ManagerEdit(long id)
        {
            PageManager pageManager = new PageManager();

            pageManager.BaseDictionaries = BaseService.GetBaseDictionaries(ValueTypeEnum.Language);
            pageManager.ManagerTypes     = EnumTools.GetEnumDescriptions <ManagerTypeEnum>();
            pageManager.ManagerBase      = ManageService.GetManagerById(id);
            if (CurrentManager.ManagerType == ManagerTypeEnum.Common)
            {
                pageManager.ManagerTypes.Remove(ManagerTypeEnum.Super);
            }
            return(View(pageManager));
        }
コード例 #3
0
        public ActionResult DictionaryList()
        {
            PageDictionary pageModel = new PageDictionary();
            ValueTypeEnum  valueType = ValueTypeEnum.Language;

            if (!string.IsNullOrEmpty(Request["valueType"]))
            {
                valueType = (ValueTypeEnum)short.Parse(Request["valueType"].ToString());
            }
            ViewBag.ValueType          = valueType;
            pageModel.BaseDictionaries = BaseService.GetBaseDictionaries(valueType);
            pageModel.ValueTypes       = EnumTools.GetEnumDescriptions <ValueTypeEnum>();
            return(View(pageModel));
        }
コード例 #4
0
        public ActionResult ManagerList()
        {
            int pageIndex = 1;
            int pageSize  = 10;

            if (!string.IsNullOrEmpty(Request["pageIndex"]))
            {
                int.TryParse(Request["pageIndex"].ToString(), out pageIndex);
            }

            if (!string.IsNullOrEmpty(Request["pageSize"]))
            {
                int.TryParse(Request["pageSize"].ToString(), out pageSize);
            }

            ViewBag.ManagerTypes = EnumTools.GetEnumDescriptions <ManagerTypeEnum>();
            ManagerTypeEnum managerType = CurrentManager.ManagerType;

            if (!string.IsNullOrEmpty(Request["managerType"]))
            {
                managerType = (ManagerTypeEnum)short.Parse(Request["managerType"].ToString());
            }
            ViewBag.CurrentManagerType = managerType;
            ViewBag.CurrentManager     = CurrentManager;
            PageModel <Manager> pageModel = null;

            if (CurrentManager.ManagerType == ManagerTypeEnum.Common)
            {
                pageModel = ManageService.GetManagerPages(pageIndex, pageSize, CurrentManager.Id);
            }
            else
            {
                pageModel = ManageService.GetManagerPages(managerType, pageIndex, pageSize, CurrentManager.ParentId);
            }
            return(View(pageModel));
        }
コード例 #5
0
        public ActionResult DictionaryAdd()
        {
            Dictionary <ValueTypeEnum, string> dictionary = EnumTools.GetEnumDescriptions <ValueTypeEnum>();

            return(View(dictionary));
        }