Exemple #1
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);
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hasChild = "{2}<label><input name='nodeChk' type='checkbox' data-name='{1}' value='{0}' onclick='ChkChild(this);'><i class='fa fa-folder' style='color:#337AB7'></i></label><a href='javascript:;' id='a{0}' class='list1' onclick='ShowChild();'><span class='list_span'>{1}</span></a>";
            noChild  = "{2}<label><input name='nodeChk' type='checkbox' data-name='{1}' value='{0}'><i class='fa fa-file-text' style='color:#337AB7'></i></label><a href='javascript:;'>{1}</a>";
            DataTable dt = strBll.Sel();

            NodeHtml_Lit.Text = "<ul class='tvNav list-unstyled'><li><input id='AllCheck' type='checkbox' onclick='checkAll()'><a class='list1' id='a0' href='javascript:;' ><span class='fa fa-list'></span><span class='list_span'>全部部门</span></a>" + B_Node.GetLI(dt, hasChild, noChild) + "</li></ul>";
        }
        protected string GetStruct(string structid)
        {
            DataTable dt = strBll.Sel(DataConverter.CLng(structid));

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["Name"].ToString());
            }
            else
            {
                return("");
            }
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            B_Structure strBll = new B_Structure();
            DataTable   dt     = strBll.Sel();
            //name title className children[]
            M_Struct_Tree pmodel = new M_Struct_Tree();

            try
            {
                DTToJson(pmodel, dt, 0);
                ds_hid.Value = JsonConvert.SerializeObject(pmodel.children[0]);
            }
            catch { ds_hid.Value = "[]"; }
        }
Exemple #5
0
        /*
         * 父页面需要实现三个JS方法,详见示例页
         * 关闭与清空chk方法,必须放在父页面调用,该页面只允许实现,选择会员,并返回Json数据.
         * 清空调用本页ClearChk();
         */
        protected void Page_Load(object sender, EventArgs e)
        {
            if (badmin.CheckLogin() || buser.CheckLogin())
            {
            }
            else
            {
                function.WriteErrMsg("无权访问该页面"); return;
            }
            if (!IsPostBack)
            {
                DataTable dt = struBll.Sel();
                if (dt.Rows.Count < 1)
                {
                    function.WriteErrMsg("尚未指定任何部门"); return;
                }
                FilterID = Request.QueryString["fid"];
                switch (Request.QueryString["type"])
                {
                case "null":
                    Normal_Div.Visible = true;
                    modelHtml.Text     = "<ul id='GroupSel'>" + GetTable(dt, disType.Null) + "</ul>";
                    sureBtn.Visible    = false;
                    break;

                case "AllInfo":
                    AllInfo_Div.Visible = true;
                    AllInfo_Litral.Text = "<ul id='GroupSel'>" + GetTable(dt, disType.AllInfo) + "</ul>";
                    GroupID             = dt.Rows[0]["ID"].ToString();
                    curLabel.Text       = dt.Rows[0]["Name"].ToString();
                    MyBind();
                    break;

                default:
                    Normal_Div.Visible = true;
                    modelHtml.Text     = "<ul id='GroupSel'>" + GetTable(dt, disType.CheckBox) + "</ul>";
                    break;
                }
            }
        }
        protected void BindNode()
        {
            DataTable dt = strBll.Sel();

            nodeHtml.Text = "<ul class='tvNav'><li><a  class='list1' id='a0' href='StructList.aspx' ><span class='list_span'>全部成员</span><span class='fa fa-list'></span></a>" + B_Node.GetLI(dt, hasChild, noChild) + "</li></ul>";
        }
Exemple #7
0
 public void MyBind()
 {
     EGV.DataSource = bll.Sel();
     EGV.DataBind();
 }