Exemplo n.º 1
0
        static private Customer GetCustomer(string no)
        {
            CustomerHelper helper = new CustomerHelper();
            Customer       cus    = helper.GetCustomer(no);

            if (cus == null)
            {
                return(new Customer());
            }

            return(cus);
        }
Exemplo n.º 2
0
        private void ComboBoxCustomer_TextChanged(object sender, EventArgs e)
        {
            CustomerHelper ch  = new CustomerHelper();
            string         txt = cboCustomerNo.Text.Trim();
            Customer       obj = ch.GetCustomer(txt);

            if (obj != null)
            {
                cboSales.Text  = obj.Sales;
                txtSellTo.Text = obj.Company;
                txtShipTo.Text = obj.ShipTo;
                txtAddr.Text   = obj.Address;
            }
            else
            {
                cboSales.Text  = "";
                txtSellTo.Text = "";
                txtShipTo.Text = "";
                txtAddr.Text   = "";
            }
        }