Beispiel #1
0
        public async Task <ActionResult> PostExec(ExecutedLabWork exLab)
        {
            if (exLab == null)
            {
                return(View("~/Views/Shared/Error.cshtml"));
            }

            if (await exLab.AddExec())
            {
                return(Redirect(Request.UrlReferrer.ToString()));
            }
            else
            {
                return(View("~/Views/Shared/Error.cshtml"));
            }
        }
Beispiel #2
0
        public async Task <ActionResult> GetExec(string studentFlowId, string subjectFlowId)
        {
            FlowSubject fSubject = await FlowSubject.GetInstanceAsync(subjectFlowId);

            var exLabs = await ExecutedLabWork.GetExec(studentFlowId);

            var workPlan = await LabWorkPlan.GetCollectionAsync(subjectFlowId);

            if (fSubject == null)
            {
                return(View("~/Views/Shared/Error.cshtml"));
            }

            ViewBag.exLabs        = exLabs;
            ViewBag.fSubject      = fSubject;
            ViewBag.workPlan      = workPlan;
            ViewBag.studentFlowId = studentFlowId;
            return(View("LabWorkStudent"));
        }