Beispiel #1
0
        protected internal void ShowUCenter(string str)
        {
            this.ToolsMaxCategories = str;
            FPanel_Main.Controls.Clear();
            DataSet ds = db.GetPIVAsDB(Ssql.GetToolsMin(str.Equals("未分组") ? string.Empty : str));

            if (ds != null && ds.Tables.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    UCenterControl uc = new UCenterControl(this, dr[0].ToString());
                    uc.Width = this.Width - FPanel_TreeStrip.Width - 20;
                    FPanel_Main.Controls.Add(uc);
                }
            }
            ds.Dispose();
        }
Beispiel #2
0
        public ToolAdd(UCenterControl uc)
        {
            this.uma = uc.um;
            InitializeComponent();
            DataSet ds = db.GetPIVAsDB("select distinct [ToolsMaxCategories] from [dbo].[Tools]");

            Comb_MaxCategories.Items.Clear();
            Comb_MinCategories.Items.Clear();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                Comb_MaxCategories.Items.Add(dr[0].ToString());
            }
            ds = db.GetPIVAsDB("select distinct [ToolsMinCategories] from [dbo].[Tools]");
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                Comb_MinCategories.Items.Add(dr[0].ToString());
            }
        }