コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ResultsBS r = new ResultsBS();
     int count = r.getConductedExamsCount();
     if (count > 0)
     {
         Results[] rs = new Results[count];
         rs = r.loadConductedExamID(rs);
         for (int j = 0; j < count; j++)
         {
             examIDCombo.Items.Add(rs[j].exam_ID);
         }
     }
     else
         System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE='JavaScript'>alert('No Exams present in the database.')</SCRIPT>");
 }
コード例 #2
0
 //
 //On form Load: Loads the conducted exam IDs
 //
 private void CheckDetailed_Load(object sender, EventArgs e)
 {
     ResultsBS r = new ResultsBS();
     int count = r.getConductedExamsCount();
     if (count > 0)
     {
         Results[] rs = new Results[count];
         rs = r.loadConductedExamID(rs);
         for (int j = 0; j < count; j++)
         {
             examIDCombo.Items.Add(rs[j].exam_ID);
         }
     }
     else
         MessageBox.Show("No Exams yet conducted","Error",MessageBoxButtons.OK);
 }
コード例 #3
0
        //
        //On Form Load
        //
        private void SelectResult_Load(object sender, EventArgs e)
        {
            // to allign the Legend(Group Box) to
            // the center of form
            int centerForm;
            int centerGroup;
            int groupStartPosition;

            centerForm = this.Width / 2;
            centerGroup = selectExamLegend.Width / 2;
            groupStartPosition = centerForm - centerGroup;
            selectExamLegend.Left = groupStartPosition;

            ResultsBS r = new ResultsBS();
            int count = r.getConductedExamsCount();
            if (count > 0)
            {
                Results[] rs = new Results[count];
                rs = r.loadConductedExamID(rs);
                for (int i = 0; i < count; i++)
                {
                    examIDCombo.Items.Add(rs[i].exam_ID);
                }
            }
            else
                MessageBox.Show("No Exams yet conducted");
        }