Exemple #1
0
 private void OnFormLoad(object sender, EventArgs e)
 {
     //Event handler for form load event
     this.Cursor = Cursors.WaitCursor;
     try {
         this.mToolTip            = new System.Windows.Forms.ToolTip();
         this.mToolTip.ShowAlways = true;
         this.mToolTip.SetToolTip(this.cboIssueType, "Select an issue type.");
         //if(this.ctlCompLoc.CompanyItemsCount > 0) this.ctlCompLoc.CompanySelectedIndex = 0;
         this.cboIssueCategory.DataSource    = this.mIssueCategorys;
         this.cboIssueCategory.DisplayMember = "IssueCategoryTable.Category";
         this.cboIssueCategory.ValueMember   = "IssueCategoryTable.Category";
         this.mIssueCategorys.Merge(CRGFactory.IssueCategorys);
         this.cboIssueType.DataSource        = this.mIssueTypes;
         this.cboIssueType.DisplayMember     = "IssueTypeTable.Type";
         this.cboIssueType.ValueMember       = "IssueTypeTable.ID";
         this.cboIssueCategory.SelectedIndex = 0;
         OnIssueCategorySelected(this.cboIssueCategory, EventArgs.Empty);
         this.ctlContact.DataSource = this.mContacts;
         this.mContacts.Merge(EnterpriseFactory.GetContacts());
         this.txtTitle.Text = this.mIssue.Subject;
     }
     catch (Exception ex) { reportError(ex); }
     finally { this.btnOk.Enabled = false; this.Cursor = Cursors.Default; }
 }
Exemple #2
0
 private void OnAfterContactCreated(object source, ContactEventArgs e)
 {
     //Event handler for new contact created
     this.Cursor = Cursors.WaitCursor;
     try {
         //Persist the new contact
         int id = EnterpriseFactory.CreateContact(e.Contact);
         this.mContacts.Clear();
         this.mContacts.Merge(EnterpriseFactory.GetContacts());
         this.ctlContact.SelectedValue = id;
     }
     catch (Exception ex) { reportError(ex); }
     finally { this.Cursor = Cursors.Default; }
 }