Beispiel #1
0
 public IActionResult OnGet(int taskId)
 {
     MyTask = taskData.GetById(taskId);
     if (MyTask == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Beispiel #2
0
        public IActionResult OnGet(int taskId)
        {
            MyTask = taskData.GetById(taskId);

            if (MyTask == null)
            {
                return(RedirectToPage("./NotFound"));
            }

            TaskStat = taskData.AddNewLine(TaskStat, DateTime.Now.ToString(), DateTime.Now.ToString());

            //TaskStat.StartTime = DateTime.Now.ToString();

            return(Page());
        }
Beispiel #3
0
        public IActionResult OnGet(int?taskId)
        {
            SelectType = htmlHelper.GetEnumSelectList <TaskType>();


            if (taskId.HasValue)
            {
                MyTask = taskData.GetById(taskId.Value);
            }

            else
            {
                MyTask = new MyTask();
            }

            if (MyTask == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            return(Page());
        }
Beispiel #4
0
        public IActionResult OnGet(int?taskId)
        {
            Status   = _htmlHelper.GetEnumSelectList <TaskStatus>();
            Priority = _htmlHelper.GetEnumSelectList <TaskPriority>();

            if (taskId.HasValue)
            {
                Task = _taskData.GetById(taskId.Value);
            }
            else
            {
                Task = new TaskItem();
            }

            if (Task == null)
            {
                return(RedirectToPage("./NotFound"));
            }

            return(Page());
        }