private void textbox_TextChanged(object sender, System.EventArgs e) { if (_form_state != FormStates.EditInProgress && _form_state != FormStates.Busy) { _form_state = FormStates.EditInProgress; } }
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); }
bool ISaveable.Undo() { _form_state = FormStates.Idle; if (Undone != null) { Undone(this, null); } return(true); }
bool ISaveable.Save() { _form_state = FormStates.Idle; if (SaveSucceeded != null) { SaveSucceeded(this, null); } return(true); }
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); }
private void Safe_SetDirty() { if (_form_state != FormStates.EditInProgress) { _form_state = FormStates.EditInProgress; if (Dirtied != null) { Dirtied(this, null); } } }
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); } } }
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); } } }
bool ISaveable.Undo() { _form_state = FormStates.Busy; ((IForm)this).Refresh(); _form_state = FormStates.Idle; if (Undone != null) { Undone(this, null); } return(true); }
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); }
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); }
bool IEditable.Edit() { _form_state = FormStates.EditPendingChange; return(true); }