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));
 }
Example #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));
 }
Example #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));
 }
Example #4
0
 public void Edit(int id, FucProposal f)
 {
     f.Idx = id;
     _repo.Remove(id);
     _repo.Add(id,f);
 }
Example #5
0
 public void Add(FucProposal td)
 {
     td.Idx = _cid;
     _repo.Add(_cid++, td);
 }