public ActionResult DictionaryEdit(long id) { EditDictionary editDictionary = new EditDictionary(); editDictionary.BaseDictionary = BaseService.GetDictionaryById(id); editDictionary.ValueTypes = EnumTools.GetEnumDescriptions <ValueTypeEnum>(); return(View(editDictionary)); }
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)); }
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)); }
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)); }
public ActionResult DictionaryAdd() { Dictionary <ValueTypeEnum, string> dictionary = EnumTools.GetEnumDescriptions <ValueTypeEnum>(); return(View(dictionary)); }