Example #1
0
 /// <summary>
 /// This function sets the values ​​for radio buttons in case of editing data.
 /// </summary>
 private void LoadRadioButtonValue()
 {
     SetUpTaskDetails.SetUpRadioButtonDefaultCheck((int)taskModel.Priority, ref radioButtonPriorityLow,
                                                   ref radioButtonPriorityMedium, ref radioButtonPriorityHigh, ref priorityValue);
     SetUpTaskDetails.SetUpRadioButtonDefaultCheck((int)taskModel.Status, ref radioButtonStatusCanceled,
                                                   ref radioButtonStatusInProgress, ref radioButtonStatusDone, ref statusValue);
 }
Example #2
0
 private void listBox1_SelectedValueChanged(object sender, EventArgs e)
 {
     SetUpTaskDetails.SetUpMyDetails(
         (ToDoTaskModel)listBoxDailyTasks.SelectedItem
         , ref labelTitleValue, ref labelStatusValue
         , ref labelPriorityValue, ref richTextBoxDescription);
 }
Example #3
0
 /// <summary>
 /// This function loads all data into the form when editing data.
 /// </summary>
 private void SetUpValuesInForm()
 {
     SetUpTaskDetails.SetUpTextValuesInForm(taskModel, ref textBoxName, ref fkDay, ref richTextBoxDescription);
     using (var dbContex = new ToDoAppDbContext())
     {
         dayRepository = new DayRepository(dbContex);
         var myDay = dayRepository.GetById(fkDay);
         var date  = myDay.Date;
         dateTimePicker1.Value = date;
     }
     LoadRadioButtonValue();
 }