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

            return(thisJobLeadRepo.GetAllUnassociatedBrokers(myBrokers, IsAgency));
        }
Пример #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);
        }
Пример #3
0
        //public void Save()
        public Broker Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            //thisJobLeadRepo.SaveBroker(this);
            return(thisJobLeadRepo.SaveBroker(this));
        }
Пример #4
0
        private void ReloadAgencyContactGrid()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            dataGridAgencyContacts.DataSource = thisJobLeadRepo.GetAgencyContactsDatasource();
            dataGridAgencyContacts.Columns["ContactID"].Visible = false;
        }
Пример #5
0
        private void ReloadAgencyBrokerGrid()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            dataGridAgencies.DataSource = thisJobLeadRepo.GetAgencyBrokersDatasource();
            dataGridAgencies.Columns["BrokerID"].Visible = false;
        }
Пример #6
0
        private void ReloadJobLeadGrid()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            dataGridView.DataSource = thisJobLeadRepo.GetJobLeadGridDatasource();
            dataGridView.Columns["JobLeadID"].Visible = false;
        }
Пример #7
0
        /// <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;
            }
        }
Пример #8
0
        public object GetAllBrokers(bool isAgency)
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            if (isAgency == true)
            {
                return(thisJobLeadRepo.GetAllAgencyBrokers());
            }
            else
            {
                return(thisJobLeadRepo.GetAllEmployerBrokers());
            }
        }
Пример #9
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();
        }
Пример #10
0
        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();
        }
Пример #11
0
        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;
            }
        }
Пример #12
0
        public iContact Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.SaveContact(this));
        }
Пример #13
0
        public iName Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.SaveName(this));
        }
Пример #14
0
        public Broker GetBroker(int thisBrokerID)
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.GetBroker(thisBrokerID));
        }
Пример #15
0
        public iAddress Save()
        {
            JobLeadRepo thisJobLeadRepo = new JobLeadRepo();

            return(thisJobLeadRepo.SaveAddress(this));
        }