private void btnEditBR_Click(object sender, EventArgs e) { int row = BRDetails.CurrentCell.RowIndex; moneyDonate mD = overlay(); mD.itemID = int.Parse(BRDetails.Rows[row].Cells[0].Value.ToString()); if (lblBRCategory.Text == "Multiple") { mD.tabSelection.SelectedIndex = 15; mD.txtBRC_Part2.Text = BRDetails.Rows[row].Cells[1].Value.ToString(); mD.cbBRC_Cat2.SelectedItem = BRDetails.Rows[row].Cells[5].Value.ToString(); mD.txtBRC_Quantity2.Value = Decimal.Parse(BRDetails.Rows[row].Cells[2].Value.ToString()); mD.txtBRC_UP2.Text = BRDetails.Rows[row].Cells[3].Value.ToString(); mD.txtBRC_total2.Text = BRDetails.Rows[row].Cells[4].Value.ToString(); } else { mD.tabSelection.SelectedIndex = 10; mD.txtBRPart2.Text = BRDetails.Rows[row].Cells[1].Value.ToString(); mD.txtBRQuantity2.Value = Decimal.Parse(BRDetails.Rows[row].Cells[2].Value.ToString()); mD.txtBRUP2.Text = BRDetails.Rows[row].Cells[3].Value.ToString(); mD.txtBRTotal2.Text = BRDetails.Rows[row].Cells[4].Value.ToString(); } mD.ShowDialog(); MySqlCommand comm = new MySqlCommand("SELECT * FROM item WHERE budgetID = " + current_budgetID, conn); loadTable(comm, 3); }
public moneyDonate overlay() { moneyDonate mD = new moneyDonate(); dim dim = new dim(); dim.Location = this.Location; dim.refToPrev = this; dim.Show(this); mD.refToDim = dim; return(mD); }
private void btnAddBR_Click(object sender, EventArgs e) { moneyDonate mD = overlay(); mD.budgetID = current_budgetID; if (lblBRCategory.Text == "Multiple") { mD.tabSelection.SelectedIndex = 13; mD.cbBRC_Cat.SelectedIndex = 0; mD.ShowDialog(); } else { mD.category = lblBRCategory.Text; mD.tabSelection.SelectedIndex = 7; mD.ShowDialog(); } MySqlCommand comm = new MySqlCommand("SELECT * FROM item WHERE budgetID = " + current_budgetID, conn); loadTable(comm, 3); }