コード例 #1
0
ファイル: SaleOrderControl.cs プロジェクト: TienLg/POSM
        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
ファイル: SaleOrderControl.cs プロジェクト: TienLg/POSM
 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
ファイル: CustomerReportControl.cs プロジェクト: TienLg/POSM
 private void btnClearCust_Click(object sender, EventArgs e)
 {
     cust = null;
     txtCustName.Text = string.Empty;
     txtAddress.Text = string.Empty;
     txtPhone.Text = string.Empty;
 }