Example #1
0
        public frmContact(iAddress parentAddress)
        {
            InitializeComponent();

            myContact = InstanceFactory.Contact();

            myContact.Address = (Address)parentAddress;

            //It is possible that the address passed is NULL (the parent agency has not been set)
            rTextBoxContactAddress.Text = myContact.Address == null? "" : myContact.Address.FullAddress;

            SetNotesCount();
        }
Example #2
0
        public frmContact(iContact myContactInstance)
        {
            InitializeComponent();

            myContact = myContactInstance;

            //Fill in the values
            txtBoxName.Text              = myContact.Name.FullName;
            txtBoxContactPosition.Text   = myContact.Position;
            txtBoxContactEmail.Text      = myContact.Email;
            txtBoxContactLandLineNo.Text = myContact.LandLineTelNo;
            txtBoxContactMobileNo.Text   = myContact.MobileTelNo;
            //It is possible that the address passed is NULL (the parent agency has not been set)
            rTextBoxContactAddress.Text = myContact.Address == null ? "" : myContact.Address.FullAddress;

            SetNotesCount();
        }
Example #3
0
        private void dataGridAgencyContacts_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            //A row has been double clicked. We need to get the BrokerID value, extract the Broker instance
            //and then pass this to the form to display the Broker.
            int contactIDSelected = Convert.ToInt32(dataGridAgencyContacts.SelectedRows[0].Cells["ContactID"].Value.ToString());

            //PUT THIS IN A Using BLOCK?
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();
            iContact    contactSelected = thisJobLeadRepo.GetContact(contactIDSelected);

            frmContact newContactForm = new frmContact(contactSelected);

            newContactForm.ShowDialog();

            //Now reinitialise the Contacts Grid
            ReloadAgencyContactGrid();
        }