Exemple #1
0
        /// <summary>
        /// 获取列表信息
        /// </summary>
        /// <returns></returns>
        public JsonResult GetIdentityList(DataTableParameter para, string searchValue)
        {
            int total = 0;
            List <MenuAuthManageModel> list = new List <MenuAuthManageModel>();
            var dataList = IdentityDA.GetIdentityList(out total, para, searchValue);

            if (dataList != null)
            {
                for (int index = 0; index < dataList.Count(); index++)
                {
                    MenuAuthManageModel model = new MenuAuthManageModel();
                    var    item      = dataList[index];
                    string strHtml   = "<div class='row'><div class='col-md-8'>{0}</div><div class='col-md-4' style='text-align:right'>{1}</div></div>";
                    string linkAList = "<a class='glyphicon glyphicon-cog configMemuAuth' title='配置'  Id='" + item.ID + "' ></a>";
                    strHtml          = string.Format(strHtml, item.KEYED_NAME, linkAList);
                    model.Id         = item.ID;
                    model.KEYED_NAME = strHtml;
                    model.AuthStr    = "";
                    Item Items = ItemTypeDA.GetMenuAuthByIdentity(inn, item.ID);
                    if (Items.getItemCount() > 0)
                    {
                        for (int i = 0; i < Items.getItemCount(); i++)
                        {
                            Item   obj   = Items.getItemByIndex(i);
                            string lable = obj.getProperty("name");
                            model.AuthStr += lable + ";";
                        }
                    }
                    list.Add(model);
                }
            }


            return(Json(new
            {
                sEcho = para.sEcho,
                iTotalRecords = total,
                iTotalDisplayRecords = total,
                aaData = list
            }, JsonRequestBehavior.AllowGet));
        }