private void AddSysNodes() { DataView dvRight = new Epoint.Frame.Webbuilder.Bizlogic.Site.DB_Site_Right().SelectAll(); dvRight.RowFilter = "SiteGuid='" + this.SiteGuid + "' and AllowTo='All' and AllowType='Role'"; if (FC.GetDetail("ConsultMainSite").ConfigValue == "1" || dvRight.Count > 0) { DataView dv = ous.Select(""); EpointTreeNode node; int HasChildOu = 0; for (int i = 0; i < dv.Count; i++) { node = new EpointTreeNode(); node.Text = dv[i]["OUName"].ToString(); node.Value = dv[i]["OUGuid"].ToString(); HasChildOu = Epoint.Common.Functions.IntNull(Convert.ToString(dv[i]["HasChildOu"])); if (HasChildOu > 0) { node.PopulateOnDemand = true; node.RunClickEvtOnInit = false; //是否在生成checkbox的时候运行click事件 node.ExpandOnCheckedChanged = false; //是否在checkbox变化的时候自动展开 } node.ShowInputCtrl = true; node.CtrlClickFunction = "AutoSetOuValue(this,'" + node.Text + "','" + node.Value + "');"; TreeView1.Nodes.Add(node); } } else { DataView dv = new Epoint.WebbuilderInfo.Bizlogic.UserManage.DB_Frame_SiteOU().SelectSiteOU(this.SiteGuid); EpointTreeNode node; int HasChildOu = 0; for (int i = 0; i < dv.Count; i++) { node = new EpointTreeNode(); node.Text = dv[i]["OUName"].ToString(); node.Value = dv[i]["OUGuid"].ToString(); HasChildOu = Epoint.Common.Functions.IntNull(Convert.ToString(dv[i]["HasChildOu"])); if (HasChildOu > 0) { node.PopulateOnDemand = true; node.RunClickEvtOnInit = false; //是否在生成checkbox的时候运行click事件 node.ExpandOnCheckedChanged = false; //是否在checkbox变化的时候自动展开 } node.ShowInputCtrl = true; node.CtrlClickFunction = "AutoSetOuValue(this,'" + node.Text + "','" + node.Value + "');"; TreeView1.Nodes.Add(node); } } }
private void AddSysNodes() { DataView dvRight = new Epoint.Frame.Webbuilder.Bizlogic.Site.DB_Site_Right().SelectAll(); dvRight.RowFilter = "SiteGuid='" + this.SiteGuid + "' and AllowTo='All' and AllowType='Role'"; if (FC.GetDetail("ConsultMainSite").ConfigValue == "1" || dvRight.Count > 0) { DataView dv = ous.Select(""); EpointTreeNode node; int HasChildOu = 0; for (int i = 0; i < dv.Count; i++) { node = new EpointTreeNode(); node.Text = dv[i]["OUName"].ToString(); node.Value = dv[i]["OUGuid"].ToString(); HasChildOu = Epoint.Common.Functions.IntNull(Convert.ToString(dv[i]["HasChildOu"])); if (HasChildOu > 0) { node.PopulateOnDemand = true; node.RunClickEvtOnInit = false;//�Ƿ�������checkbox��ʱ������click�¼� node.ExpandOnCheckedChanged = false;//�Ƿ���checkbox�仯��ʱ���Զ�չ�� } node.ShowInputCtrl = true; node.CtrlClickFunction = "AutoSetOuValue(this,'" + node.Text + "','" + node.Value + "');"; TreeView1.Nodes.Add(node); } } else { DataView dv = new Epoint.WebbuilderInfo.Bizlogic.UserManage.DB_Frame_SiteOU().SelectSiteOU(this.SiteGuid); EpointTreeNode node; int HasChildOu = 0; for (int i = 0; i < dv.Count; i++) { node = new EpointTreeNode(); node.Text = dv[i]["OUName"].ToString(); node.Value = dv[i]["OUGuid"].ToString(); HasChildOu = Epoint.Common.Functions.IntNull(Convert.ToString(dv[i]["HasChildOu"])); if (HasChildOu > 0) { node.PopulateOnDemand = true; node.RunClickEvtOnInit = false;//�Ƿ�������checkbox��ʱ������click�¼� node.ExpandOnCheckedChanged = false;//�Ƿ���checkbox�仯��ʱ���Զ�չ�� } node.ShowInputCtrl = true; node.CtrlClickFunction = "AutoSetOuValue(this,'" + node.Text + "','" + node.Value + "');"; TreeView1.Nodes.Add(node); } } }
private void AddSysNodes() { DataView dvRight = new Epoint.Frame.Webbuilder.Bizlogic.Site.DB_Site_Right().SelectAll(); dvRight.RowFilter = "SiteGuid='" + this.SiteGuid + "' and AllowTo='All' and AllowType='Role'"; if (FC.GetDetail("ConsultMainSite").ConfigValue == "1" || dvRight.Count > 0) { DataView dv = ous.Select(""); EpointTreeNode node; int HasChildOu = 0, HasChildUser = 0; for (int i = 0; i < dv.Count; i++) { node = new EpointTreeNode(); node.Text = dv[i]["OUName"].ToString(); node.Value = dv[i]["OUGuid"].ToString(); HasChildOu = Epoint.Common.Functions.IntNull(Convert.ToString(dv[i]["HasChildOu"])); HasChildUser = Epoint.Common.Functions.IntNull(Convert.ToString(dv[i]["HasChildUser"])); if (HasChildOu + HasChildUser > 0) { node.PopulateOnDemand = true; node.CtrlClickFunction = "AutoSetPValue_OuGuid(this,'" + node.Value + "')"; } node.ShowInputCtrl = true; TreeView1.Nodes.Add(node); } } else { DataView dv = new Epoint.WebbuilderInfo.Bizlogic.UserManage.DB_Frame_SiteUser().SelectSiteUser(this.SiteGuid, ""); EpointTreeNode node; for (int i = 0; i < dv.Count; i++) { node = new EpointTreeNode(); node.Text = dv[i]["displayname"].ToString(); node.Value = dv[i]["UserGuid"].ToString(); node.CtrlClickFunction = "AutoSetUserValue(this,'" + node.Text + "','" + node.Value + "');"; node.ImageUrl = "../../Images/TreeImages/person.gif"; node.RunClickEvtOnInit = true;//是否在生成checkbox的时候运行click事件 node.PopulateOnDemand = false; node.ShowInputCtrl = true; TreeView1.Nodes.Add(node); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ///ע������ͼƬĿ¼��ͼƬ��Ԭѫ��÷��ѩ��Ϊ TreeView1.ImgFolds = "../../Images/TreeImages"; TreeView1.Target = "main1"; DataView dvRight = new Epoint.Frame.Webbuilder.Bizlogic.Site.DB_Site_Right().SelectAll(); dvRight.RowFilter = "SiteGuid='" + this.SiteGuid + "' and AllowTo='All' and AllowType='Role'"; if (FC.GetDetail("ConsultMainSite").ConfigValue == "1" || dvRight.Count > 0) { TreeView1.RootNodeText = "�����û�"; } else { TreeView1.RootNodeText = "��վ���û�"; } AddSysNodes(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ///注意设置图片目录,图片以袁勋的梅花雪树为准 TreeView1.ImgFolds = "../../Images/TreeImages"; TreeView1.Target = "main1"; DataView dvRight = new Epoint.Frame.Webbuilder.Bizlogic.Site.DB_Site_Right().SelectAll(); dvRight.RowFilter = "SiteGuid='" + this.SiteGuid + "' and AllowTo='All' and AllowType='Role'"; if (FC.GetDetail("ConsultMainSite").ConfigValue == "1" || dvRight.Count > 0) { TreeView1.RootNodeText = "所有用户"; } else { TreeView1.RootNodeText = "本站点用户"; } AddSysNodes(); } }