private void btnAdd_Click(object sender, EventArgs e) { FrmEdit form = new FrmEdit(0, this.customers); DialogResult res = form.ShowDialog(); if (res == DialogResult.OK) { this.UpdateView(); this.WriteCustomerDB(); } }
private void btnBalance_Click(object sender, EventArgs e) { if (this.lbxCustomer.SelectedIndices.Count > 1) { this.lbxCustomer.SelectedIndex = this.lbxCustomer.SelectedIndices[0]; } FrmEdit editForm = new FrmEdit(2, this.customers, lbxCustomer.SelectedIndex); DialogResult res = editForm.ShowDialog(); if (res == DialogResult.OK) { this.WriteCustomerDB(); this.UpdateView(); } }