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