Esempio n. 1
0
        private void dgvCustomers_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            //Variables
            CustomerSearchViewModel customerVM = null;

            if (dgvCustomers.SelectedRows.Count > 0)
            {
                customerVM = (CustomerSearchViewModel)dgvCustomers.SelectedRows[0].DataBoundItem;
            }
            if (customerVM == null)
            {
                return;                       /*Exit the Function*/
            }
            CustomerUpdateForm custUpdateForm = new CustomerUpdateForm(customerVM.CustomerID);

            custUpdateForm.ShowDialog();

            btnCustomersSearch_Click(sender, e);
        }