Esempio n. 1
0
 private void textbox_TextChanged(object sender, System.EventArgs e)
 {
     if (_form_state != FormStates.EditInProgress && _form_state != FormStates.Busy)
     {
         _form_state = FormStates.EditInProgress;
     }
 }
Esempio n. 2
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);
        }
Esempio n. 3
0
 bool ISaveable.Undo()
 {
     _form_state = FormStates.Idle;
     if (Undone != null)
     {
         Undone(this, null);
     }
     return(true);
 }
Esempio n. 4
0
 bool ISaveable.Save()
 {
     _form_state = FormStates.Idle;
     if (SaveSucceeded != null)
     {
         SaveSucceeded(this, null);
     }
     return(true);
 }
Esempio n. 5
0
        public CustomerCtl(Afni.Applications.VLoop.Application app)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            _observers             = new ArrayList();
            _form_state            = FormStates.Idle;
            _app                   = app;
            _app.CampaignSwitched += new EventHandler(this.app_CampaignChanged);
        }
Esempio n. 6
0
 private void Safe_SetDirty()
 {
     if (_form_state != FormStates.EditInProgress)
     {
         _form_state = FormStates.EditInProgress;
         if (Dirtied != null)
         {
             Dirtied(this, null);
         }
     }
 }
Esempio n. 7
0
 private void combo_SelectedValueChanged(object sender, System.EventArgs e)
 {
     if (_form_state != FormStates.EditInProgress && _form_state != FormStates.Busy)
     {
         _form_state = FormStates.EditInProgress;
         if (Dirtied != null)
         {
             Dirtied(this, null);
         }
     }
 }
Esempio n. 8
0
 private void textbox_TextChanged(object sender, System.EventArgs e)
 {
     if (_form_state != FormStates.EditInProgress && _form_state != FormStates.Busy)
     {
         _form_state = FormStates.EditInProgress;
         if (Dirtied != null)
         {
             Dirtied(this, null);
         }
     }
 }
Esempio n. 9
0
 bool ISaveable.Undo()
 {
     _form_state = FormStates.Busy;
     ((IForm)this).Refresh();
     _form_state = FormStates.Idle;
     if (Undone != null)
     {
         Undone(this, null);
     }
     return(true);
 }
Esempio n. 10
0
 bool ISaveable.Save()
 {
     //update the form state before we fire the
     //event, in case the listener wants our updated
     //form state.
     _form_state = FormStates.Idle;
     if (SaveSucceeded != null)
     {
         SaveSucceeded(this, null);
     }
     return(true);
 }
Esempio n. 11
0
 bool IForm.Refresh()
 {
     _form_state            = FormStates.Busy;
     _acct                  = _app.Call.CurrentCustCampaign.Customer.Account;
     txtBillDate.Text       = _acct.BillDate.ToString();
     txtInServiceDate.Text  = _acct.InServiceDate.ToString();
     txtCAN.Text            = _acct.AccountNumber;
     chkInFranchise.Checked = _acct.InFranchise;
     RebuildTVW();
     afcboBTN.DataSource = _acct.WTNs;
     _form_state         = FormStates.Idle;
     return(true);
 }
Esempio n. 12
0
 bool IEditable.Edit()
 {
     _form_state = FormStates.EditPendingChange;
     return(true);
 }