public void BindDepartment(IListControlsTreeViewData data, StringCollection depCollection)
 {
     this.txtSubDepartment.DataSource = data.DataSource as System.Data.DataTable;
     this.txtSubDepartment.IDField = data.DataValueField;
     this.txtSubDepartment.PIDField = data.ParentDataValueField;
     this.txtSubDepartment.TitleField = data.DataTextField;
     this.txtSubDepartment.OrderNoField = data.DataTextField;
     this.txtSubDepartment.CheckedValue = depCollection;
     this.txtSubDepartment.BuildTree();
 }
Ejemplo n.º 2
0
 public void BuildDepartmentTreeView(IListControlsTreeViewData data)
 {
     if (data != null)
     {
         this.tvDepartment.DataSource = data.DataSource as System.Data.DataTable;
         this.tvDepartment.IDField = data.DataValueField;
         this.tvDepartment.PIDField = data.ParentDataValueField;
         this.tvDepartment.TitleField = data.DataTextField;
         this.tvDepartment.OrderNoField = data.DataTextField;
         this.tvDepartment.BuildTree();
     }
 }
        /// <summary>
        /// 列表类型控件数据绑定。
        /// </summary>
        /// <param name="dropDownListEx">DropDownListEx。</param>
        /// <param name="listControlsTreeViewDataSource">数据源接口。</param>
        public void ListControlsDataSourceBind(IDataDropDownList dropDownListEx, IListControlsTreeViewData listControlsTreeViewDataSource)
        {
            if (dropDownListEx != null && listControlsTreeViewDataSource != null)
            {
                dropDownListEx.DataTextField = listControlsTreeViewDataSource.DataTextField;
                if (!string.IsNullOrEmpty(listControlsTreeViewDataSource.DataTextFormatString))
                    dropDownListEx.DataTextFormatString = listControlsTreeViewDataSource.DataTextFormatString;
                dropDownListEx.DataValueField = listControlsTreeViewDataSource.DataValueField;
                dropDownListEx.DataValueParentField = listControlsTreeViewDataSource.ParentDataValueField;

                dropDownListEx.DataSource = listControlsTreeViewDataSource.DataSource;
                dropDownListEx.DataBind();
            }
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="data"></param>
 public void BindParentDepartment(IListControlsTreeViewData data)
 {
     this.ListControlsDataSourceBind(this.ddlDepartmentID, data);
 }
 ///// <summary>
 ///// 列表类型控件数据绑定。
 ///// </summary>
 ///// <param name="dropDownListEx">DropDownListEx。</param>
 ///// <param name="listControlsDataSource">数据源接口。</param>
 //public void ListControlsDataSourceBind(IDataDropDownList dropDownListEx, IListControlsData listControlsDataSource)
 //{
 //    if (dropDownListEx != null && listControlsDataSource != null)
 //    {
 //        dropDownListEx.DataTextField = listControlsDataSource.DataTextField;
 //        if (!string.IsNullOrEmpty(listControlsDataSource.DataTextFormatString))
 //            dropDownListEx.DataTextFormatString = listControlsDataSource.DataTextFormatString;
 //        dropDownListEx.DataValueField = listControlsDataSource.DataValueField;
 //        dropDownListEx.DataSource = listControlsDataSource.DataSource;
 //        dropDownListEx.DataBind();
 //    }
 //}
 /// <summary>
 /// 树形控件数据绑定。
 /// </summary>
 /// <param name="treeView">treeView。</param>
 /// <param name="listControlsTreeViewDataSource">数据源接口。</param>
 public void ListControlsDataSourceBind(ITreeView treeView, IListControlsTreeViewData listControlsTreeViewDataSource)
 {
     if (treeView != null && listControlsTreeViewDataSource != null)
     {
         treeView.DataSource = listControlsTreeViewDataSource.DataSource;
         treeView.IDField = listControlsTreeViewDataSource.DataValueField;
         treeView.PIDField = listControlsTreeViewDataSource.ParentDataValueField;
         treeView.TitleField = listControlsTreeViewDataSource.DataTextField;
         treeView.OrderNoField = listControlsTreeViewDataSource.OrderNoField;
         treeView.BuildTree();
     }
 }
Ejemplo n.º 6
0
 public void BindRank(IListControlsTreeViewData data)
 {
     this.ListControlsDataSourceBind(this.ddlRankID, data);
 }