예제 #1
0
 public IActionResult OnGet(int taskId)
 {
     MyTask = taskData.GetById(taskId);
     if (MyTask == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
예제 #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());
        }
예제 #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());
        }
예제 #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());
        }