Exemplo n.º 1
0
        private void btnSuaNhanVien_Click(object sender, EventArgs e)
        {
            NhanVien nv = new NhanVien(txtMaNhanVien.Text, txtTenNhanVien.Text, txtDiaChi.Text, txtSoDienThoai.Text);

            bulnv.suaNhanVien(nv);
            MessageBox.Show("Sửa Nhân Viên Thành Công", "Sửa Nhân Viên", MessageBoxButtons.OK);
        }
Exemplo n.º 2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            try
            {
                BULTaiKhoan bultk = new BULTaiKhoan();
                bultk.suaTaiKhoan(new TaiKhoan(txtTaiKhoan.Text, txtMatKhau.Text, cbQuyen.Text));

                BULNhanVien bul = new BULNhanVien();
                bul.suaNhanVien(new NhanVien(int.Parse(txtMaNhanVien.Text), txtTenNhanVien.Text, txtSoDienThoai.Text, txtChungMinhThu.Text, txtTaiKhoan.Text));
                frmST.hienDanhSachNhanVien();
                MessageBox.Show("Sửa thành công", "Thành công", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            catch (Exception)
            {
                MessageBox.Show("Thao tác thất bạt, dữ liệu sai", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }