protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetMasterValues(); ExamBoardList eb1 = new ExamBoardList(); DropDownList_ExamBoards.Items.Clear(); foreach (Exam_Board eb in eb1._ExamBoardList) { ListItem l1 = new ListItem(eb.ToString(), eb.m_ExamBoardId.ToString()); DropDownList_ExamBoards.Items.Add(l1); } DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("A*", "A*")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("A", "A")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("B", "B")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("C", "C")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("D", "D")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("E", "E")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("9", "9")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("8", "8")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("7", "7")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("6", "6")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("5", "5")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("4", "4")); DropDownList_Grades.Items.Add(new System.Web.UI.WebControls.ListItem("3", "3")); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetMasterValues(); ExamBoardList eb1 = new ExamBoardList(); DropDownList_ExamBoards.Items.Clear(); foreach (Exam_Board eb in eb1._ExamBoardList) { ListItem l1 = new ListItem(eb.ToString(), eb.m_ExamBoardId.ToString()); DropDownList_ExamBoards.Items.Add(l1); } } }
protected void Button_Check_Click(object sender, EventArgs e) { //going to check components Label_Message.Text = "This just checks the time allocations for all Components for an exam board against "; Label_Message.Text += " the base data and corrects if wrong! (they shouldn't be)"; ExamBoardList eblist1 = new ExamBoardList(); foreach (Exam_Board eb in eblist1._ExamBoardList) { CheckOptions(eb); CheckComponents(eb); } }
protected void Button_Opt_Find_Click(object sender, EventArgs e) { //find code... string s = TextBox_FindOption.Text.ToUpper().Trim(); bool found = false; foreach (ListItem item in ListBox_Options.Items) { if (item.Text.Substring(0, 6).ToUpper().Trim() == s) { item.Selected = true; found = true; TextBox_FindOption.Text = ""; } } if (found) { return; } found = false; ExamOption eo1 = new ExamOption(); ExamBoardList ebl1 = new ExamBoardList(); ExamFiles ef1 = new ExamFiles(); foreach (Exam_Board eb in ebl1._ExamBoardList) { eo1 = ef1.Find_Option(s, eb, SeasonCode.ToString(), YearCode.ToString()); if (eo1 != null) { found = true; break; } } if (!found) { TextBox1.Text = "NOT FOUND!!!!"; TextBox1.Visible = true; return; } ListItem i1 = new ListItem(eo1.m_OptionCode + ":" + eo1.m_OptionTitle, eo1.m_OptionID.ToString()); ListBox_Options.Items.Add(i1); foreach (ListItem item in ListBox_Options.Items) { if (item.Text.Substring(0, 6).ToUpper().Trim() == s) { item.Selected = true; found = true; TextBox_FindOption.Text = ""; } } }