示例#1
0
        protected void DropDownStuID_SelectedIndexChanged(object sender, EventArgs e)
        {
            StudentDBLogic stuDBLogic  = new StudentDBLogic();
            ArrayList      coursesList = stuDBLogic.getCoursesList(DropDownStuID.SelectedValue);

            ListBoxCourses.Items.Clear();
            foreach (string courseNumber in coursesList)
            {
                ListBoxCourses.Items.Add(courseNumber);
            }
        }
示例#2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            StudentDBLogic stuDBLogic  = new StudentDBLogic();
            int            coursesList = stuDBLogic.getFaccount(TextBox1.Text);

            if (coursesList != 0)
            {
                Label3.Text = coursesList.ToString();
            }
            else
            {
                Label3.Text = "Sorry!!. No Faculty ID";
            }
        }