Exemplo n.º 1
0
        private void AddClientBtn_Click(object sender, EventArgs e)
        {
            ClientEditForm form   = new ClientEditForm();
            var            result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                _clientsRepository.Insert(form.Client);
                FillGrids();
            }
        }
Exemplo n.º 2
0
        private void UpdateClientBtn_Click(object sender, EventArgs e)
        {
            Client client = (Client)ClientsDataGrid.CurrentRow.DataBoundItem;

            ClientEditForm form   = new ClientEditForm(client);
            var            result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                _clientsRepository.Update(form.Client);
                FillGrids();
            }
        }