Пример #1
0
 public void GetGridData()
 {
     string _searchcontent = "";
     string _sortname = "";
     string _sortdirection = "";
     string _pagenumber = "";
     string _pagesize = "";
     _searchcontent = Parameters["psearchcontent"];
     _sortname = Parameters["psortname"];
     if (!string.IsNullOrEmpty(_sortname))
     {
         sSortName = _sortname;
     }
     _sortdirection = Parameters["psortdirection"];
     if (!string.IsNullOrEmpty(_sortdirection))
     {
         sSortDirection = _sortdirection;
     }
     _pagenumber = Parameters["ppagenumber"];
     if (!string.IsNullOrEmpty(_pagenumber))
     {
         sPageIndex = Convert.ToInt32(_pagenumber);
     }
     _pagesize = Parameters["ppagesize"];
     if (!string.IsNullOrEmpty(_pagesize))
     {
         sPageSize = Convert.ToInt32(_pagesize);
     }
     List<SysRole> lists = new List<SysRole>();
     SysRoleBiz biz = new SysRoleBiz();
     string _searchtext = _searchcontent;
     string wheresql = "1=1";
     if (!string.IsNullOrEmpty(_searchtext))
     {
         wheresql = "(FRoleName like '%" + _searchtext + "%')";
     }
     Int32 totalcount = 0;
     lists = biz.Select(wheresql, _sortname, _sortdirection, sPageIndex, sPageSize, out totalcount);
     string datasource = Utils.GetRepeaterDatasource(lists, sPageIndex, sPageSize, totalcount);
     Response.Write(datasource);
 }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List<SysRole> rolelist = new List<SysRole>();
            SysRoleBiz rolebiz = new SysRoleBiz();
            rolelist = rolebiz.Select();
            AddDatasource("rolelist", rolelist);

            List<SysDepartment> deptlist = new List<SysDepartment>();
            SysDepartmentBiz deptbiz = new SysDepartmentBiz();
            deptlist = deptbiz.Select();
            AddDatasource("deptlist", deptlist);
        }
Пример #3
0
 public void GetRoleData()
 {
     string _id = Parameters["pid"];
     SysRoleBiz biz = new SysRoleBiz();
     SysRole item = new SysRole();
     item = biz.Select(_id);
     string datasource = Utils.ConvertToJson(item);
     Response.Write(datasource);
 }