Exemplo n.º 1
0
        //method to change the data grid if the repository combo box is changed
        private void comboBoxChooseRepo_SelectedIndexChanged(object sender, EventArgs e)
        {
            //populate the data grid based on the newly selected combo box item
            PopulateGrid(CallRecordFactory.GetCallRecordRepo(comboBoxChooseRepo.SelectedItem.ToString()));

            //when it's changed, we need to load the proper phone numbers for the other combo box
            InitializeComboBoxFromPhoneNumber();
        }
Exemplo n.º 2
0
 //form onload method
 private void MainForm_Load(object sender, EventArgs e)
 {
     //set up the repository combo box
     IntializeComboBoxRepo();
     //populate the data grid with the first entry in the repo combo box
     PopulateGrid(CallRecordFactory.GetCallRecordRepo(comboBoxChooseRepo.SelectedItem.ToString()));
     //show only the records from the first phone number in the combo box
     InitializeComboBoxFromPhoneNumber();
 }
Exemplo n.º 3
0
 //method to change the data grid if the check box for answered calls only is checked or not
 private void checkBoxAnsweredCalls_CheckedChanged(object sender, EventArgs e)
 {
     //show only answered calls
     if (checkBoxAnsweredCalls.Checked)
     {
         ShowAnsweredOnly(_callRecords);
     }
     //otherwise re-populate the grid by the chosen phone number
     else
     {
         PopulateGridByPhoneNumber(CallRecordFactory.GetCallRecordRepo(comboBoxChooseRepo.SelectedItem.ToString()));
     }
 }
Exemplo n.º 4
0
 //method for when the selected item in the fromPhoneNumber combo box changes
 private void comboBoxFromPhoneNumber_SelectedIndexChanged(object sender, EventArgs e)
 {
     //re-populate the data grid with entries with a different fromPhoneNumber using the selected repository
     PopulateGridByPhoneNumber(CallRecordFactory.GetCallRecordRepo(comboBoxChooseRepo.SelectedItem.ToString()));
 }