public void EditSeasons(IDiscipline discipline) { HideAllUserControls(); SeasonOverview seasonOverview = new SeasonOverview(this); AddCustomControl("Season", seasonOverview); GrdMain.Children.Add(seasonOverview); }
public void RemoveDiscipline(IDiscipline discipline) { try { disciplineRepository.RemoveDiscipline(discipline.Name); } catch (DatabaseException ex) { throw new ConnectionException(ex.Message); } }
public static List<ITeacher> GetTeachersByDiscipline(IDiscipline discipline) { var result = new List<ITeacher>(); foreach (var dis in disciplines) { if (dis.Name == discipline.Name) { result.AddRange(dis.Teachers); } } return result; }
public static List <ITeacher> GetTeachersByDiscipline(IDiscipline discipline) { var result = new List <ITeacher>(); foreach (var dis in disciplines) { if (dis.Name == discipline.Name) { result.AddRange(dis.Teachers); } } return(result); }
/// <summary> /// Creates the edit discipling view. /// </summary> /// <param name="discipline">The discipline.</param> /// <param name="employeeCollection">The employee collection.</param> /// <param name="queryStatusCollecction">The query status collecction.</param> /// <param name="actionTaken">The action taken.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// queryStatusCollecction /// or /// actionTaken /// or /// employeeCollection /// </exception> public IDisciplineView CreateEditDisciplingView(IDiscipline discipline, IList <IEmployee> employeeCollection, IList <IQueryStatus> queryStatusCollecction, IList <IActionTaken> actionTaken) { if (queryStatusCollecction == null) { throw new ArgumentNullException(nameof(queryStatusCollecction)); } if (actionTaken == null) { throw new ArgumentNullException(nameof(actionTaken)); } if (employeeCollection == null) { throw new ArgumentNullException(nameof(employeeCollection)); } var queryDDL = GetDropDownList.QueryStatusListItem(queryStatusCollecction, discipline.QueryStatusId); var actionTakenDDL = GetDropDownList.ActionTakenListItem(actionTaken, discipline.ActionTakenId); var employeeDDL = GetDropDownList.EmployeeListitems(employeeCollection, discipline.EmployeeId); var result = new DisciplineView { DisciplineId = discipline.DisciplineId, EmployeeId = discipline.EmployeeId, QueryStatusId = discipline.QueryStatusId, QueryDate = discipline.QueryDate, Offence = discipline.Offence, QueryInitiator = discipline.QueryInitiator, Investigator = discipline.Investigator, Response = discipline.Response, InvestigatorReport = discipline.InvestigatorReport, RecommendedSanction = discipline.RecommendedSanction, DisciplineCommitteeRecommendation = discipline.DisciplineCommitteeRecommendation, ActionTakenId = discipline.ActionTakenId, EvidenceDigitalFileId = discipline.EvidenceDigitalFileId, DateCreated = discipline.DateCreated, CompanyId = discipline.CompanyId, QueryDropDown = queryDDL, ActionTakenDropDown = actionTakenDDL, EmployeeDropDown = employeeDDL, ProcessingMessage = string.Empty }; return(result); }
private void BtnRemoveDiscipline_Click(object sender, RoutedEventArgs e) { if (LvDisciplines.SelectedIndex >= 0) { IDiscipline selectedDiscipline = LvDisciplines.SelectedItem as IDiscipline; try { disciplineCollection.RemoveDiscipline(selectedDiscipline); } catch (Exception exception) { MessageBox.Show($"Could not remove the disciplines\nError: {exception.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } UpdateUi(); } }
public static List <IClassroom> GetClassroomsByDiscipline(IDiscipline discipline) { var result = new List <IClassroom>(); foreach (var classroom in classrooms) { foreach (var dis in classroom.Disciplines) { if (dis.Name != discipline.Name) { continue; } result.Add(classroom); break; } } return(result); }
public static List<IClassroom> GetClassroomsByDiscipline(IDiscipline discipline) { var result = new List<IClassroom>(); foreach (var classroom in classrooms) { foreach (var dis in classroom.Disciplines) { if (dis.Name != discipline.Name) { continue; } result.Add(classroom); break; } } return result; }
public static void AddDisciplineToDatabase(IDiscipline discipline) { disciplines.Add(discipline); }
public void AddDiscipline(IDiscipline discipline) { this.disciplines.Add(discipline); }
public Classroom(string identifier, IDiscipline discipline) : this(identifier, new List<IDiscipline>() { discipline }) { }
public QuestionAnswerController(IDiscipline_QuestionAnswer idiscipline_QuestionAnswer, IDiscipline idiscipline) { _idiscipline_QuestionAnswer = idiscipline_QuestionAnswer; _idiscipline = idiscipline; }
public Teacher(string name, IDiscipline discipline, string details = null) : this(name, new List <IDiscipline>() { discipline }, details) { }
public Classroom(string identifier, IDiscipline discipline) : this(identifier, new List <IDiscipline>() { discipline }) { }
public DisciplineController(IDiscipline idiscipline) { _idiscipline = idiscipline; }
public Teacher(string name, IDiscipline discipline, string details = null) : this(name, new List<IDiscipline>() { discipline }, details) { }
public void AddDiscipline(IDiscipline disciplines) { _disciplines.Add(disciplines); }