Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 private void OnDateTimeSubmitted(DateTime datetime)
 {
     DateRequested  = RoundUp(datetime, TimeSpan.FromMinutes(15));
     PrintTimeLabel = "Print Time: " + DateRequested.ToString();
 }