Пример #1
0
        bool IForm.Refresh()
        {
            _form_state          = FormStates.Busy;
            _cust                = _app.Call.CurrentCustCampaign.Customer;
            txtAltPhone.Text     = _cust.AltPhone;
            txtBillCity.Text     = _cust.BillingCity;
            txtBilling1.Text     = _cust.BillingAddress1;
            txtBilling2.Text     = _cust.BillingAddress2;
            txtBillZip.Text      = _cust.BillingZip;
            txtCompany.Text      = _cust.Company;
            txtEmail.Text        = _cust.Email;
            txtFirstName.Text    = _cust.FirstName;
            txtFormerTDM.Text    = _cust.FormerTDM;
            txtLastName.Text     = _cust.LastName;
            txtServCity.Text     = _cust.ServiceCity;
            txtService1.Text     = _cust.ServiceAddress1;
            txtService2.Text     = _cust.ServiceAddress2;
            txtServZip.Text      = _cust.ServiceZip;
            chkDoNotCall.Checked = _cust.DoNotCall;
            _form_state          = FormStates.Idle;

            foreach (CustomerAnswer dynAns in _cust.CustomerAnswers)
            {
                if (dynAns.LookupID > 0)
                {
                    _dyn_area.AddAnswer(dynAns.QuestionID, dynAns.LookupID);
                }
                else
                {
                    _dyn_area.AddAnswer(dynAns.QuestionID, dynAns.AnswerText);
                }
            }

            return(true);
        }