protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable compDT = compBll.Sel();
         if (UserID < 1)
         {
             function.WriteErrMsg("未指定需要操作的用户");
         }
         if (compDT.Rows.Count < 1)
         {
             function.WriteErrMsg("还没有公司数据,请先添加公司");
         }
         M_UserInfo mu = buser.SelReturnModel(UserID);
         UserName_L.Text        = mu.UserName;
         PlatComp_DP.DataSource = compDT;
         PlatComp_DP.DataBind();
         PlatGroup_DP.DataSource = gpBll.SelByCompID(Convert.ToInt32(PlatComp_DP.SelectedValue));
         PlatGroup_DP.DataBind();
         PlatGroup_DP.Items.Insert(0, new ListItem("不分配", ""));
         //---------
         M_User_Plat upMod = upBll.SelReturnModel(UserID);
         if (upMod == null || upMod.CompID < 1)
         {
             PlatInfo_L.Text    = "<span style='color:red;'>该用户尚未加入过能力中心</span>";
             Remove_Btn.Visible = false;
         }
         else
         {
             PlatInfo_L.Text += "<span class='btn btn-default margin_r5'>所属公司:" + (string.IsNullOrEmpty(upMod.CompName) ? "无" : upMod.CompName) + "</span>";
             PlatInfo_L.Text += "<span class='btn btn-default margin_r5'>所属部门:" + (string.IsNullOrEmpty(upMod.GroupName) ? "未分配" : upMod.GroupName) + "</span>";
         }
         Call.HideBread(Master);
     }
 }
Exemplo n.º 2
0
        private void MyBind()
        {
            M_User_Plat upMod = upBll.SelByNameAndPwd(uname, upwd, true);

            if (upMod == null)
            {
                function.WriteErrMsg("您没有权限下载该用户的时间线记录!");
            }
            GroupDT = groupBll.SelByCompID(upMod.CompID);
            int       pageCount = 0;
            DataTable dt        = msgBll.SelByPid(50000, 1, out pageCount, 0, upMod, upMod.Gid, 0, Filter, MsgType, Skey, upMod.UserID.ToString(), DateStr, Mid);

            //-------------------针对时间线进行处理
            if (CPage > 1)
            {
                Page.FindControl("ttitle_div").Visible = false;
            }
            DateTime TimeLine = DateTime.MinValue;

            dt.Columns.Add("timeline", typeof(string));
            foreach (DataRow dr in dt.Rows)
            {
                if (TimeLine == DateTime.MinValue || DateHelper.IsMoreThanOne(TimeLine, Convert.ToDateTime(dr["cdate"])))
                {
                    TimeLine       = Convert.ToDateTime(dr["cdate"]);
                    dr["timeline"] = "date";
                }
                else
                {
                    dr["timeline"] = "time";
                }
            }
            MsgRepeater.DataSource = dt;
            MsgRepeater.DataBind();
        }
Exemplo n.º 3
0
        public void MyBind()
        {
            DataTable dt = new DataTable();

            if (Source.Equals("plat"))//能力中心
            {
                Pid_Field  = "PGroup";
                ID_Field   = "ID";
                Name_Field = "GroupName";
                dt         = pgroupBll.SelByCompID(B_User_Plat.GetLogin().CompID);
                string attlp = "<label style='margin-bottom:0px;'>@groupname<input type='checkbox' name='plat_group_chk' data-gid='@groupid' data-gname='@groupname' style='margin-left:2px;'></label>";
                hasChild_tlp = "";
                childs_tlp   = "<div class='userlist_item group_item' data-gid='@groupid'><div class='item_face pull-left'>@depth<img src='/Images/TreeLineImages/group.gif'></div><div class='pull-left item_name'>" + attlp + "</div><div class='pull-right item_add'><a href='javascript:;' title='查看用户'><i class='fa fa-user' style='font-size:16px;'></i> 查看用户</a></div><div style='clear:both;'></div></div>";
            }
            else if (Source.Equals("oa"))//oa组织结构
            {
                Pid_Field  = "ParentID";
                ID_Field   = "ID";
                Name_Field = "Name";
                dt         = struBll.Sel();
            }
            else
            {
                Pid_Field  = "ParentGroupID";
                ID_Field   = "GroupID";
                Name_Field = "GroupName";
                dt         = groupBll.Select_All();
            }
            Group_Lit.Text = GetAllDT(dt, 0);
        }
Exemplo n.º 4
0
 /*
  * 父页面需要实现三个JS方法,详见示例页
  * 关闭与清空chk方法,必须放在父页面调用,该页面只允许实现,选择会员,并返回Json数据.
  * 清空调用本页ClearChk();
  */
 protected void Page_Load(object sender, EventArgs e)
 {
     upMod = B_User_Plat.GetLogin();
     if ((upMod == null))
     {
         function.WriteErrMsg("无权访问该页面");
     }
     compID = upMod.CompID;
     if (!IsPostBack)
     {
         DataTable dt = gpBll.SelByCompID(compID);
         FilterID            = Request.QueryString["fid"];
         dt                  = dt.DefaultView.ToTable();
         AllInfo_Div.Visible = true;
         //将空的单列一组
         string dli = "<li><a href='javascript:;' onclick='hiddenul(this);FilterTr(0,&quot;全部用户&quot;)'>全部用户</a></li>";
         dli += "<li><a href='javascript:;' onclick='hiddenul(this);FilterTr(-1,&quot;未分组&quot;)'>未分组</a></li>";
         AllInfo_Litral.Text = "<ul id='GroupSel'>" + dli + GetTable(dt, disType.AllInfo) + "</ul>";
         if (dt != null && dt.Rows.Count > 0)
         {
             GroupID = dt.Rows[0]["ID"].ToString();
         }
         MyBind();
     }
 }
        private void MyBind()
        {
            M_User_Plat upMod = B_User_Plat.GetLogin();

            CompName_L.Text = upMod.CompName;
            DataTable dt = gpBll.SelByCompID(B_User_Plat.GetLogin().CompID);

            RPT.DataSource = dt;
            RPT.DataBind();
        }
        private void MyBind()
        {
            M_User_Plat upMod = B_User_Plat.GetLogin();

            GroupDT = groupBll.SelByCompID(upMod.CompID);
            //-----------------权限校验
            if (CurProID > 0)
            {
                if (!proBll.HasAuth(upMod.UserID, CurProID))
                {
                    function.WriteErrMsg("你没有权限访问该项目!!");
                }
            }
            int       pageCount = 0;
            DataTable dt        = msgBll.SelByPid(psize, CPage, out pageCount, 0, upMod, upMod.Gid, CurProID, Filter, MsgType, Skey, Uids, DateStr, Mid);
            //LikesDt
            string msgids = "";

            foreach (DataRow dr in dt.Rows)
            {
                msgids += dr["ID"].ToString().Trim('-') + ",";
            }
            if (!string.IsNullOrEmpty(msgids))
            {
                LikesDt = likeBll.SelByMsgIDS(msgids.Trim(','), "plat");
            }
            if (Filter.Contains("atuser"))//移除@
            {
                upBll.RemoveAtCount(upMod.UserID);
            }
            //-------------------针对时间线进行处理
            if (LView.Equals("timeline") || LView.Equals("tomht"))
            {
                if (CPage > 1)
                {
                    Page.FindControl("ttitle_div").Visible = false;
                }
                DateTime TimeLine = DateTime.MinValue;
                dt.Columns.Add("timeline", typeof(string));
                foreach (DataRow dr in dt.Rows)
                {
                    if (TimeLine == DateTime.MinValue || DateHelper.IsMoreThanOne(TimeLine, Convert.ToDateTime(dr["cdate"])))
                    {
                        TimeLine       = Convert.ToDateTime(dr["cdate"]);
                        dr["timeline"] = "date";
                    }
                    else
                    {
                        dr["timeline"] = "time";
                    }
                }
            }
            MsgRepeater.DataSource = dt;
            MsgRepeater.DataBind();
        }
Exemplo n.º 7
0
        public void MyBind()
        {
            DataTable dt         = gpBll.SelByCompID(B_User_Plat.GetLogin().CompID);
            string    attlp      = "<label style='margin-bottom:0px;'>@groupname<input type='checkbox' name='plat_group_chk' data-gid='@groupid' data-gname='@groupname' style='margin-left:2px;'></label>";
            string    childs_tlp = "<div class='userlist_item group_item' data-gid='@groupid'><div class='pull-left'><i class='fa fa-users' style='color:#03a9f4;margin-right:5px;'></i></div><div class='pull-left item_name'>" + attlp + "</div><div class='pull-right item_add'><a href='javascript:;' title='查看用户'><i class='fa fa-user' style='font-size:16px;'></i> 查看用户</a></div><div style='clear:both;'></div></div>";

            //Group_Lit.Text = GetAllDT(dt, 0);
            foreach (DataRow dr in dt.Rows)
            {
                Group_Lit.Text += TlpReplace(childs_tlp, dr);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Pid < 0)
         {
             function.WriteErrMsg("参数不正确");
         }
         M_User_Plat upMod = B_User_Plat.GetLogin();
         RPT.DataSource = gpBll.SelByCompID(upMod.CompID, Pid);
         RPT.DataBind();
     }
 }