コード例 #1
0
        private void btnThemTaiKhoan_Click(object sender, EventArgs e)
        {
            GiaoVu gv = new GiaoVu();

            using (frmThongTinGiaoVu frm = new frmThongTinGiaoVu(gv))
            {
                frm.Controls.Remove(frm.btnUpdate);
                frm.ShowDialog();
            }
        }
コード例 #2
0
 private void btnSuaThongTinTK_Click(object sender, EventArgs e)
 {
     Int32[] SelectedRowCollection = gvGiaoVu.GetSelectedRows();
     if (SelectedRowCollection.Length > 0)
     {
         GiaoVu CurrentSelected = bdDanhSachTaiKhoan.Current as GiaoVu;
         using (frmThongTinGiaoVu frm = new frmThongTinGiaoVu(CurrentSelected))
         {
             frm.Size = new Size(530, 283);
             frm.Controls.Remove(frm.lbPassword); frm.Controls.Remove(frm.lblcomfirmPassword);
             frm.Controls.Remove(frm.btnThuchienThemhocsinh); frm.Controls.Remove(frm.txtComfirm); frm.Controls.Remove(frm.txtPassword);
             frm.btnUpdate.Location = new Point(232, 199);
             frm.ShowDialog();
         }
     }
     else
     {
         MessageBox.Show("Chưa chọn gì sao mà xóa");
     }
 }