private void btnNewBroker_Click(object sender, EventArgs e) { //We will default to showing an Agency broker for new brokers. frmBroker newBrokerForm = new frmBroker(true); newBrokerForm.ShowDialog(); ReloadAgencyBrokerGrid(); }
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(); }
private void ShowNewBrokerForm(bool isAgency) { frmBroker newBrokerForm = new frmBroker(isAgency); newBrokerForm.ShowDialog(); }
private void ShowExistingBrokerForm(iBroker selectedBroker) { frmBroker newBrokerForm = new frmBroker(selectedBroker); newBrokerForm.ShowDialog(); }