Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 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");
     }
 }
Beispiel #4
0
        private void btn_Chapter_Click(object sender, EventArgs e)
        {
            UCChapters uCChapters = new UCChapters(pnl_container, Sub_id, isAdmin);

            cMain.loadUC(pnl_container, uCChapters);
        }