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)); } } } } }
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); } } } }
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; } }
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); } }