Ejemplo n.º 1
0
        public ActionResult Edit(int? id, string Title, int PollType, DateTime StartDate, DateTime EndDate, bool Closed)
        {
            PollBl poll = new PollBl();
            int _id = id != null ? int.Parse(id.ToString()) : 0;
            Poll _poll = poll.Save(_id, Title, PollType, StartDate, EndDate, Closed);

            return RedirectToAction("edit", "poll", new { id = _poll.Id });
        }
Ejemplo n.º 2
0
 public ActionResult Delete(int? id)
 {
     PollBl poll = new PollBl();
     if (id != null)
     {
         poll.Delete(int.Parse(id.ToString()));
     }
     return RedirectToAction("index");
 }