public HandlerDetailsModel(int id, bool isAdmin = false) : base() { EnteredShows = ShowEntered.GetEnteredShows(id); SavedShows = Shows.getSavedShows(id); var msgs = Messenger.GetMessages(); Messages = new List<MessengerModel>(); foreach (var messengerDto in msgs) { Messages.Add(new MessengerModel() { Id = messengerDto.Id, CreatedDate = messengerDto.CreatedDate, EndDate = messengerDto.EndDate, Message = messengerDto.Message }); } Dogs = Business.Dogs.GetAllDogsForHandler(id, DateTime.Now); AvailableShows = Shows.getPublishedShows(id); if (isAdmin) UnpublishedShows = Shows.GetUnpublishedShows(); var user = new User(id); UserName = user.Name; LongTimeLogin = (user.LastLoginDate - DateTime.Now).Days < -25; user.UpdateLogin(); }