Example #1
0
        private void buttonClientCreate_Click(object sender, EventArgs e)
        {
            FormClient form = new FormClient();

            if (form.ShowDialog() == DialogResult.OK)
            {
                dB.setClient(form.client);
                RefreshClient();
            }
        }
Example #2
0
        private void buttonClientEdit_Click(object sender, EventArgs e)
        {
            int idClient = Convert.ToInt32(comboBoxClient.SelectedItem);
            int index    = clients.FindIndex(x => x.id == idClient);

            FormClient form = new FormClient(clients[index]);

            if (form.ShowDialog() == DialogResult.OK)
            {
                dB.setClient(form.client);
                RefreshClient();
            }
        }