Beispiel #1
0
        public newStaffViewModel()
        {
            var db = new PMDataEntities();

            numNewStaff    = db.Staffs.Count();
            lblNumNewStaff = "Number of Staff in the PMDB";
        }
        public AllEducationsViewModel()
        {
            Educations = new List <Education>();
            Degrees    = new List <Adm_Degree>();

            PMDataEntities db = new PMDataEntities();

            Degrees    = db.Adm_Degrees.ToList();
            Educations = db.Educations.ToList();
        }
        public StaffDashboardViewModel()
        {
            PMDataEntities db = new PMDataEntities();

            SelectedStaffData        = new SelectedStaffDataViewModel();
            AllStaffData             = new AllStaffViewModel();
            AllSkillsData            = new AllSkillsViewModel();
            AllEducationsData        = new AllEducationsViewModel();
            ManageSkillDataList      = new List <ManageSkillViewModel>();
            ManageEducationsDataList = new List <ManageStaffEducationsViewModel>();

            var staffs = db.Staffs.Include(s => s.Adm_Exit_Reason).Include(s => s.Adm_Prefix).Include(s => s.Adm_Suffix).Include(s => s.Ref_Company).Include(s => s.Staff_Clearance);

            AllStaffData.Staff = staffs.ToList();
        }