public async Task <IActionResult> Create([Bind("ID,FullName,Birthday,Gender,Email,UserName,Password,DonViID")] ReportSLCLCBTheoDoTuoi reportSLCLCBTheoDoTuoi) { if (ModelState.IsValid) { _context.Add(reportSLCLCBTheoDoTuoi); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(reportSLCLCBTheoDoTuoi)); }
public async Task <IActionResult> Create([Bind("ID,MaDonVi,TenDonVi,RegionID,MaCha,Leve,STT,TenVietTat,KieuDonvi,DonViAllID,IsDeleted")] dmDonVi dmDonVi) { if (ModelState.IsValid) { _context.Add(dmDonVi); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(dmDonVi)); }
public async Task <IActionResult> Create([Bind("ID,CanBoID,TuThangNam,DenThangNam,GhiChu,isChuyenCT,IsDeleted")] QTCongTac qTCongTac) { if (ModelState.IsValid) { _context.Add(qTCongTac); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CanBoID"] = new SelectList(_context.CanBos, "ID", "HoTen", qTCongTac.CanBoID); return(View(qTCongTac)); }
public async Task <IActionResult> Create([Bind("ID,CanBoID,NgachID,BacLuong,NgayHuong,NgayKetThuc,ThoiHanNangBac,DaVuotKhung,SoQD,NguoiKy,NgayKy,HSCLBL,HeSo,PhuCapVuotKhung,PhuCapKhac,LuongCoBan,Kieu,Curent,NgachCuID,PhuCapChucVu,PhuCapTrachNhiem,PhuCapKhuVuc,BatDauGiuNgach,GhiChu,isTapSu,PhuCapUuDai,DonGiaDocHai,PhuCapDocHai,NgayBatDauGiuNgach,ThoiGianTapSu,PhuCapThuHut,PhuCapLuuDong,HeSoChenhLechBaoLuu,PhuCapDacBiet,PhuCapThamNien,ThamNienVungKhoKhan,IsDeleted")] DienBienNgachBac dienBienNgachBac) { if (ModelState.IsValid) { _context.Add(dienBienNgachBac); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CanBoID"] = new SelectList(_context.CanBos, "ID", "HoTen", dienBienNgachBac.CanBoID); ViewData["NgachID"] = new SelectList(_context.dmNgachs, "ID", "ID", dienBienNgachBac.NgachID); return(View(dienBienNgachBac)); }
public async Task <IActionResult> Create([Bind("ID,CanBoID,HinhThucKhenThuongID,NoiDung,NgayKhenThuong,IsCaoNhat,SoQuyetDinh,NgayKy,CoQuanBanHanhQD,IsKhenThuong,MucKhenThuong,IsDeleted")] QTKhenThuong qTKhenThuong) { if (ModelState.IsValid) { _context.Add(qTKhenThuong); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CanBoID"] = new SelectList(_context.CanBos, "ID", "HoTen", qTKhenThuong.CanBoID); ViewData["HinhThucKhenThuongID"] = new SelectList(_context.dmHinhThucKhenThuongs, "ID", "ID", qTKhenThuong.HinhThucKhenThuongID); return(View(qTKhenThuong)); }
public async Task <IActionResult> Create([Bind("ID,CanBoID,QuanHeGDID,HoTen,NamSinh,NgheNghiep,GhiChu,ThongTinKhac,ThongTinTCXH,QueQuan,Type,IsDeleted,ChucVu,CoQuan,HoKhau,DiaChi")] QuanHeGiaDinh quanHeGiaDinh) { if (ModelState.IsValid) { _context.Add(quanHeGiaDinh); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CanBoID"] = new SelectList(_context.CanBos, "ID", "HoTen", quanHeGiaDinh.CanBoID); ViewData["QuanHeGDID"] = new SelectList(_context.dmQuanHeGiaDinhs, "ID", "ID", quanHeGiaDinh.QuanHeGDID); return(View(quanHeGiaDinh)); }
public async Task <IActionResult> Create([Bind("ID,CanBoID,NgayKyLuat,KyLuatID,NoiDung,IsCaoNhat,SoQuyetDinh,CoQuanBanHanhQD,IsDeleted")] QTKyLuat qTKyLuat) { if (ModelState.IsValid) { _context.Add(qTKyLuat); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CanBoID"] = new SelectList(_context.CanBos, "ID", "HoTen", qTKyLuat.CanBoID); ViewData["KyLuatID"] = new SelectList(_context.dmKyLuats, "ID", "ID", qTKyLuat.KyLuatID); return(View(qTKyLuat)); }
public async Task <IActionResult> Create([Bind("ID,CanBoID,TuNgay,DenNgay,ChucVuID,PhuCapChucVu,Curent,isLeader,NgayBoNhiem,SoQuyetDinh,NguoiKy,PhongBanID,IsDangDoan,IsDeleted")] DienBienChucVu dienBienChucVu) { if (ModelState.IsValid) { _context.Add(dienBienChucVu); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CanBoID"] = new SelectList(_context.CanBos, "ID", "HoTen", dienBienChucVu.CanBoID); ViewData["ChucVuID"] = new SelectList(_context.dmChucVus, "ID", "ID", dienBienChucVu.ChucVuID); ViewData["PhongBanID"] = new SelectList(_context.dmDonVis, "ID", "ID", dienBienChucVu.PhongBanID); return(View(dienBienChucVu)); }
public async Task <IActionResult> Create([Bind("ID,Ma,SoHieu,HoTen,TenGoiKhac,GioiTinh,NgaySinh,DanTocID,TonGiaoID,DonViID,TrangThai,DienThoai,Email,CMTND,NgayCapCMT,NoiCapCMT,NoiSinhID,QueQuanID,HKTT,NoiO,TDPhoThongID,HochamID,NgheNghiepID,CoquanTuyenDung,NgayTuyen,NgayVeCQ,HinhThucThiTuyenID,KieuCanBo,NgayHetHanHD,CongViecDuocGiao,SoTruongCongTac,NgayVaoDang,NgayChinhThuc,NgayNhapNgu,NgayXuatNgu,QuanHamCaoNhatID,HangThuongBinhID,GiaDinhCSID,SucKhoeID,ChieuCao,CanNang,NhomMauID,SoBHXH,NoiCapSoBHXH,SoBHYT,LichSuBanThan,GhiChu,NhanXetDanhGia")] CanBo canBo, IFormFile ImageFile) { if (ModelState.IsValid) { if (ImageFile != null) { string day = DateTime.Now.ToString(); var filename = ContentDispositionHeaderValue.Parse(ImageFile.ContentDisposition).FileName.Trim('"'); var path = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "images", ImageFile.FileName); using (System.IO.Stream stream = new FileStream(path, FileMode.Create)) { await ImageFile.CopyToAsync(stream); } canBo.HinhAnh = filename; } _context.Add(canBo); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } if (ImageFile != null) { ViewData["Image_Notif"] = "Vui lòng chọn lại ảnh đại diện"; } ViewData["DanTocID"] = new SelectList(_context.dmDanTocs, "ID", "TenDanToc"); ViewData["TonGiaoID"] = new SelectList(_context.dmTonGiaos, "ID", "TenTonGiao"); ViewData["TDPhoThongID"] = new SelectList(_context.dmTrinhDoPTs, "ID", "TenTrinhDo"); ViewData["HocHamID"] = new SelectList(_context.dmHocHams, "ID", "TenHocHam"); ViewData["NgheNghiepID"] = new SelectList(_context.dmNgheNghieps, "ID", "TenNgheNghiep"); ViewData["TDPhoThongID"] = new SelectList(_context.dmTrinhDoPTs, "ID", "TenTrinhDo"); ViewData["NgheNghiepID"] = new SelectList(_context.dmNgheNghieps, "ID", "TenNgheNghiep"); ViewData["HinhThucThiTuyenID"] = new SelectList(_context.dmHinhThucThiTuyens, "ID", "TenHinhThucTT"); ViewData["QuanHamCaoNhatID"] = new SelectList(_context.dmQuanHams, "ID", "TenQuanHam"); ViewData["HangThuongBinhID"] = new SelectList(_context.dmHangThuongBinhs, "ID", "TenHangThuongBinh"); ViewData["GiaDinhCSID"] = new SelectList(_context.dmGiaDinhCSs, "ID", "TenGiaDinhCS"); ViewData["SucKhoeID"] = new SelectList(_context.dmTinhTrangSucKhoes, "ID", "TenTTSK"); ViewData["DonViID"] = new SelectList(_context.dmDonVis, "ID", "TenDonVi"); ViewData["KieuCanBo"] = new SelectList(_context.dmKieuCanBo, "ID", "TenKieuCanBo"); return(View(canBo)); }