示例#1
0
        private void btnCustSearch_Click(object sender, EventArgs e)
        {
            CustomerSearchDialog dialog = new CustomerSearchDialog();
            dialog.ShowDialog(this);

            if (dialog.DialogResult == DialogResult.OK)
            {
                cust = dialog.ReturnCustomer();
                if (cust != null)
                {
                    txtCustName.Text = cust.cust_name.Trim();
                    txtAddress.Text = cust.cust_address.Trim();
                    txtPhone.Text = cust.cust_phone.Trim();
                    saleOrder.cust_id = cust.cust_id;
                    // Update Sale order
                }
            }
        }
示例#2
0
 private void btnQuickSearch_Click(object sender, EventArgs e)
 {
     var customer = db.Customers.Where(c => c.cust_name.Equals("Unknown")).First();
     if (customer != null)
     {
         cust = customer;
         saleOrder.cust_id = cust.cust_id;
         txtCustName.Text = cust.cust_name.Trim();
         txtAddress.Text = cust.cust_address.Trim();
         txtPhone.Text = cust.cust_phone.Trim();
     }
 }
示例#3
0
 private void btnClearCust_Click(object sender, EventArgs e)
 {
     cust = null;
     txtCustName.Text = string.Empty;
     txtAddress.Text = string.Empty;
     txtPhone.Text = string.Empty;
 }