public ActionResult Create(FucProposal fp)
 {
     if (!ModelState.IsValid)
         return View(_newPropRepo.GetById(fp.Idx));
     fp.User = User.Identity.Name;
     _newPropRepo.Add(fp);
     return Redirect(string.Format("/{0}/{1}/{2}", "NewFucProposal", "Detail", fp.Idx));
 }
Esempio n. 2
0
 public ActionResult Edit(int id, string oracr, FucProposal f)
 {
     if (!ModelState.IsValid)
         return View(_proprepo.GetById(id));
     f.OriginalAcr = oracr;
     f.User = User.Identity.Name;
     _proprepo.Edit(id, f);
     //bruta!!
     return Redirect(string.Format("/{0}/{1}/{2}", "Proposal","Detail", f.Idx));
 }
Esempio n. 3
0
 public ActionResult Edit(string id, FucProposal f)
 {
     if (!ModelState.IsValid)
     {
         Response.StatusCode = 404;
         return View(_repo.GetByAcr(id));
     }
     f.User = User.Identity.Name;
     f.OriginalAcr = id;
     _proprepo.Add(f);
     return Redirect(string.Format("/{0}/{1}/{2}", "Proposal", "Detail", f.Idx));
 }
Esempio n. 4
0
 public void Edit(int id, FucProposal f)
 {
     f.Idx = id;
     _repo.Remove(id);
     _repo.Add(id,f);
 }
Esempio n. 5
0
 public void Add(FucProposal td)
 {
     td.Idx = _cid;
     _repo.Add(_cid++, td);
 }