private void btn_Back_Click(object sender, EventArgs e) { UCChapters uCChapters = new UCChapters(pnl_container, sub_id, isAdmin); this.Dispose(); cMain.loadUC(pnl_container, uCChapters); }
private void btn_delete_Click(object sender, EventArgs e) { CChapters cChapters = new CChapters(); var result = MessageBox.Show("Chắc chắn xóa?", "Thông báo", MessageBoxButtons.OKCancel); if (result == DialogResult.OK) { cChapters.Delete(subId, chapterId); } this.Dispose(); UCChapters uCChapters = new UCChapters(pnl_contain, subId, isAdmin); cMain.loadUC(pnl_contain, uCChapters); }
private void btn_Edit_Click(object sender, EventArgs e) { if (txt_ChapterID.Text != "" && txt_ChapterName.Text != "") { chapter.ID = this.txt_ChapterID.Text; chapter.Name = this.txt_ChapterName.Text; chapter.Detail = details; cChapters.Update(subId, chapterId, chapter); MessageBox.Show("Sửa thông tin thành công"); UCChapters uCChapters = new UCChapters(pnl_container, subId, isAdmin); cMain.loadUC(pnl_container, uCChapters); } else { MessageBox.Show("Nhập đủ thông tin"); } }
private void btn_Chapter_Click(object sender, EventArgs e) { UCChapters uCChapters = new UCChapters(pnl_container, Sub_id, isAdmin); cMain.loadUC(pnl_container, uCChapters); }