private void newClientButton_Click(object sender, EventArgs e) { ClientForm newClient = new ClientForm(null, _db, this); newClient.Show(); this.Hide(); }
private void modifierToolStripMenuItem_Click(object sender, EventArgs e) { if (allClientList.SelectedItems.Count > 0) { selectedLine = this.allClientList.SelectedItems[0].Text; int id = int.Parse(this.allClientList.SelectedItems[0].Text); Clients selectedClient = _db.Clients.Find(id); ClientForm modifyClient = new ClientForm(selectedClient, _db, this); modifyClient.Show(); } }
private void modifyButton_Click(object sender, EventArgs e) { ClientForm modifyClient = new ClientForm(client, _db, null); modifyClient.Show(); }