Пример #1
0
        public void FillInfo()
        {
            Customer customer = new Customer();
            cDal = new CallerIDDAL();
            try
            {
                customer = cDal.selectCustomer(info.phoneNumber);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }

            if (info != null)
            {
                txtPhoneLine1.Text = info.phoneNumber;
                if (customer != null)
                {
                    txtNameLine1.Text = customer.Name;
                    txtLastNameLine1.Text = customer.LastName;
                    addressLine1.Text = customer.Address;
                    if (!string.IsNullOrEmpty(customer.Region))
                        txtRegionLine1.Text = customer.Region;
                    if (string.IsNullOrEmpty(customer.CustomerNote))
                        txtNoteLine1.Text = customer.CustomerNote;
                }
            }
        }