private void btn_Add_Click(object sender, EventArgs e) { if (txt_SubjectID.Text != "" && txt_SubjectName.Text != "" && txt_Credits.Text != "" && txt_Semester.Text != "") { subs.Course_Code = txt_SubjectID.Text; subs.Course_Name = txt_SubjectName.Text; subs.Credits = txt_Credits.Text; subs.Prerequisite = Prerequisite; subs.Chapter_ID = ""; subs.DetailOutline_ID = ""; subs.Exam_ID = ""; subs.Goal_ID = ""; subs.PPGD_ID = ""; subs.ProgramOutStandar_ID = ""; subs.SelfStudy_ID = ""; subs.Semester = txt_Semester.Text.Trim(); cSubject.addSubject(subs); this.txt_SubjectID.Text = ""; this.txt_SubjectName.Text = ""; this.txt_Credits.Text = ""; this.txt_Semester.Text = ""; MessageBox.Show("Thành Công"); this.Dispose(); UCCnttBefore18 uCCnttBefore18 = new UCCnttBefore18(isAdmin, lbl_subname); cMain.loadUC(pnl_container, uCCnttBefore18); } else { MessageBox.Show("Vui lòng điền đầy đủ thông tin"); } }
private void btn_Back_Click(object sender, EventArgs e) { UCCnttBefore18 uCCnttBefore18 = new UCCnttBefore18(isAdmin, lbl_subname); this.Dispose(); cMain.loadUC(pnl_container, uCCnttBefore18); }
private void btn_delete_Click(object sender, EventArgs e) { CSubject cSubject = new CSubject(); cSubject.delete(Sub_id); MessageBox.Show("Xóa môn học thành công"); this.Dispose(); UCCnttBefore18 uCCnttBefore18 = new UCCnttBefore18(isAdmin, lbl_subname); cMain.loadUC(pnl_contain, uCCnttBefore18); }
private void btn_Cntt_Click(object sender, EventArgs e) { UCCnttBefore18 uCCnttBefore18 = new UCCnttBefore18(isAdmin, lbl_SubName); cMain.loadUC(this.pnl_content, uCCnttBefore18); }