示例#1
0
 public void GetData()
 {
     string _userid = Parameters["puserid"];
     SysUserBiz biz = new SysUserBiz();
     SysUser item = new SysUser();
     item = biz.Select(_userid);
     Response.Write(item.ToJson());
 }
示例#2
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<SysUser> lists = new List<SysUser>();
     SysUserBiz biz = new SysUserBiz();
     string _searchtext = _searchcontent;
     string wheresql = "1=1";
     if (string.IsNullOrEmpty(_searchtext))
     {
         wheresql = "(FUserId <> 1)";
     }
     else
     {
         wheresql = "(FUserId <> 1) and ((FUserName like '%" + _searchtext + "%') or (FUserDesc 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);
 }