Exemplo n.º 1
0
 public static DAL.Dairy GetDairy(DTO.NewFolder1.Dairy Dairydto)
 {
     if (Dairydto == null)
     {
         return(null);
     }
     DAL.Dairy dairy = new DAL.Dairy()
     {
         DairyId     = Dairydto.DairyId,
         start       = Dairydto.start,
         end         = Dairydto.end,
         RoomId      = Dairydto.RoomId,
         Description = Dairydto.Description,
         TypeMeeting = Dairydto.TypeMeeting,
         UserId      = Dairydto.UserId,
         title       = Dairydto.title,
         //color=Dairydto.color,
         Rooms        = NewFolder1.Room.GetRoom(Dairydto.Rooms),
         TypeMeeting1 = NewFolder1.TypeMeeting.GetTypeMeeting(Dairydto.TypeMeeting1),
         users        = NewFolder1.user.GetUser(Dairydto.users),
     };
     return(dairy);
 }
Exemplo n.º 2
0
        public static Dairy GetDairy(DAL.Dairy d)
        {
            if (d == null)
            {
                return(null);
            }
            Dairy dto = new Dairy()
            {
                DairyId     = d.DairyId,
                start       = d.start.Value,
                end         = d.end.Value,
                RoomId      = d.RoomId.Value,
                Description = d.Description,
                TypeMeeting = Convert.ToInt32(d.TypeMeeting),
                UserId      = d.UserId,
                title       = d.title,

                Rooms        = NewFolder1.Room.GetRoom(d.Rooms),
                TypeMeeting1 = NewFolder1.TypeMeeting.GetTypeMeeting(d.TypeMeeting1),
                users        = NewFolder1.user.GetUser(d.users)
            };

            return(dto);
        }