Пример #1
0
        /*Precondition: Needs a customer to be selected in datagrid for enter keypress to work
         Postcondition: Opens up the customers orders of the selected customer when enter is pressed on datagridview */
        private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                e.SuppressKeyPress = true;

                if (currCustomer != null)
                {
                    CustomerOrdersForm cof = new CustomerOrdersForm(currCustomer);
                    cof.Show();
                }
            }
        }
Пример #2
0
 /*Precondition: Needs search to be done first and customers to be found
  Postcondition: Opens form to create an order for the selected customer */
 private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (currCustomer != null)
     {
         CustomerOrdersForm cof = new CustomerOrdersForm(currCustomer);
         cof.Show();
     }
 }
Пример #3
0
 /*Precondition: Needs a customer to be selected in datagrid to work
  Postcondition: Opens form to view customers orders */
 private void btnCustomersOrders_Click(object sender, EventArgs e)
 {
     if (currCustomer != null)
     {
         CustomerOrdersForm cof = new CustomerOrdersForm(currCustomer);
         cof.Show();
     }
 }