Ejemplo n.º 1
0
        // GET: LuongController
        public ActionResult Index()
        {
            var model = new ViewModelBL();

            model.ListNhanVien       = database.NhanViens.ToArray();
            model.ListHopDongLaoDong = database.HopDongLaoDongs.ToArray();
            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult DetailsQuanLy(int id)
        {
            var model = new ViewModelBL();

            model.ListNhanVien       = database.NhanViens.ToArray();
            model.ListPhongBan       = database.PhongBans.ToArray();
            model.ListChucVu         = database.ChucVus.ToArray();
            model.ListkyLuat         = database.KyLuats.ToArray();
            model.ListloaiKyLuat     = database.LoaiKyLuats.ToArray();
            model.ListkhenThuong     = database.KhenThuongs.ToArray();
            model.ListLoaikhenThuong = database.LoaiKhenThuongs.ToArray();
            model.ListChamCong       = database.ChamCongs.ToArray();
            model.ListHopDongLaoDong = database.HopDongLaoDongs.ToArray();
            model.nhanVien           = database.NhanViens.Where(x => x.Idnv == id).FirstOrDefault();
            model.taiKhoan           = database.TaiKhoans.Where(x => x.Idnv == id).FirstOrDefault();

            HttpContext.Session.SetString("IDNV", model.nhanVien.Idnv.ToString());
            return(View(model));
        }