private void dataGridAgencies_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 brokerIDSelected = Convert.ToInt32(dataGridAgencies.SelectedRows[0].Cells["BrokerID"].Value.ToString());

            //PUT THIS IN A Using BLOCK?
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();
            iBroker     brokerSelected  = thisJobLeadRepo.GetBroker(brokerIDSelected);

            frmBroker newBrokerForm = new frmBroker(brokerSelected);

            newBrokerForm.ShowDialog();

            //Now reinitialise the Agency Broker Grid
            ReloadAgencyBrokerGrid();
        }
Exemple #2
0
        public Broker GetBroker(int thisBrokerID)
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.GetBroker(thisBrokerID));
        }