示例#1
0
        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"));
        }
示例#2
0
        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"));
            }
        }
示例#3
0
        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"));
            }
        }
示例#4
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"));
        }