Esempio n. 1
0
        private void btnCapNhat_Click(object sender, EventArgs e)
        {
            NguoiDungDTO ND = new NguoiDungDTO();

            ND.MaND      = txtMaNV.Text;
            ND.HoTen     = txtHoTen.Text;
            ND.Username  = txtUsername.Text;
            ND.DiaChi    = txtDiaChi.Text;
            ND.SoCMND    = txtCMND.Text;
            ND.PhanQuyen = cboPhanQuyen.SelectedItem.ToString();
            ND.DienThoai = txtDienThoai.Text;
            ND.GioiTinh  = cboGioiTinh.SelectedItem.ToString();
            if (NguoiDungBUS.SuaND(ND) == true)
            {
                MessageBox.Show("Cập nhật thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            else
            {
                MessageBox.Show("Cập nhật thất bại.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }