public RequestDetailsViewModel(RequestViewModel request) { if (request.DateMade != null) { DateMade = request.DateMade; } if (request.DateRequested != null && request.DateRequested != new DateTime()) { DateRequested = request.DateRequested; } else { DateRequested = RoundUp(DateTime.Now, TimeSpan.FromMinutes(15)); } ID = request.Id; Duration = request.Duration; ProjectName = request.ProjectName; ProjectDescript = request.ProjectDescript; ProjectFilePath = request.ProjectFilePath; PersonalUse = request.PersonalUse; Request = request; Status = request.Status; Printer = request.Printer; User = request.User; PrintTimeLabel = "Print Time: " + DateRequested.ToString(); SaveOrUpdateCommand = new SaveOrUpdateCommand(this); DeleteCommand = new DeleteCommand(this); PushChatPagesCommand = new PushChatPagesCommand(this); FilePickerCommand = new FilePickerCommand(this); SetDateCommand = new SetDateCommand(this); }
private void OnDateTimeSubmitted(DateTime datetime) { DateRequested = RoundUp(datetime, TimeSpan.FromMinutes(15)); PrintTimeLabel = "Print Time: " + DateRequested.ToString(); }