Example #1
0
 /// <summary>
 /// 原因: 自定义单只在InitializeComponent后调用有效,非自定义单只在OnLoaded后调用后有效,所以2个地方都调
 /// </summary>
 private void LoadData()
 {
     //字典信息处理
     if (!DesignMode && this.DataSource == null)
     {
         this.Properties.PopupFormMinSize = new Size(250, 300);
         this.KeyFieldName    = "partCode";
         this.ParentFieldName = "parentCode";
         this.DisplayMember   = "partName";
         this.ValueMember     = "partCode";
         PopTreeColumnCollection cols = new PopTreeColumnCollection();
         cols.Add(new PopupTreeColumn("partCode", "代码", 100));
         cols.Add(new PopupTreeColumn("partName", "部位名称", 150));
         cols.Add(new PopupTreeColumn("pyCode", "拼音码", 0));
         cols.Add(new PopupTreeColumn("wbCode", "五笔码", 0));
         this.Columns = cols;
         //this.SetToGridMode();
     }
 }
Example #2
0
 /// <summary>
 /// 原因: 自定义单只在InitializeComponent后调用有效,非自定义单只在OnLoaded后调用后有效,所以2个地方都调
 /// </summary>
 private void LoadData()
 {
     //字典信息处理
     if (!DesignMode && this.DataSource == null)
     {
         this.Properties.PopupFormMinSize = new Size(450, 350);
         this.KeyFieldName    = "IcdCode";
         this.ParentFieldName = "ParentCode";
         this.DisplayMember   = "IcdName";
         this.ValueMember     = "IcdCode";
         PopTreeColumnCollection cols = new PopTreeColumnCollection();
         cols.Add(new PopupTreeColumn("IcdCode", "ICD码", 200));
         cols.Add(new PopupTreeColumn("IcdName", "中文名称", 250));
         cols.Add(new PopupTreeColumn("PyCode", "拼音码", 0));
         cols.Add(new PopupTreeColumn("WbCode", "五笔码", 0));
         this.Columns    = cols;
         this.DataSource = EntityTools.ConvertToDataTable <EntityIcd>(GlobalDic.DataSourceICD);
     }
 }
Example #3
0
 /// <summary>
 /// 原因: 自定义单只在InitializeComponent后调用有效,非自定义单只在OnLoaded后调用后有效,所以2个地方都调
 /// </summary>
 private void LoadData()
 {
     //字典信息处理
     if (!DesignMode && this.DataSource == null)
     {
         this.Properties.PopupFormMinSize = new Size(250, 300);
         this.KeyFieldName    = "operCode";
         this.ParentFieldName = "";
         this.DisplayMember   = "operName";
         this.ValueMember     = "operName";
         PopTreeColumnCollection cols = new PopTreeColumnCollection();
         cols.Add(new PopupTreeColumn("operCode", "工号", 100));
         cols.Add(new PopupTreeColumn("operName", "姓名", 150));
         cols.Add(new PopupTreeColumn("pyCode", "拼音码", 0));
         cols.Add(new PopupTreeColumn("wbCode", "五笔码", 0));
         this.Columns = cols;
         this.SetToGridMode();
         this.DataSource = EntityTools.ConvertToDataTable <EntityCodeOperator>(GlobalDic.DataSourceEmployee);
     }
 }
Example #4
0
        /// <summary>
        /// 原因: 自定义单只在InitializeComponent后调用有效,非自定义单只在OnLoaded后调用后有效,所以2个地方都调
        /// </summary>
        private void LoadData()
        {
            //字典信息处理
            if (!DesignMode && this.DataSource == null)
            {
                this.Properties.PopupFormMinSize = new Size(250, 300);
                this.KeyFieldName    = "itemcode";
                this.ParentFieldName = "";
                this.DisplayMember   = "itemname";
                this.ValueMember     = "itemname";
                PopTreeColumnCollection cols = new PopTreeColumnCollection();
                cols.Add(new PopupTreeColumn("itemcode", "编号", 0));
                cols.Add(new PopupTreeColumn("itemname", "名称", 200));
                cols.Add(new PopupTreeColumn("pycode", "拼音码", 0));
                cols.Add(new PopupTreeColumn("wbcode", "五笔码", 0));
                this.Columns = cols;
                this.SetToGridMode();

                this.DataSource = this.m_dtGetDataSource();
            }
        }