コード例 #1
0
        private void Them()
        {
            NhanVienEntity nv = new NhanVienEntity();

            nv.HoTen       = txtTen.Text;
            nv.DiaChi      = txtDiaChi.Text;
            nv.GhiChu      = txtGhiChu.Text;
            nv.MaChucVu    = cboChucVu.SelectedValue.ToString();
            nv.MaPB        = cboPhongBan.SelectedValue.ToString();
            nv.MaChuyenMon = cboChuyenMon.SelectedValue.ToString();
            nv.NgaySinh    = dtNgaySinh.Value.ToString();
            if (ckNam.Checked == true)
            {
                nv.GioiTinh = "Nam";
            }
            else
            {
                nv.GioiTinh = "Nữ";
            }
            NhanVienBus nhanv = new NhanVienBus();

            nhanv.Them(nv);
        }