private void SelectionFormPopup(SubjectSelection selection) { SelectionForm form = new SelectionForm(); form.SetSelection(selection); form.Show(); form.FormClosed += SelectionForm_Closed; }
private void BuildSubjects() { int protocolId = int.Parse(BaseProtocolId); string datasetSQL = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]) + ""; DataTable patients = ProtocolMgmtDa.GetPatientsByProtocol(protocolId, datasetSQL, base.ShowPatientIdentifiers(), true); SubjectSelection.DataSource = patients; SubjectSelection.DataBind(); }
public List <LectureTime> GetBySelection(SubjectSelection selection) { return(connection.Query <LectureTime>( "SELECT Id, Time FROM LectureTime WHERE Id IN " + "(SELECT LectureTimeId FROM Selection_Time " + "WHERE SelectionId = @Id)", new { selection.Id }) .AsList()); }
public bool Add_Preferred_Selection(SubjectSelection selection) { if (Add_Selection_To_Table(selection)) { Preferred_Selections_Id.Add(selection.Id); return(true); } return(false); }
public void AddSubjectSelection(SubjectSelection selection) { foreach (LectureTime time in selection.Times) { for (int i = time.Start_Period; i <= time.End_Period; ++i) { Table[(int)time.Day, i - 1].Value = selection.Subject.Codename; } } Table.ClearSelection(); }
private void AddToTable(SubjectSelection selection) { all_selections.Rows.Add( selection.Id, selection.Subject, selection.Hall, Lecturer.LecturersToString(selection.Lecturers), LectureTime.TimeListToString(selection.Times), selection.ToString() ); }
private void Remove_Selection_From_Table(SubjectSelection selection) { foreach (LectureTime time in selection.Times) { for (int period = time.Start_Period - 1; period <= time.End_Period; ++period) { if (table[(int)time.Day, period] == selection.SubjectId) { Set_Period(period, time.Day, 0); } } } }
public void SetSelection(SubjectSelection selection) { this.selection = selection; deep_copy = new SubjectSelection(selection); New = (selection.Id == 0); //BindData(); SubjectCombobox.SelectedValue = selection.SubjectId; HallCombobox.SelectedValue = selection.HallId; TimetableControl.AddSubjectAndTimes( selection.Subject, selection.Times); }
public void RemoveSubjectSelection(SubjectSelection selection) { foreach (LectureTime time in selection.Times) { for (int i = time.Start_Period; i <= time.End_Period; ++i) { if (Table[(int)time.Day, i].Value.ToString() == selection.Subject.Codename) { Table[(int)time.Day, i].Value = ""; } } } }
private void UpdateInTable(SubjectSelection selection) { foreach (DataRow row in all_selections.Rows) { if (Convert.ToInt32(row["Id"]) == selection.Id) { row["Subject"] = selection.Subject; row["Hall"] = selection.Hall; row["Lecturers"] = Lecturer.LecturersToString(selection.Lecturers); row["Times"] = LectureTime.TimeListToString(selection.Times); row["Filter"] = selection.ToString(); } } }
private bool Add_Selection_To_Table(SubjectSelection selection) { foreach (LectureTime time in selection.Times) { for (int period = time.Start_Period; period <= time.End_Period; ++period) { if (Period_Used(period, time.Day)) { return(false); } else { Set_Period(period, time.Day, selection.SubjectId); } } } return(true); }
private void SetAfterInsert() { deep_copy = new SubjectSelection(selection); selection = new SubjectSelection(); TimetableControl.ResetLectureTimes(); }
public void Remove_Preferred_Selection(SubjectSelection selection) { Generator.Remove_Preferred_Selection(selection); }
public bool Add_Preferred_Selection(SubjectSelection selection) { return(Generator.Add_Preferred_Selection(selection)); }
public void Remove_Preferred_Selection(SubjectSelection selection) { Preferred_Selections_Id.Remove(selection.Id); Remove_Selection_From_Table(selection); }
public LectureHall GetBySelection(SubjectSelection selection) { return(connection.QueryFirst <LectureHall>( "SELECT * FROM LectureHall WHERE Id = @Id", new { selection.HallId })); }