Esempio n. 1
0
 public void GetPic()
 {
     string _id = Parameters["pid"];
     SysMember item = new SysMember();
     SysMemberBiz biz = new SysMemberBiz();
     item = biz.Select(_id);
     if (item == null)
     {
         Response.Write("../../images/defphoto.png");
     }
     else
     {
         Response.Write(item.FPicPathStr);
     }
 }
Esempio n. 2
0
 public void GetGridData()
 {
     string _searchcontent = "";
     string _sortname = "";
     string _sortdirection = "";
     string _pagenumber = "";
     string _pagesize = "";
     string _deptid = "";
     _searchcontent = Parameters["psearchcontent"];
     _sortname = Parameters["psortname"];
     _deptid = Parameters["pdeptid"];
     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<SysMember> lists = new List<SysMember>();
     SysMemberBiz biz = new SysMemberBiz();
     string _searchtext = _searchcontent;
     string wheresql = "";
     if (string.IsNullOrEmpty(_deptid) || _deptid == "0")
     {
         if (userid != "1")
         {
             SysUserDeptsBiz udbiz = new SysUserDeptsBiz();
             string deptidlist = udbiz.GetUserDeptList(userid);
             if (string.IsNullOrEmpty(deptidlist))
             {
                 wheresql = "(FDepartmentId in (0))";
             }
             else
             {
                 wheresql = "(FDepartmentId in (" + deptidlist + "))";
             }
         }
         else
         {
             wheresql = "1=1";
         }
     }
     else
     {
         wheresql = "(FDepartmentId = " + _deptid + ")";
     }
     if (!string.IsNullOrEmpty(_searchtext))
     {
         wheresql = " and ((FMemberName like '%" + _searchtext + "%') or (FMemberCode like '%" + _searchtext + "%'))";
     }
     NameValueCollection where = new NameValueCollection();
     where.Add("condition", wheresql);
     NameValueCollection orderby = new NameValueCollection();
     orderby.Add(_sortname, _sortdirection);
     Int32 totalcount = 0;
     lists = biz.Select(where, orderby, Convert.ToInt32(sPageIndex), Convert.ToInt32(sPageSize), out totalcount);
     string datasource = Utils.GetRepeaterDatasource(lists, sPageIndex, sPageSize, totalcount);
     Response.Write(datasource);
 }
Esempio n. 3
0
 public void GetItem()
 {
     string _id = Parameters["pid"];
     SysMember item = new SysMember();
     SysMemberBiz biz = new SysMemberBiz();
     item = biz.Select(_id);
     if (item == null)
     {
         Response.Write("");
     }
     else
     {
         Response.Write(item.ToJson());
     }
 }