示例#1
0
        public ActionResult AddDeli(FormCollection fc)
        {
            string code     = fc["code"].ToString();
            string desc     = fc["desc"].ToString();
            int    co       = 7;
            string ass1     = fc["ass1"].ToString();
            string ass2     = fc["ass2"].ToString();
            int    syllabus = 1;

            Syllabus_ManagementEntities4 f = new Syllabus_ManagementEntities4();
            Course_Deliverable           d = new Course_Deliverable();

            d.outputName                = code;
            d.output_description        = desc;
            d.courseOutcomeAddressed_FK = co;
            d.assessmentTypeA           = ass1;
            d.assessmentTypeB           = ass2;
            d.syllabus_FK               = syllabus;

            try
            {
                f.Course_Deliverable.Add(d);
                f.SaveChanges();
                ViewBag.Result = "Saved";
            }
            catch (Exception e)
            {
                ViewBag.Result = e;
            }
            return(RedirectToAction("outputs_requirements", "Teacher"));
            //return View("../teacher/outputs_requirements");
        }
示例#2
0
        public ActionResult outputs_requirements()
        {
            Syllabus_ManagementEntities4 sm = new Syllabus_ManagementEntities4();
            Course_Deliverable D = new Course_Deliverable();
            var deliverableList = (from u in sm.Course_Deliverable
                              select u);
            ViewData["ListOfDeliverables"] = deliverableList.ToList();

            return View();
        }
示例#3
0
        public ActionResult UpdateDeliverablesAndRequirements()
        {
            Syllabus_ManagementEntities4 sm = new Syllabus_ManagementEntities4();
            Course_Deliverable           d  = new Course_Deliverable();
            int id = Convert.ToInt32(Request.QueryString["DRID"]);

            var c = (from u in sm.Course_Deliverable
                     where u.courseDeliverables_ID == id
                     select u).FirstOrDefault();

            ViewBag.id   = c.courseDeliverables_ID;
            ViewBag.name = c.outputName;
            ViewBag.desc = c.output_description;
            ViewBag.ass1 = c.assessmentTypeA;
            ViewBag.ass2 = c.assessmentTypeB;
            return(View());
        }
示例#4
0
        public ActionResult DeleteDeliverablesAndRequirements()
        {
            Syllabus_ManagementEntities4 sm = new Syllabus_ManagementEntities4();
            Course_Deliverable           d  = new Course_Deliverable();

            int id = Convert.ToInt32(Request.QueryString["DRID"]);

            var c = (from u in sm.Course_Deliverable
                     where u.courseDeliverables_ID == id
                     select u).FirstOrDefault();

            try
            {
                sm.Course_Deliverable.Remove(c);
                sm.SaveChanges();
            }
            catch (Exception e) {
                ViewBag.Result = e;
            }
            return(RedirectToAction("outputs_requirements", "Teacher"));
        }
示例#5
0
        public ActionResult UpdateNow2(FormCollection fc)
        {
            int    id   = Convert.ToInt32(Request.QueryString["id"]);
            string name = fc["name"].ToString();
            string desc = fc["desc"].ToString();
            string ass1 = fc["ass1"].ToString();
            string ass2 = fc["ass2"].ToString();

            Syllabus_ManagementEntities4 sm = new Syllabus_ManagementEntities4();
            Course_Deliverable           d  = new Course_Deliverable();

            var c = (from u in sm.Course_Deliverable
                     where u.courseDeliverables_ID == id
                     select u).FirstOrDefault();

            c.outputName         = name;
            c.output_description = desc;
            c.assessmentTypeA    = ass1;
            c.assessmentTypeB    = ass2;

            sm.SaveChanges();

            return(RedirectToAction("outputs_requirements", "Teacher"));
        }