private void BindData()
        {
            //分页参数赋值
            Entities.QueryEmployeeSuper query = BLL.Util.BindQuery <Entities.QueryEmployeeSuper>(HttpContext.Current);

            AreaManageConfig config = new AreaManageConfig(HttpContext.Current.Server);
            List <string>    list   = config.GetCurrentUserArea();

            if (list.Count > 0)
            {
                int regionid = 1;
                if (list.Count == 1)
                {
                    if (list[0] == "西安")
                    {
                        regionid = 2;
                    }

                    query.RegionID = regionid;
                }

                query.OnlyCCDepart = false;
                //按条件找人:条件-部门,角色-
                DataTable dt = BLL.EmployeeSuper.Instance.GetEmployeeSuper(query, "", BLL.PageCommon.Instance.PageIndex, pageSize, out RecordCount);

                if (dt != null && dt.Rows.Count > 0)
                {
                    repeaterTableList.DataSource = dt;
                    repeaterTableList.DataBind();
                    litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, RecordCount, pageSize, BLL.PageCommon.Instance.PageIndex, 1);
                }
            }
        }
예제 #2
0
        private void GetGroupByRegionID(out string msg)
        {
            msg = "";
            DataTable dt = null;

            if (!string.IsNullOrEmpty(AreaID))
            {
                dt = BLL.BusinessGroup.Instance.GetBusinessGroupByAreaID(int.Parse(AreaID));
            }
            else
            {
                AreaManageConfig config = new AreaManageConfig(HttpContext.Current.Server);
                List <string>    list   = config.GetCurrentUserArea();

                if (list != null && list.Count > 0)
                {
                    if (list.Count == 1)
                    {
                        int areaId = 1;
                        if (list[0] == "西安")
                        {
                            areaId = 2;
                        }
                        dt = BLL.BusinessGroup.Instance.GetBusinessGroupByAreaID(areaId);
                    }
                    else if (list.Count == 2)
                    {
                        dt = BLL.BusinessGroup.Instance.GetAllBusinessGroup().Select("Status=0").CopyToDataTable();
                    }
                }
            }


            if (dt != null)
            {
                //DataView dv = dt.DefaultView;
                //dv.Sort = "Name ASC";
                //dt = dv.ToTable();
                int i = 0;
                foreach (DataRow dr in dt.Rows)
                {
                    if (i == 0)
                    {
                        msg += "[";
                    }
                    if (i == dt.Rows.Count - 1)
                    {
                        msg += "{BGID:" + dr["BGID"].ToString() + ",Name:'" + dr["Name"].ToString() + "'}]";
                    }
                    else
                    {
                        msg += "{BGID:" + dr["BGID"].ToString() + ",Name:'" + dr["Name"].ToString() + "'},";
                    }
                    i++;
                }
            }
        }