private void TextBox1_TextChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { if (comboBox2.Text == "ALL") { ClassMainclass.listselect = " "; } else { ClassMainclass.listselect = "TOP " + comboBox2.Text + " "; } fullsql = ClassAMaincList.Listsql(txtTableName.Text, " ID,", ClassMainclass.listselect); if (txtsimpleSearch.Text == "") { editview = ClassAMaincList.FilterList(txtTableName.Text, txtsimpleSearch, Text, ClassMainclass.listselect); ClassPublicclass.Filllist(listView2, fullsql + editview); shortsql = fullsql + editview; } else { editview = ClassAMaincList.FilterList(txtTableName.Text, txtsimpleSearch, Text, ClassMainclass.listselect); ClassPublicclass.Filllist(listView2, fullsql + editview); shortsql = fullsql + editview; } label2.Text = listView2.Items.Count.ToString(); } }
private void Search_Go() { if (comboBox2.Text == "ALL") { ClassMainclass.listselect = " "; } else { ClassMainclass.listselect = "TOP " + comboBox2.Text + " "; } fullsql = ClassAMaincList.Listsql(txtTableName.Text, " ID,", ClassMainclass.listselect); if (txtsimpleSearch.Text == "") { editview = ClassAMaincList.FilterList(txtTableName.Text, txtsimpleSearch, Text, ClassMainclass.listselect); ClassPublicclass.Filllist(listView2, fullsql + editview); shortsql = fullsql + editview; } else { editview = ClassAMaincList.FilterList(txtTableName.Text, txtsimpleSearch, Text, ClassMainclass.listselect); ClassPublicclass.Filllist(listView2, fullsql + editview); shortsql = fullsql + editview; } label2.Text = listView2.Items.Count.ToString(); }
private void Filtermenow() { try { switch (comboBox2.Text) { case "ALL": ClassMainclass.listselect = ""; break; case "": ClassMainclass.listselect = ""; break; default: ClassMainclass.listselect = "TOP " + comboBox2.Text + " "; break; } fullsql = ClassAMaincList.Listsql(txtTableName.Text, " ID,", ClassMainclass.listselect); editview = ClassAMaincList.FilterList(txtTableName.Text, txtsimpleSearch, Text, ClassMainclass.listselect); fullsql = fullsql + editview; ClassPublicclass.Filllist(listView2, fullsql + editview); shortsql = fullsql + editview; label2.Text = listView2.Items.Count.ToString(); } catch { } }
private void FrmSystemMainList_Load(object sender, EventArgs e) { //Form Load var img = new FrmSystemImages(); txtsimpleSearch.KeyPress += new KeyPressEventHandler(TbPassword_KeyPress); FormBorderStyle = FormBorderStyle.None; // WindowState = FormWindowState.Maximized; this.comboBox2.KeyPress += ClassPublicclass.Numbersonly; // Ensure that the view is set to show details. listView2.View = View.Details; refresh.Image = img.refrech.Image; pdf.Image = img.pdf.Image; excel.Image = img.excel.Image; word.Image = img.word.Image; btnMinimize.Image = img.minimize.Image; btnMaximize.Image = img.maximum.Image; btnClose.Image = img.close.Image; btnMaximize.Image = img.normal.Image; BackColor = ClassMainclass.FormColor; toolStrip4.BackColor = ClassMainclass.ToolstripColor; toolStrip1.BackColor = ClassMainclass.ToolstripColor; button1.BackColor = ClassMainclass.ToolstripColor; panel4.BackColor = ClassMainclass.ToolstripColor; panel5.BackColor = ClassMainclass.ToolstripColor; panel14.BackColor = ClassMainclass.ToolstripColor; button2.BackColor = ClassMainclass.ToolstripColor; button3.BackColor = ClassMainclass.ToolstripColor; toolStripLabel1.ForeColor = ClassMainclass.ToolstripFontColor; panel11.BackColor = ClassMainclass.ToolstripColor; label4.BackColor = ClassMainclass.ToolstripColor; label4.ForeColor = ClassMainclass.ToolstripFontColor; button4.BackColor = ClassMainclass.ToolstripColor; button4.ForeColor = ClassMainclass.ToolstripFontColor; button5.BackColor = ClassMainclass.ToolstripColor; button5.ForeColor = ClassMainclass.ToolstripFontColor; button6.BackColor = ClassMainclass.ToolstripColor; button6.ForeColor = ClassMainclass.ToolstripFontColor; FormBorderStyle = FormBorderStyle.None; toolStripLabel1.Text = Text + " "; if (comboBox2.Text == "ALL") { ClassMainclass.listselect = " "; } else { ClassMainclass.listselect = "TOP " + comboBox2.Text + " "; } try { fullsql = ClassAMaincList.Listsql(txtTableName.Text, " ID,", ClassMainclass.listselect); } catch { } try { shortsql = ClassAMaincList.Listsql(txtTableName.Text, " ", ClassMainclass.listselect); } catch { } ClassPublicclass.Selectfromtablecountlbl(label8, txtTableName.Text, "ID", ""); txtTableName.Text = cmbTableName.Text; txtServerName.Text = listboxSQLServerInstances.Text; txtDatabaseName.Text = listboxSQLServerDatabaseInstances.Text; }