public void UpdateTest() { ProgDec progDec = ProgDecManager.LoadById(6); progDec.ProgramId = 13; Assert.IsTrue(ProgDecManager.Update(progDec) > 0); }
public ActionResult AddToCart(int id) { GetShoppingCart(); BL.Models.ProgDec progDec = ProgDecManager.LoadById(id); ShoppingCartManager.Add(cart, progDec); Session["cart"] = cart; return(RedirectToAction("Index", "ProgDec")); }
// GET: ProgDec/Edit/5 public ActionResult Edit(int id) { ProgDecProgramsStudents pps = new ProgDecProgramsStudents(); pps.ProgDec = ProgDecManager.LoadById(id); pps.Programs = ProgramManager.Load(); pps.Students = StudentManager.Load(); pps.Advisors = AdvisorManager.Load(); //load them all pps.ProgDec.Advisors = ProgDecManager.LoadAdvisors(id); pps.AdvisorIds = pps.ProgDec.Advisors.Select(a => a.Id); //Select the ids //Put Existing Advisors into Session Session["advisorids"] = pps.AdvisorIds; return(View(pps)); }
// GET: api/ProgDec/5 public ProgramDec.BL.Models.ProgDec Get(int id) { ProgramDec.BL.Models.ProgDec progDec = ProgDecManager.LoadById(id); return(progDec); }
// GET: ProgDec/Details/5 public ActionResult Details(int id) { var progdec = ProgDecManager.LoadById(id); return(View(progdec)); }
// GET: ProgDec/Delete/5 public ActionResult Delete(int id) { BL.Models.ProgDec progdec = ProgDecManager.LoadById(id); return(View(progdec)); }