Esempio n. 1
0
        public void Location_Update(Location item)
        {
            using (WorkScheduleContext context = new WorkScheduleContext())
            {
                context.Entry<Location>(context.Locations.Attach(item)).State = System.Data.Entity.EntityState.Modified;

                context.SaveChanges();
            }
        }
Esempio n. 2
0
 public List<Location> LocationList()
 {
     using (var context = new WorkScheduleContext())
     {
         var results = from item in context.Locations
                       orderby item.LocationID
                       select item;
         return results.ToList();
     }
 }
Esempio n. 3
0
        public List<Employees> EmployeeList()
        {
            using (var context = new WorkScheduleContext())
            {
                var results = from item in context.Employees
                              orderby item.EmployeeID
                              select item;
                return results.ToList();

            }
        }
Esempio n. 4
0
        public void Location_Add(Location item)
        {
            using (WorkScheduleContext context = new WorkScheduleContext())
            {
                Location added = null;

                added = context.Locations.Add(item);

                context.SaveChanges();

            }
        }
Esempio n. 5
0
        public List<POCOs.EmployeeSkillsMenuItem> GetReportESMenuItems()
        {
            using (WorkScheduleContext context = new WorkScheduleContext())
            {
                var results = from cat in context.EmployeeSkills
                              orderby cat.Skills.Description
                              select new POCOs.EmployeeSkillsMenuItem
                              {
                                  SkillDescription = cat.Skills.Description,
                                  FullName = cat.Employee.LastName + ", " + cat.Employee.FirstName,
                                  Phone = cat.Employee.HomePhone,
                                  Level = cat.Level.ToString(),
                                  YOE = Convert.ToInt32(cat.YearsOfExperience)
                              };
                return results.ToList();

            }
        }
Esempio n. 6
0
 public List<PlacementContracts> PCList()
 {
     using (var context = new WorkScheduleContext())
     {
         var results = from item in context.PlacementContracts
                       orderby item.PlacementContractID
                       select item;
         return results.ToList();
     }
 }
Esempio n. 7
0
 public List<Skills> SkillList()
 {
     using (var context = new WorkScheduleContext())
     {
         var results = from item in context.Skills
                       orderby item.SkillID
                       select item;
         return results.ToList();
     }
 }