public UpdateStudentProfileModal(int userid) { InitializeComponent(); this.TopLevel = false; this.AutoScroll = true; this.Hide(); _studentId = userid; _studentData = sTUDENTTableAdapter.GetData().FindBystudent_id(_studentId); PopulateData(); int eighteenYears = DateTime.Today.Year - 18; var eighteenYearsAgo = new DateTime(eighteenYears, 1, 1); dateOfBirthdateTimePicker.Value = eighteenYearsAgo; }
public UpdateStudentProfileModal(int userid) { InitializeComponent(); this.TopLevel = false; this.AutoScroll = true; this.Hide(); _studentId = userid; _studentData = sTUDENTTableAdapter.GetData().FindBystudent_id(_studentId); PopulateData(); int eighteenYears = DateTime.Today.Year - 18; var eighteenYearsAgo = new DateTime(eighteenYears, 1, 1); dateOfBirthdateTimePicker.Value = eighteenYearsAgo; }
public CreateConsultationModal(int userId, SSS_Library.IS2G10_DBSSSDataSet.STUDENTRow studentData) { InitializeComponent(); this.TopLevel = false; this.AutoScroll = true; this.Hide(); _userId = userId; _studentData = studentData; _tutorDataTable = this.tutorTableAdapter1.GetData(); PopulateData(); dateComboBox.Enabled = false; timeComboBox.Enabled = false; BookButton.Enabled = false; }
public CreateConsultationModal(int userId, SSS_Library.IS2G10_DBSSSDataSet.STUDENTRow studentData) { InitializeComponent(); this.TopLevel = false; this.AutoScroll = true; this.Hide(); _userId = userId; _studentData = studentData; _tutorDataTable = this.tutorTableAdapter1.GetData(); PopulateData(); dateComboBox.Enabled = false; timeComboBox.Enabled = false; BookButton.Enabled = false; }
public Student(int userId) { InitializeComponent(); _studentData = sTUDENTTableAdapter.GetData().FindBystudent_id(userId); lblStudentName.Text = String.Format("{0} {1} {2}", _studentData.student_firstname, _studentData.student_lastname, userId); StudentDashboardModal = new StudentDashboardModal(userId); _updateStudentProfileModalModal = new UpdateStudentProfileModal(userId); RegisterGroupModal = new RegisterGroupModal(userId, this); CreateConsultationModal = new CreateConsultationModal(userId, _studentData); _rateConsultationModal = new RateConsultationModal(userId); _rateActivityModal = new RateActivityModal(userId, _studentData.coordinator_id); _rateTutorActivityModal = new RateTutorActivityModal(userId, _studentData.coordinator_id); InitModals(); //check if user has a group if (!_studentData.Isgroup_idNull()) joinGroupToolStripMenuItem.Enabled = false; }
private void submitButton_Click(object sender, EventArgs e) { //fix the update problem _studentData = sTUDENTTableAdapter.GetData().FindBystudent_id(_studentId); //mapping _studentData.student_id_passport = idPassportTextBox.Text; _studentData.student_firstname = studentFirstNameTextBox.Text; _studentData.student_lastname = studentLastNameTextBox.Text; _studentData.student_dateofbirth = dateOfBirthdateTimePicker.Value; _studentData.student_emailaddress = emailTextBox.Text; _studentData.student_mobilenumber = mobileNumberTextBox.Text; _studentData.student_yearofstudy = yearOfStudycomboBox.SelectedIndex + 1; _studentData.student_degreeprogramme = programmeTextBox.Text; int result = sTUDENTTableAdapter.Update(_studentData); //TODO check result MessageBox.Show(Resources.Profile_Update_Successful, Resources.Profile_Update_Successful); }
private void submitButton_Click(object sender, EventArgs e) { //fix the update problem _studentData = sTUDENTTableAdapter.GetData().FindBystudent_id(_studentId); //mapping _studentData.student_id_passport = idPassportTextBox.Text; _studentData.student_firstname = studentFirstNameTextBox.Text; _studentData.student_lastname = studentLastNameTextBox.Text; _studentData.student_dateofbirth = dateOfBirthdateTimePicker.Value; _studentData.student_emailaddress = emailTextBox.Text; _studentData.student_mobilenumber = mobileNumberTextBox.Text; _studentData.student_yearofstudy = yearOfStudycomboBox.SelectedIndex + 1; _studentData.student_degreeprogramme = programmeTextBox.Text; int result = sTUDENTTableAdapter.Update(_studentData); //TODO check result MessageBox.Show(Resources.Profile_Update_Successful, Resources.Profile_Update_Successful); }
public Student(int userId) { InitializeComponent(); _studentData = sTUDENTTableAdapter.GetData().FindBystudent_id(userId); lblStudentName.Text = String.Format("{0} {1} {2}", _studentData.student_firstname, _studentData.student_lastname, userId); StudentDashboardModal = new StudentDashboardModal(userId); _updateStudentProfileModalModal = new UpdateStudentProfileModal(userId); RegisterGroupModal = new RegisterGroupModal(userId, this); CreateConsultationModal = new CreateConsultationModal(userId, _studentData); _rateConsultationModal = new RateConsultationModal(userId); _rateActivityModal = new RateActivityModal(userId, _studentData.coordinator_id); _rateTutorActivityModal = new RateTutorActivityModal(userId, _studentData.coordinator_id); InitModals(); //check if user has a group if (!_studentData.Isgroup_idNull()) { joinGroupToolStripMenuItem.Enabled = false; } }