private void button3_Click_1(object sender, EventArgs e) { //Ribbon1 a = new Ribbon1(); prefix = ""; //FilterLog.WriteToLog("Debug Level 1:launch filter management"); managefilters(this.autochoose); this.listBox1.Items.Clear(); lastsimpleidx = 0; // ListSingle = new OleDbCommand(simplewherelessSQL, connection); using (OleDbDataReader calitm = ListSingle.ExecuteReader()) { int i = 0; while (calitm.Read()) { this.listBox1.Items.Add(calitm["[prefix]FilterDescription".Replace("[prefix]", prefix)].ToString()); lastsimpleidx++; } } using (OleDbDataReader calitm = ListMaster.ExecuteReader()) { int i = 0; while (calitm.Read()) { this.listBox1.Items.Add(calitm["[prefix]FilterListDescription".Replace("[prefix]", prefix)].ToString()); } if (this.listBox1.Items.Count > 0) { this.listBox1.SelectedIndex = 0; } } hiddenInstance.updatecombos(); }
private void appointments_advanced_filter_Load(object sender, EventArgs e) { Path_readwrite = Application.ExecutablePath; int formmax = this.Height - 100; int Padding = 3; prefix = ""; this.filterEditor2.ApplyFilter(); selectfiltered(this.gridEX2); this.gridEX2.Refetch(); this.gridEX2.Select(); this.ComboBox8storageDesc = new List <string>(); string wherefilter = "(true)"; string appntmntfilter = "(true)"; if (true) { autochoose = "Διαχείρηση Φίλτρων Εσόδων"; } string CompositeListSQL = ("select * from [prefix]FilterList where " + wherefilter + " ").Replace("[prefix]", prefix); if (connection == null || connection.State == ConnectionState.Closed) { connection.Open(); } string simplewherelessSQL = "select * from [prefix]FilterSingle".Replace("[prefix]", prefix); ListSingle = new OleDbCommand(simplewherelessSQL, connection); using (OleDbDataReader calitm = ListSingle.ExecuteReader()) { int i = 0; /// this.comboBox7.Items.Add(this.combo7Text4AutomaticProcess); /// you, out!!! den thimamai giati xrisimopoiithike /// na diagrafei sto epomeno checkpoint while (calitm.Read()) { this.listBox1.Items.Add(calitm["[prefix]FilterDescription".Replace("[prefix]", prefix)].ToString()); lastsimpleidx++; } } ListMaster = new OleDbCommand(CompositeListSQL, connection); using (OleDbDataReader calitm = ListMaster.ExecuteReader()) { int i = 0; /// this.comboBox7.Items.Add(this.combo7Text4AutomaticProcess); /// you, out!!! den thimamai giati xrisimopoiithike /// na diagrafei sto epomeno checkpoint while (calitm.Read()) { this.listBox1.Items.Add(calitm["[prefix]FilterListDescription".Replace("[prefix]", prefix)].ToString()); } if (this.listBox1.Items.Count > 0) { this.listBox1.SelectedIndex = 0; } } Dictionary <string, string> allfields = new Dictionary <string, string>(); for (int i = 0; i < arrayofcolumns.Length; i++) { allfields.Add(arrayofcolumns[i], arrayofcolumnnames[i]); } hiddenInstance = new CreateFilterForm(autochoose, this.data, metadatainFilterForm, ""); hiddenInstance.CompositeListPartsSQL = ("select* from [prefix]FilterListParts where [prefix]FilterListParent = '[parameter1]' order by [prefix]FilterListPartID").Replace("[prefix]", prefix); hiddenInstance.simplewherelessSQL = "select * from [prefix]FilterSingle".Replace("[prefix]", prefix); hiddenInstance.ListMasterSQL = "select * from [prefix]FilterList".Replace("[prefix]", prefix); hiddenInstance.onedatabaseConn = connection; hiddenInstance.debuglevel = 4; hiddenInstance.comboBox5.DataSource = new BindingSource(allfields, null); hiddenInstance.comboBox5.DisplayMember = "Value"; hiddenInstance.comboBox5.ValueMember = "Key"; hiddenInstance.loadingvaluesdontrunchangeindexevents = false; hiddenInstance.updatecombos(); }