示例#1
0
        private void GetLUTTables(XCollection <LookupTable> lookupTables)
        {
            foreach (LookupTable table in lookupTables)
            {
                cmbbxResult.Items.Add(new LUTWrapper(table));
            }

            string dbcnn = Program.GWDataDBConnection;

            if (dbcnn != null && dbcnn.Length > 0)
            {
                LutMgt   mgt     = new LutMgt(new DataBase(dbcnn));
                string[] lutList = mgt.GetLutNames();
                if (lutList != null)
                {
                    foreach (string lut in lutList)
                    {
                        bool hasAdded = false;
                        foreach (LookupTable table in lookupTables)
                        {
                            if (table.TableName == lut)
                            {
                                hasAdded = true;
                                break;
                            }
                        }
                        if (!hasAdded)
                        {
                            cmbbxResult.Items.Add(new LUTWrapper(lut));
                        }
                    }
                }
            }
        }
示例#2
0
        private void GetLUTTables()
        {
            string dbcnn = Program.GWDataDBConnection;

            if (dbcnn != null && dbcnn.Length > 0)
            {
                LutMgt   mgt     = new LutMgt(new DataBase(dbcnn));
                string[] lutList = mgt.GetLutNames();
                if (lutList != null)
                {
                    foreach (string lut in lutList)
                    {
                        cmbbxResult.Items.Add(lut);
                    }
                }
            }
        }
示例#3
0
        private void RefreshTableList()
        {
            this.listViewLUTList.Items.Clear();

            string[] tableList = mgt.GetLutNames();
            if (tableList == null)
            {
                return;
            }

            foreach (string tname in tableList)
            {
                LUTItemMgt lut = new LUTItemMgt(mgt.DataBase, tname);
                ListViewAddTable(lut);
            }

            if (this.listViewLUTList.Items.Count > 0)
            {
                this.listViewLUTList.Items[0].Selected = true;
            }
        }
示例#4
0
        private void InitializeLUT()
        {
            if (_lutInitialized)
            {
                return;
            }
            _comboLookupTable.Items.Clear();

            _groupGWData.FindForm().Cursor = Cursors.WaitCursor;
            LutMgt mgt = new LutMgt(_dbConnection);

            string[] lutList = mgt.GetLutNames();
            _groupGWData.FindForm().Cursor = Cursors.Default;

            if (lutList == null)
            {
                return;
            }
            _lutInitialized = true;
            foreach (string lut in lutList)
            {
                _comboLookupTable.Items.Add(lut);
            }
        }