Exemplo n.º 1
0
        private void btnThemNV_Click(object sender, EventArgs e)
        {
            frmThemNhanVien frm = new frmThemNhanVien();

            frm.ShowDialog();
            LoadNhanVien();
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            string   tenDangNhap = gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "TenDangNhap").ToString();
            int      loaiTK      = int.Parse(gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "LoaiTaiKhoan").ToString());
            int      gioiTinh    = int.Parse(gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "ID_GioiTinh").ToString());
            string   soDienThoai = gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "SDT").ToString();
            string   email       = gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "Email").ToString();
            string   hoTen       = gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "HoTen").ToString();
            string   matKhau     = gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "MatKhau").ToString();
            DateTime ngaySinh    = DateTime.Parse(gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "NgaySinh").ToString());
            DateTime ngayVaoLam  = DateTime.Parse(gvNV.GetRowCellValue(gvNV.FocusedRowHandle, "NgayVaoLam").ToString());

            frmThemNhanVien frm = new frmThemNhanVien(tenDangNhap, hoTen, ngaySinh, gioiTinh, soDienThoai, email, ngayVaoLam, matKhau, loaiTK);

            frm.ShowDialog();
            LoadNhanVien();
        }