private void payments_Load(object sender, EventArgs e) { databaseAccess d1 = new databaseAccess(); string query1 = "select * from payments"; string query2 = "select * from customer"; string query3 = "select * from supplier"; string query4 = "select * from purchasepayments"; d1.displayData(query1, dataGridView1); d1.displayData(query4, dataGridView2); d1.ComboBoxLoad("customerName", comboBox1, query2); d1.ComboBoxLoad("supplierName", comboBox4, query3); }
private void setting_Load(object sender, EventArgs e) { string query = "select * from harasara.inventory "; databaseAccess d1 = new databaseAccess(); d1.ComboBoxLoad("item_id", comboBox1, query); }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { int Index = dataGridView1.SelectedRows[0].Index; int ItemID = Convert.ToInt32(dataGridView1.Rows[Index].Cells[0].Value); string query = "select distinct(SupID) from harasara.itemsandsupplier where ItemNo='" + ItemID + "'"; databaseAccess d1 = new databaseAccess(); d1.ComboBoxLoad("SupID", comboBox1, query); }
private void textBox1_TextChanged(object sender, EventArgs e) { databaseAccess d1 = new databaseAccess(); string query = "select count(*) from supplier where supplierName='" + textBox1.Text + "'"; if (1 == d1.getValue(query)) { string supID = "select SupID from supplier where supplierName='" + textBox1.Text + "'"; label9.Text = d1.getString(supID); string items = "select * from itemsandsupplier where SupID='" + label9.Text + "'"; d1.ComboBoxLoad("ItemDescription", comboBox1, items); } else { label9.Text = null; } }
private void setting_Load(object sender, EventArgs e) { databaseAccess d2 = new databaseAccess(); d2.ComboBoxLoad("name", comboBox1, "select * from inventory"); }