예제 #1
0
        /// <summary>
        /// 动作设定
        /// </summary>
        public ActionResult ActionSetting()
        {
            ActionSettingModel model = new ActionSettingModel();
            var areaList             = AreaBLL.GetAreas();

            model.AreasSelectList = areaList.ToSelectListWithAll(m => GetSelectListItem(m.ID, m.AreaName));

            var ctrList = ControllerBLL.GetControllers();

            model.ControllersSelectList = ctrList.ToSelectListWithAll(m => GetSelectListItem(m.ID, m.ControllerName));

            model.SearchPage   = 1;
            model.AreaID       = -1;
            model.ControllerID = -1;
            model.PagedDatas   = ActionBLL.GetPagedActions(model, PageSize);

            return(PartialView("_ActionSetting", model));
        }
예제 #2
0
        public ActionResult GetControllerDDLWithDefaultByAreaID(int areaID)
        {
            List <Asiatek.Model.ControllerDDLModel> list;

            if (areaID == -1)
            {
                list = ControllerBLL.GetControllers();
            }
            else
            {
                list = ControllerBLL.GetControllersByAreaID(areaID);
            }
            list.Insert(0, new Model.ControllerDDLModel()
            {
                ID = -1, ControllerName = Asiatek.Resource.UIText.All
            });
            return(Json(list, JsonRequestBehavior.AllowGet));
        }