// GET: RalliesViewModels/Edit/5 public ActionResult Edit(int id) { // TODO HARDCODED ID NEEDS TO BE DYNAMIC RalliesViewModel rallyProfile = Irally.ViewRallies(id); return(View(rallyProfile)); }
public ActionResult Edit([Bind(Include = "RalliesID,CandidateID,CandidateName,Date,Location,Description")] RalliesViewModel ralliesViewModel) { if (ModelState.IsValid) { Irally.EditRallies(ralliesViewModel); return(RedirectToAction("Index")); } return(View(ralliesViewModel)); }
// GET: RalliesViewModels/Details/5 public ActionResult Details(int id) { RalliesViewModel RalliesProfile = Irally.ViewRallies(id); if (RalliesProfile == null) { return(HttpNotFound()); } return(View(RalliesProfile)); }
public void CreateRallies(RalliesViewModel irally) { dataGatewayRallies.Insert(irally); dataGatewayRallies.Save(); }
public void EditRallies(RalliesViewModel irally) { dataGatewayRallies.Update(irally); dataGatewayRallies.Save(); }