Example #1
0
        protected void uC_buttons1_ButtonSuaClick(object sender, EventArgs e)
        {
            tacVu = 2;
            FormThem fThem = new FormThem(_idSelected, _chucNang);

            fThem.UpdateEventHandler += F2_UpdateEventHandler1;// for refresh gridview
            fThem.ShowDialog();
        }
Example #2
0
 private void btnTao_Click(object sender, EventArgs e)
 {
     _chucNang = 5;
     using (FormThem fThem = new FormThem(null, _chucNang))
     {
         fThem.UpdateEventHandler += F2_UpdateEventHandler1;// for refresh gridview
         fThem.ShowDialog();
     }
 }
Example #3
0
 protected void uC_buttons1_ButtonThemClick(object sender, EventArgs e)
 {
     tacVu = 1;
     using (FormThem fThem = new FormThem(null, _chucNang))
     {
         fThem.UpdateEventHandler += F2_UpdateEventHandler1;// for refresh gridview
         fThem.ShowDialog();
     }
 }
Example #4
0
 protected void uC_buttons1_ButtonXoaClick(object sender, EventArgs e)
 {
     tacVu = 3;
     using (FormThem fThem = new FormThem(_idSelected, _chucNang))
     {
         if (fThem.ShowDialog() == DialogResult.OK)
         {
             if (_chucNang == 1)
             {
                 _context.XoaNhanVien(_idSelected);
             }
             else if (_chucNang == 3)
             {
                 _context.XoaDichVu(_idSelected);
             }
             else if (_chucNang == 4)
             {
                 _context.XoaThuoc(_idSelected);
             }
         }
     }
     //  fThem.UpdateEventHandler += F2_UpdateEventHandler1;// for refresh gridview
 }