コード例 #1
0
ファイル: GetOrderSells.ashx.cs プロジェクト: windygu/XiaZhou
        public void ProcessRequest(HttpContext context)
        {
            string q         = Utils.GetQueryStringValue("q");
            string companyID = Utils.GetQueryStringValue("companyID");

            context.Response.ContentType = "text/plain";
            StringBuilder sb = new StringBuilder();

            if (q != "" && companyID != "")
            {
                EyouSoft.Model.ComStructure.MComUserSearch searchModel = new EyouSoft.Model.ComStructure.MComUserSearch();
                //searchModel.UserName = q;
                searchModel.ContactName = q;
                int recordCount = 0;
                IList <EyouSoft.Model.ComStructure.MComUser> userList = new EyouSoft.BLL.ComStructure.BComUser().GetList(1, 10, ref recordCount, companyID, searchModel);
                if (userList != null && userList.Count > 0)
                {
                    for (int i = 0; i < userList.Count; i++)
                    {
                        sb.Append(userList[i].ContactName + "|" + userList[i].UserId + "|" + userList[i].DeptId + "|" + userList[i].DeptName + "\n");
                    }
                }
                else
                {
                    sb.Append("未找到该记录| | |");
                }
            }
            context.Response.Write(sb.ToString());
        }
コード例 #2
0
ファイル: UserList.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 页面初始化
        /// </summary>
        protected void PageInit()
        {
            IList <EyouSoft.Model.ComStructure.MComUser> list = null;
            //部门名称
            string departName = Utils.GetQueryStringValue(BelongDepart.SelectNameClient);
            //部门编号
            int departId = Utils.GetInt(Utils.GetQueryStringValue(BelongDepart.SelectIDClient));

            BelongDepart.SectionID   = departId.ToString();
            BelongDepart.SectionName = departName;
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            EyouSoft.Model.ComStructure.MComUserSearch searchModel = new EyouSoft.Model.ComStructure.MComUserSearch();
            searchModel.ContactName = Utils.GetQueryStringValue("name");
            searchModel.UserName    = Utils.GetQueryStringValue("username");
            searchModel.DeptId      = departId;
            searchModel.DeptName    = departName;
            searchModel.RoleId      = Utils.GetIntNull(Utils.GetQueryStringValue("txtRoleId"));
            if (Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.ComStructure.UserStatus), Utils.GetQueryStringValue("txtStatus")) != null)
            {
                searchModel.UserStatus = (EyouSoft.Model.EnumType.ComStructure.UserStatus?)Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.ComStructure.UserStatus), Utils.GetQueryStringValue("txtStatus"));
            }
            else
            {
                searchModel.UserStatus = EyouSoft.Model.EnumType.ComStructure.UserStatus.正常;
            }

            list = new EyouSoft.BLL.ComStructure.BComUser().GetList(pageIndex, pageSize, ref recordCount, SiteUserInfo.CompanyId, searchModel);
            if (list != null && list.Count > 0)
            {
                this.repList.DataSource = list;
                this.repList.DataBind();
                BindPage();
            }
            else
            {
                ExporPageInfoSelect1.Visible = false;
                this.repList.EmptyText       = "<tr><td colspan=\"12\" align=\"center\">未找到相关记录!</td></tr>";
            }
        }
コード例 #3
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit(string userName)
        {
            //获取分页参数并强转
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"));
            EyouSoft.Model.ComStructure.MComUserSearch searchModel = new EyouSoft.Model.ComStructure.MComUserSearch();
            searchModel.UserName = userName;
            IList <EyouSoft.Model.ComStructure.MComUser> userList = new EyouSoft.BLL.ComStructure.BComUser().GetList(pageIndex, pageSize, ref recordCount, SiteUserInfo.CompanyId, searchModel);

            if (userList != null && userList.Count > 0)
            {
                this.rptList.DataSource = userList;
                this.rptList.DataBind();
                listCount = userList.Count;
            }
            else
            {
                this.lblMsg.Text = "没有相关数据!";
                this.ExporPageInfoSelect1.Visible = false;
            }

            //绑定分页
            BindPage();
        }