示例#1
0
        protected void butCV_Click(object sender, EventArgs e)
        {
            CV_KinhNghiemLamViecBUS busKNLV = new CV_KinhNghiemLamViecBUS();
            CV_NewBUS busCV = new CV_NewBUS();
            CV_QuaTrinhHocVanBUS busQTHV = new CV_QuaTrinhHocVanBUS();
            CV_ThongTinBoSungBUS busTTBS = new CV_ThongTinBoSungBUS();
            CV_ThongTinUngDungBUS busTTUD = new CV_ThongTinUngDungBUS();
            CV_ViecLamMongMuonBUS busVLMM = new CV_ViecLamMongMuonBUS();

            int idNTV = CurrentUser.ID;

            CV_ThongTinUngDungDTO dtoTTUD = new CV_ThongTinUngDungDTO();
            dtoTTUD.KinhNghiem = cbxTTUngDung_KinhNghiem.Value;
            dtoTTUD.BangCap = cbxTTUngDung_BangCap.Value;
            dtoTTUD.CapBac = cbxTTUngDung_CapBac.Value;
            dtoTTUD.NgoaiNgu = cbxTTUngDung_LoaiNgoaiNgu.Value;
            if (rbTTUngDung_ChuyenCho_Option.Checked)
            {
                dtoTTUD.ChuyenChoO = "Tùy trường hợp";
            }
            else if (rbTTUngDung_ChuyenCho_Yes.Checked)
            {
                dtoTTUD.ChuyenChoO = "Có";
            }
            else if (rdTTUngDung_ChuyenCho_No.Checked)
            {
                dtoTTUD.ChuyenChoO = "Không";
            }

            if (rdTTUngDung_CongTac_No.Checked)
            {
                dtoTTUD.DiCongtac = "Không";
            }
            else if (rdTTUngDung_CongTac_Yes.Checked)
            {
                dtoTTUD.DiCongtac = "Có";
            }
            else if (rdTTUngDung_CongTac_Option.Checked)
            {
                dtoTTUD.DiCongtac = "Tùy trường hợp";
            }

            if (rdTTUngDung_LamNgoaiGio_No.Checked)
            {
                dtoTTUD.LamNgoaiGio = "Không";
            }
            else if (rdTTUngDung_LamNgoaigio_Yes.Checked)
            {
                dtoTTUD.LamNgoaiGio = "Có";
            }
            else if (rdTTUngDung_LamNgoaiGio_Option.Checked)
            {
                dtoTTUD.LamNgoaiGio = "Tùy trường hợp";
            }
            int idTTUD = busTTUD.Insert(dtoTTUD);

            CV_ViecLamMongMuonDTO dtoVLMM = new CV_ViecLamMongMuonDTO();
            dtoVLMM.MucLuong = cbxVLMongMuon_MucLuongDeNghi.Value;
            dtoVLMM.NoiLamViec = cbxVLMongMuon_NoiLamViec.Value;
            dtoVLMM.NganhNgheMongMuon = cbxVLMongMuon_NganhNghe.Value;
            dtoVLMM.ViTriMongMuon = tbxVLMongMuon_ViTri.Value;
            if (cbVLMongMuon_HinhThucCongViec_ChinhThuc.Checked)
            {
                dtoVLMM.HinhThucLamViec = "Nhân viên chính thức";
            }
            else if (cbVLMongMuon_HinhThucCongViec_TuDo.Checked)
            {
                dtoVLMM.HinhThucLamViec = "Tự do";
            }
            else if (cbVLMongMuon_HinhThucCongViec_ThoiVu.Checked)
            {
                dtoVLMM.HinhThucLamViec = "Nhân viên thời vụ";
            }

            if (cbVLMongMuon_LaiCongViec_Parttime.Checked)
            {
                dtoVLMM.LoaiHinhCongViec = "Part-time";
            }
            else if (cbVLMongMuon_LoaiCongViec_Fulltime.Checked)
            {
                dtoVLMM.LoaiHinhCongViec = "Full-time";
            }
            int idVLMM = busVLMM.Insert(dtoVLMM);

            CV_QuaTrinhHocVanDTO dtoQTHV = new CV_QuaTrinhHocVanDTO();
            dtoQTHV.TenTruong = tbxQuaTrinhHocTap_TenTruong.Value;
            dtoQTHV.ChuyenNganh = tbxQuaTrinhHocTap_ChuyenNganh.Value;
            dtoQTHV.BangCap = cbxQuaTrinhHocTap_BangCap.Value;
            dtoQTHV.NamTotNghiep = DateTime.Parse(tbxNgayTotNghiep.Text).Year;
            int idQTHV = busQTHV.Insert(dtoQTHV);

            CV_KinhNghiemLamViecDTO dtoKNLV = new CV_KinhNghiemLamViecDTO();
            dtoKNLV.MoTa = tbxKNLV_MoTa.Value;
            dtoKNLV.TenCongTy = tbxKNLV_TenCongTy.Value;
            dtoKNLV.TinhTP = cbxKNLV_TinhTP.Value;
            dtoKNLV.ViTri = tbxKNLV_ViTriCongViec.Value;
            dtoKNLV.ThoiGianBatDau = new DateTime(int.Parse(cbxKNLV_Begin_Year.Value), int.Parse(cbxKNLV_Begin_Month.Value), 1);
            dtoKNLV.ThoiGianKetThuc = new DateTime(int.Parse(cbxKNLV_End_Year.Value), int.Parse(cbxKNLV_End_Month.Value), 1);
            int idKNLV = busKNLV.Insert(dtoKNLV);

            CV_ThongTinBoSungDTO dtoTTBS = new CV_ThongTinBoSungDTO();
            dtoTTBS.KyNang = tbxKynang.Value;
            dtoTTBS.MucTieuNgheNghiep = tbxMucTieu.Value;
            dtoTTBS.NangKhieuSoThich = tbxNangKhieuSoThich.Value;
            dtoTTBS.UuDiemKhuyetDiem = tbxUuDiemNhuocDiem.Value;
            int idTTBS = busTTBS.Insert(dtoTTBS);

            CV_NewDTO newCV = new CV_NewDTO();
            newCV.IDKinhNghiem = idKNLV;
            newCV.IDNguoiTimViec = CurrentUser.ID;
            newCV.IDQuaTrinhHocTap = idQTHV;
            newCV.IDThongTinBoSung = idTTBS;
            newCV.IDThongTinUngDung = idTTUD;
            newCV.IDViecLamMongMuon = idVLMM;
            int kq = busCV.Insert(newCV);
        }
示例#2
0
 public int Insert(CV_ThongTinBoSungDTO record)
 {
     CV_ThongTinBoSungDAO dao = new CV_ThongTinBoSungDAO();
     return dao.Insert(record);
 }