예제 #1
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string   maNV     = txtMaNV.Text;
            string   tenNV    = txtHoTen.Text;
            DateTime ngaySinh = dtpNgaySinh.Value;
            double   luongCB  = double.Parse(txtLuongCB.Text);
            int      ngayCong = int.Parse(txtNgayCong.Text);
            double   phuCap   = double.Parse(txtPhuCap.Text);
            string   maCV     = cboCV.SelectedValue.ToString();

            NhanVien    nv    = new NhanVien(maNV, tenNV, ngaySinh, luongCB, ngayCong, phuCap, maCV);
            NhanVienBUL nvBUL = new NhanVienBUL();

            if (nvBUL.SuaNhanVien(nv))
            {
                MessageBox.Show("Cập nhập bản ghi thành công!");
                ResetFields();
            }
            else
            {
                MessageBox.Show("Cập nhập bản ghi thất bại!");
                ResetFields();
            }
        }