Exemple #1
0
        public List <Broker> GetAllUnassociatedBrokers()
        {
            //This gets passed on to the JobRepo
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.GetAllUnassociatedBrokers(myBrokers, IsAgency));
        }
Exemple #2
0
        /// <summary>
        /// Save this instance of JobLead
        /// </summary>
        public void Save()
        {
            //This basically just gets punted to the JobRepo (as I don't want the JobLead implementation to handle it)
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            thisJobLeadRepo.SaveJobLead(this);
        }
Exemple #3
0
        //public void Save()
        public Broker Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            //thisJobLeadRepo.SaveBroker(this);
            return(thisJobLeadRepo.SaveBroker(this));
        }
        private void ReloadAgencyContactGrid()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            dataGridAgencyContacts.DataSource = thisJobLeadRepo.GetAgencyContactsDatasource();
            dataGridAgencyContacts.Columns["ContactID"].Visible = false;
        }
        private void ReloadAgencyBrokerGrid()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            dataGridAgencies.DataSource = thisJobLeadRepo.GetAgencyBrokersDatasource();
            dataGridAgencies.Columns["BrokerID"].Visible = false;
        }
        private void ReloadJobLeadGrid()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            dataGridView.DataSource = thisJobLeadRepo.GetJobLeadGridDatasource();
            dataGridView.Columns["JobLeadID"].Visible = false;
        }
        /// <summary>
        /// The function that shows/hides the search control panels
        /// </summary>
        private void SetSearchControls()
        {
            switch (searchType)
            {
            case "JobType":
                pnlDateSearchOptions.Visible     = false;
                txtBoxSearchText.Text            = "";
                pnlJobTitleSearchOptions.Visible = true;
                pnlStatusSearchOptions.Visible   = false;
                cboBrokerList.Visible            = false;
                break;

            case "DateType":
                pnlDateSearchOptions.Visible     = true;
                pnlJobTitleSearchOptions.Visible = false;
                pnlStatusSearchOptions.Visible   = false;
                cboBrokerList.Visible            = false;
                break;

            case "StatusType":
                pnlDateSearchOptions.Visible     = false;
                pnlJobTitleSearchOptions.Visible = false;
                pnlStatusSearchOptions.Visible   = true;
                cboBrokerList.Visible            = false;
                break;

            case "ReferenceType":
                pnlDateSearchOptions.Visible     = false;
                txtBoxSearchText.Text            = "";
                pnlJobTitleSearchOptions.Visible = true;
                pnlStatusSearchOptions.Visible   = false;
                cboBrokerList.Visible            = false;
                break;

            case "AgencyType":
            case "EmployerType":
                pnlDateSearchOptions.Visible     = false;
                pnlJobTitleSearchOptions.Visible = false;
                pnlStatusSearchOptions.Visible   = false;
                JobLeadRepo thisJobLeadRepo = new JobLeadRepo();
                cboBrokerList.DataSource = thisJobLeadRepo.GetAllBrokersNames(searchType == "EmployerType"? false: true);
                cboBrokerList.Visible    = true;
                break;

            default:
                pnlDateSearchOptions.Visible     = false;
                pnlJobTitleSearchOptions.Visible = false;
                pnlStatusSearchOptions.Visible   = false;
                cboBrokerList.Visible            = false;
                break;
            }
        }
Exemple #8
0
        public object GetAllBrokers(bool isAgency)
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            if (isAgency == true)
            {
                return(thisJobLeadRepo.GetAllAgencyBrokers());
            }
            else
            {
                return(thisJobLeadRepo.GetAllEmployerBrokers());
            }
        }
        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();
        }
        private void dataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            //A row has been double clicked. We need to get the JobLeadID value, extract the JobLead instance
            //and then pass this to the form to display the job lead.
            int jobLeadIDSelected = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["JobLeadID"].Value.ToString());

            //PUT THIS IN A Using BLOCK?
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();
            iJobLead    jobLeadSelected = thisJobLeadRepo.GetJobLead(jobLeadIDSelected);

            frmJobLead newJobLeadForm = new frmJobLead(jobLeadSelected);

            newJobLeadForm.ShowDialog();

            //Now reinitialise the Job Lead Grid
            ReloadJobLeadGrid();
        }
        private void btnSearchJobLeads_Click(object sender, EventArgs e)
        {
            //We (currently) have five/six different search facilities.
            //Job Title
            //Date Range
            //Status
            //Reference value
            //Agency or Broker Name

            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();


            switch (searchType)
            {
            case "JobType":
                dataGridView.DataSource = thisJobLeadRepo.GetJobTitleFilteredJobLeadGridDataSource(txtBoxSearchText.Text);
                break;

            case "DateType":
                dataGridView.DataSource = thisJobLeadRepo.GetJobDateFilteredJobLeadGridDataSource(dateTimePickerStartDate.Value, dateTimePickerEndDate.Value);
                break;

            case "StatusType":
                List <string> chosenStatusList = chkListBoxStatus.CheckedItems.OfType <string>().ToList();
                dataGridView.DataSource = thisJobLeadRepo.GetJobStatusFilteredJobLeadGridDataSource(chosenStatusList);
                break;

            case "ReferenceType":
                dataGridView.DataSource = thisJobLeadRepo.GetJobRefFilteredJobLeadGridDatsSource(txtBoxSearchText.Text);
                break;

            case "AgencyType":
            case "EmployerType":
                dataGridView.DataSource = thisJobLeadRepo.GetJobBrokerFilteredJobLeadGridDataSource(cboBrokerList.Text);
                break;

            default:
                break;
            }
        }
Exemple #12
0
        public iContact Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.SaveContact(this));
        }
Exemple #13
0
        public iName Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.SaveName(this));
        }
Exemple #14
0
        public Broker GetBroker(int thisBrokerID)
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.GetBroker(thisBrokerID));
        }
Exemple #15
0
        public iAddress Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.SaveAddress(this));
        }