private void btnAddClick(object sender, EventArgs e) { panelMain.Controls.Clear(); t = new TransactionAddingForm(); t.Dock = DockStyle.Fill; panelMain.Controls.Add(t); }
public TransactionForm() { InitializeComponent(); t = new TransactionAddingForm(); t.Dock = DockStyle.Fill; panelMain.Controls.Add(t); }
private void btnCheckoutClick(object sender, EventArgs e) { BillingForm b = new BillingForm(this.transaction); Form f = new Form(); f.Size = this.Size; f.Controls.Add(b); b.Dock = DockStyle.Fill; var so = f.ShowDialog(); TransactionAddingForm fc = new TransactionAddingForm(); panelMain.Controls.Clear(); fc.Dock = DockStyle.Fill; panelMain.Controls.Add(fc); }
private void btnEditClick(object sender, EventArgs e) { int selectedRowCount = dataGridView1.Rows.GetRowCount(DataGridViewElementStates.Selected); if (selectedRowCount > 0) { Transaction transaction = new Transaction(); DataGridViewRow d = dataGridView1.SelectedRows[0]; transaction.TransactionID = d.Cells[0].Value.ToString(); transaction.CustomerID = d.Cells[1].Value.ToString(); transaction.DateOrdered = d.Cells[3].Value.ToString(); transaction.DatePickup = d.Cells[4].Value.ToString(); transaction.Status = d.Cells[5].Value.ToString(); panelMain.Controls.Clear(); t = new TransactionAddingForm(transaction); t.Dock = DockStyle.Fill; panelMain.Controls.Add(t); } }