Exemplo n.º 1
0
 public ExceptionHours_Form()
 {
     InitializeComponent();
     this.sqlConnection  = SQLConnection.GetSqlConnection();
     headOfDepartmentSQL = new HeadOfDepartmentSQL(sqlConnection);
     headOfDepartmentSQL.LoadAllPeopleInListView(ref this.listView, "TeachingAssistant");
     headOfDepartmentSQL.LoadAllPeopleInListView(ref this.listView, "Lecturer");
 }
        public Assign_Form(String type)
        {
            InitializeComponent();
            this.type = type;
            chooseWorker_listView.FullRowSelect  = true;
            workerCourses_listView.FullRowSelect = true;
            otherCourses_listView.FullRowSelect  = true;
            if (CourseSQL.Get_Courses() == null)
            {
                CourseSQL.LoadAllCoursesAsObjects();
            }
            allCourses = CourseSQL.Get_Courses();
            HeadOfDepartmentSQL sql = new HeadOfDepartmentSQL(SQLConnection.GetSqlConnection());

            sql.LoadAllPeopleInListView(ref this.chooseWorker_listView, type);
            if (type == "Lecturer")
            {
                choose_Button.Text            = "Choose Lecturer";
                tabPage1_label.Text           = "Choose Lecturer To Assign";
                coursesWantToTeach_label.Text = "Courses Lecturer Wants To Teach:";
            }
            else if (type == "TeachingAssistant")
            {
                choose_Button.Text            = "Choose TeachingAssistant";
                tabPage1_label.Text           = "Choose Teaching-Assistant To Assign";
                coursesWantToTeach_label.Text = "Courses TeachingAssistant Wants To Teach:";
            }

            tabControl.SelectedIndexChanged += new System.EventHandler(
                this.tabControl_SelectedIndexChanged);
            currentTabPage         = choose_tabPage;
            tabControl.SelectedTab = currentTabPage;
        }