public async Task <ActionResult> LabPlan(string fsid) { var subflow = await FlowSubject.GetInstanceAsync(fsid); ViewBag.subflow = subflow; var workplan = await LabWorkPlan.GetCollectionAsync(fsid); ViewBag.workplan = workplan; var works = await Models.Lab.GetCollectionAsync(); ViewBag.works = works; return(View("PlanLab")); }
public async Task <ActionResult> AddToFlow(FlowSubject flowSubject) { bool result = await Models.Subject.AddToFlow(flowSubject); if (result) { return(Redirect(Request.UrlReferrer.ToString())); } else { return(View("~/Views/Shared/Error.cshtml")); } }
public async Task <ActionResult> FlowSubjectM(string id) { if (id != null) { FlowSubject subject = await FlowSubject.GetInstanceAsync(id); ViewBag.subject = subject; return(View("FlowSubject")); } else { return(View("~/Views/Shared/Error.cshtml")); } }
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")); }