private void buttonAdd_Click(object sender, EventArgs e) { ClientEditForm clientEditForm = new ClientEditForm(); clientEditForm.Action = DBActions.Add; clientEditForm.ShowDialog(this); if (clientEditForm.isDataChanged) { LoadClientFromDB(); } }
private void buttonEdit_Click(object sender, EventArgs e) { ClientEditForm clientEditForm = new ClientEditForm(); clientEditForm.Action = DBActions.Edit; clientEditForm.client = Clients[showClientIndex]; clientEditForm.ShowDialog(this); if (clientEditForm.isDataChanged) { Clients[showClientIndex] = clientEditForm.client; } }