public ActionResult Edit(int id, FormCollection collection) { try { // TODO: Add update logic here var model = HourlyWage.GetById(id); TryUpdateModel(model); model.SaveOrUpDate(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here var model = new HourlyWage(); TryUpdateModel(model); model.CreatedAt = DateTime.Now; model.CreatedBy = SessionItems.CurrentUser.UserID; model.Insert(); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: HourlyWage/Edit/5 public ActionResult Edit(int id) { return(View(HourlyWage.GetById(id))); }
// GET: HourlyWage/Details/5 public ActionResult Details(int id) { return(View(HourlyWage.GetById(id))); }
// GET: HourlyWage public ActionResult Index() { return(View(HourlyWage.GetAll())); }