示例#1
0
        private void MyBind()
        {
            DataTable dt = new DataTable();

            if (!string.IsNullOrEmpty(KeyWord))
            {
                dt = upBll.SelByCompany(compID, KeyWord);
            }
            else if (!string.IsNullOrEmpty(GroupID))
            {
                switch (GroupID)
                {
                default:
                    M_Plat_Group gpMod = gpBll.SelReturnModel(Convert.ToInt32(GroupID));
                    break;
                }
                dt = upBll.SelByGroup(compID, Convert.ToInt32(GroupID));
            }
            else
            {
                dt = upBll.SelByCompany(compID);
            }
            //----视图过滤
            if (!string.IsNullOrEmpty(FilterID))
            {
                dt.DefaultView.RowFilter = "UserID Not in(" + FilterID + ")";
                dt = dt.DefaultView.ToTable();
            }
            RPT.DataSource = dt;
            RPT.DataBind();
            ScriptManager.RegisterStartupScript(UserDiv, UserDiv.GetType(), "Event", "EventBind();", true);
        }
 //public string GetUserFace()
 //{
 //    string ids = string.IsNullOrEmpty(ids_Hid.Value.Trim(',')) ? "0" : ids_Hid.Value.Trim(',');
 //    string result = "";
 //    if (!string.IsNullOrEmpty(ids))
 //    {
 //        DataTable dt = GetUserDT();
 //        dt.DefaultView.RowFilter = "UserID IN(" + ids + ")";
 //        foreach (DataRow dr in dt.DefaultView.ToTable().Rows)
 //        {
 //            result += "<li title='" + dr["TrueName"] + "' class='likeids_li'><a href='javascript:;'><img class='imgface_mid' src='" + dr["UserFace"] + "' onerror=\"this.src='/Images/userface/noface.png';\"/></a></li>";
 //        }
 //    }
 //    return result;
 //}
 public DataTable GetUserDT()
 {
     if (Session["Plat_Default_UserFace"] == null)
     {
         Session["Plat_Default_UserFace"] = upBll.SelByCompany(B_User_Plat.GetLogin().CompID);
     }
     return(Session["Plat_Default_UserFace"] as DataTable);
 }
 private void MyBind()
 {
     //未关联部门的用户
     upMod          = B_User_Plat.GetLogin();
     UserDT         = upBll.SelByCompany(upMod.CompID);
     RPT.DataSource = GetGroupDT();
     RPT.DataBind();
     System.Web.UI.HtmlControls.HtmlGenericControl usercount_sp = new System.Web.UI.HtmlControls.HtmlGenericControl();
     usercount_sp.InnerHtml = UserDT.Rows.Count.ToString();
 }
        private void MyBind()
        {
            DataTable dt = upBll.SelByCompany(B_User_Plat.GetLogin().CompID);

            if (!string.IsNullOrEmpty(SearchKey))
            {
                string key = "'%" + SearchKey + "%'";
                dt.DefaultView.RowFilter = "UserName like " + key + "Or GroupName like " + key;
                dt = dt.DefaultView.ToTable();
            }
            EGV.DataSource = dt;
            EGV.DataBind();
        }
示例#5
0
        public void MyBind(string search = "")
        {
            int       compid = B_User_Plat.GetLogin().CompID;
            DataTable dt     = upBll.SelByCompany(compid);

            EGV.DataSource = dt;
            string wherestr = "1=1";

            if (!string.IsNullOrEmpty(search.Trim()))
            {
                wherestr += " AND UserName LIKE '%" + search + "%'";
            }
            dt.DefaultView.RowFilter = wherestr;
            EGV.DataBind();
        }
示例#6
0
        public PartialViewResult Users()
        {
            //未关联部门的用户
            DataTable UserDT = upBll.SelByCompany(upMod.CompID);

            DataTable gpdt = DBCenter.SelWithField("ZL_Plat_Group", "ID,GroupName,MemberIDS", "1=0");
            DataTable dt   = DBCenter.SelWithField("ZL_Plat_Group", "ID,GroupName,MemberIDS");
            DataRow   dr   = gpdt.NewRow();

            dr["ID"]        = 0;
            dr["GroupName"] = "未关联部门用户";
            gpdt.Rows.Add(dr);
            gpdt.Merge(dt);
            ViewBag.UserDT = UserDT;
            return(PartialView(gpdt));
        }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_Plat_Comp compMod = compBll.SelReturnModel(Mid);
         M_UserInfo  mu      = buser.SelReturnModel(compMod.CreateUser);
         CompName_L.Text   = compMod.CompName;
         CDate_L.Text      = compMod.CreateTime.ToString("yyyy-MM-dd");
         CUserName_L.Text  = B_User.GetUserName(mu.HoneyName, mu.UserName);
         CUserEmail_L.Text = mu.Email;
         DataTable dt = upBll.SelByCompany(compMod.ID);
         dt.DefaultView.RowFilter = "UserID<>'" + mu.UserID + "'";
         RPT.DataSource           = dt;
         RPT.DataBind();
     }
 }
        //加载能力中心用户
        public void LoadPlatUser()
        {
            //暂时禁用分页
            if (PIndex > 1)
            {
                return;
            }
            M_User_Plat platmu = B_User_Plat.GetLogin();
            DataTable   dt     = new DataTable();

            if (GroupID > 0)//按部门查询
            {
                dt = platBll.SelByGroup(platmu.CompID, GroupID);
            }
            else
            {
                dt = platBll.SelByCompany(platmu.CompID, PreValue);
            }
            UserPlat_RPT.DataSource = dt;
            UserPlat_RPT.DataBind();
        }
示例#9
0
        public void MyBind()
        {
            //后期将其分离
            M_OnlineUser user = chatBll.GetLogin();

            if (user != null)
            {
                UserName_L.Text = user.UserName; UserID_Hid.Value = user.UserID;
            }
            if (!string.IsNullOrEmpty(Login))
            {
                function.Script(this, "VisitorToLogin('用户" + DateTime.Now.ToString("yyyyMMddHHmmss") + "','" + Request["idflag"] + "');");
            }
            else if (user == null)
            {
                function.Script(this, "ShowModal();");
            }

            if (!string.IsNullOrEmpty(UserFlag))
            {
                M_OnlineUser mu = chatBll.GetModelByUid(UserFlag);
                //function.WriteErrMsg(mu.UserID+":"+mu.UserName);
                function.Script(this, "ChangeTalker('" + mu.UserID + "','" + mu.UserName + "','" + mu.UserFace + "');");
            }
            else if (UserID > 0)
            {
                M_UserInfo mu = buser.GetSelect(UserID);
                function.Script(this, "ChangeTalker('" + mu.UserID + "','" + mu.UserName + "','" + mu.UserFace + "');");
            }
            if (buser.CheckLogin())
            {
                DataTable dt = friendBll.SelMyFriend(Convert.ToInt32(user.UserID));
                Friend_RPT.DataSource = dt;
                Friend_RPT.DataBind();
                if (dt == null)
                {
                    Friend_Num.Text = "0";
                }
                else
                {
                    Friend_Num.Text = dt.Rows.Count.ToString();
                    function.Script(this, "InitUserList(" + JsonHelper.JsonSerialDataTable(dt) + ");");
                }
            }
            //用于显示欢迎信息
            if (CodeID > 0)
            {
                M_Temp tempMod = tempBll.SelReturnModel(CodeID);
                if (tempMod != null && tempMod.UseType == 12)
                {
                    Wel_Hid.Value = tempMod.Str2;
                    function.Script(this, "ShowWel('" + tempMod.Str1 + "');");
                }
            }
            //-----------------------------------
            //if (badmin.CheckLogin())
            //{
            //    visitor_ul.Visible = true;
            //    List<M_OnlineUser> list = chatBll.GetOnlineVisitor();
            //    Y_RPT.DataSource = list;
            //    Y_RPT.DataBind();
            //    Unum_L.Text = list.Count.ToString();
            //    M_AdminInfo adminmod=badmin.GetAdminLogin();
            //    DataTable dt = SeatBll.SelBySUid(adminmod.AdminId);
            //    function.Script(this, "SetMyInfo('" + adminmod.AdminId + "','" + adminmod.AdminName + "','" + dt.Rows[0]["S_ImgUrl"] + "');BeginInit();");
            //}
            //else
            {
                //DataTable dt = SeatBll.Select_All();
                //DataTable dt = UserDT;
                //dt.DefaultView.RowFilter = "Status=0";
                //dt = dt.DefaultView.ToTable();
                B_User_Plat upBll = new B_User_Plat();
                DataTable   dt    = upBll.SelByCompany(B_User_Plat.GetLogin().CompID);
                Customs_RPT.DataSource = dt;
                Customs_RPT.DataBind();
            }
            if (user != null)
            {
                function.Script(this, "SetMyInfo('" + user.UserID + "','" + user.UserName + "','" + user.UserFace + "');BeginInit();");
            }
        }
示例#10
0
 private void MyBind(string key = "")
 {
     EGV.DataSource = upBll.SelByCompany(CompID, key);
     EGV.DataBind();
 }