Exemplo n.º 1
0
        public ActionResult GetGrid(Pagination pagination, string keyword)
        {
            var data = new
            {
                rows    = roleApp.GetList(keyword, pagination),
                total   = pagination.total,
                page    = pagination.page,
                records = pagination.records
            };

            return(Content(data.ToJson()));
        }
Exemplo n.º 2
0
        public ActionResult GetGridJson(string keyword, Pagination pagination)
        {
            var data            = roleApp.GetList(keyword, pagination);
            var accountTypeList = accountTypeApp.GetAccountTypeList();

            foreach (var item in data)
            {
                var temp = accountTypeList.Find(x => x.ID == item.AccountTypeID);
                if (temp != null)
                {
                    item.AccountTypeID = temp.TypeName;
                }
            }
            return(Content(data.ToJson()));
        }
Exemplo n.º 3
0
        // GET: SchoolManage/Role
        public ActionResult GetTreeSelectJson()
        {
            var list = roleApp.GetList();

            list = list.Where(x => x.AccountTypeID == AccountType).ToList();
            return(Content(list.ToJson()));
        }
Exemplo n.º 4
0
        public ActionResult GetGridJson(Pagination pagination, string keyword)
        {
            var watch    = Common.TimerStart();
            var data     = roleApp.GetList(pagination, keyword);
            var jsondata = new
            {
                rows     = data,
                total    = pagination.total,
                page     = pagination.page,
                records  = pagination.records,
                costtime = Common.TimerEnd(watch)
            };

            return(ToJsonResult(jsondata));
        }
Exemplo n.º 5
0
        private object GetRoleList()
        {
            var data = roleApp.GetList();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            foreach (RoleEntity item in data)
            {
                var fieldItem = new
                {
                    encode   = item.F_EnCode,
                    fullname = item.F_FullName
                };
                dictionary.Add(item.F_Id, fieldItem);
            }
            return(dictionary);
        }
        private object GetRoleList()
        {
            RoleApp roleApp = new RoleApp();
            var     data    = roleApp.GetList();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            foreach (SysRole item in data)
            {
                var fieldItem = new
                {
                    encode   = item.FEnCode,
                    fullname = item.FFullName
                };
                dictionary.Add(item.FId, fieldItem);
            }
            return(dictionary);
        }
Exemplo n.º 7
0
        private object GetRoleList()
        {
            RoleApp roleApp = new RoleApp();
            var     data    = roleApp.GetList();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            foreach (Sys_Role item in data)
            {
                var fieldItem = new
                {
                    encode   = item.F_EnCode,
                    fullname = item.F_FullName
                };
                dictionary.Add(item.F_Id, fieldItem);
            }
            Common.BIBasicList["role"] = dictionary;
            return(dictionary);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 绑定角色
        /// </summary>
        /// <param name="Value"></param>
        /// <param name="IsDefault"></param>
        public void BindRoleId(string Value, bool IsDefault = false)
        {
            List <SelectListItem> list = new List <SelectListItem>();

            if (IsDefault)
            {
                list.Add(new SelectListItem()
                {
                    Value = "", Text = "请选择"
                });
            }
            var data = roleApp.GetList();

            foreach (RoleEntity item in data)
            {
                list.Add(new SelectListItem()
                {
                    Value = item.F_Id, Text = item.F_FullName
                });
            }
            ViewBag.F_RoleId = new SelectList(list, "Value", "Text", Value);
        }
Exemplo n.º 9
0
        public ActionResult GetGridJson(string keyword)
        {
            var data = roleApp.GetList(keyword);

            return(Content(data.ToJson()));
        }
Exemplo n.º 10
0
        public async Task <ActionResult> GetGridJson(string keyword)
        {
            var data = await roleApp.GetList(keyword);

            return(Content(data.ToJson()));
        }
Exemplo n.º 11
0
        public ActionResult GetGridJson(string keyword)
        {
            var data = roleApp.GetList(keyword, OperatorProvider.Provider.GetCurrent().CompanyId);

            return(Content(data.ToJson()));
        }
Exemplo n.º 12
0
        public ActionResult GetGridJson(string keyword)
        {
            var data = roleApp.GetList(keyword).Where(d => d.F_Id != "F0A2B36F-35A7-4660-B46C-D4AB796591EB").ToList();

            return(Content(data.ToJson()));
        }