Exemplo n.º 1
0
        private void addBtn_Click(object s, EventArgs e)
        {
            var modifyCustomer = new ModifyCustomer(_currentUser, _translator, _customerRepository);

            // Refresh the customer data after the form is closed
            modifyCustomer.FormClosed += async(object sender, FormClosedEventArgs ev) =>
            {
                await getCustomers();
            };
            modifyCustomer.ShowDialog();
        }
Exemplo n.º 2
0
        private void editBtn_Click(object s, EventArgs e)
        {
            var index    = customersTable.CurrentRow.Index;
            var customer = _customers[index];

            var modifyCustomer = new ModifyCustomer(_currentUser, _translator, _customerRepository, customer.Id);

            // Refresh the customer data after the form is closed
            modifyCustomer.FormClosed += async(object sender, FormClosedEventArgs ev) =>
            {
                await getCustomers();
            };
            modifyCustomer.ShowDialog();
        }