Ejemplo n.º 1
0
        public List <ServiceTypeDAO> GetTypes()
        {
            var s = new List <ServiceTypeDAO>();

            foreach (var service in ef.GetTypes())
            {
                s.Add(ServiceTypeMapper.MapToServiceTypeDAO(service));
            }
            return(s);
        }
Ejemplo n.º 2
0
        public static JobDAO MapToJobDAO(ScheduleJob job)
        {
            var ef = new EfData();
            var c  = new JobDAO();

            c.Id                = job.Id;
            c.ServiceTypeID     = job.ServiceTypeID;
            c.ServiceType       = ServiceTypeMapper.MapToServiceTypeDAO(job.ServiceType);
            c.ClientID          = job.ClientID;
            c.Client            = ClientMapper.MapToClientDAO(job.Client);
            c.User              = UserMapper.MapToUserDAO(ef.GetUsers().Where(x => x.Id == job.UserID).FirstOrDefault());
            c.UserID            = job.UserID;
            c.StartDate         = job.StartDate;
            c.EndDate           = job.EndDate;
            c.EstimatedDuration = job.EstimatedDuration;
            c.Notes             = job.Notes;
            c.Hours             = job.Hours;
            c.Complete          = job.Complete;

            return(c);
        }