public ActionResult Add() { DailyHours d = new DailyHours(); d.getNames(); return(View(d)); }
public ActionResult Add(DailyHours h) { //if (ModelState.IsValid) /// { h.InsertDailyhours(h); ModelState.Clear(); DailyHours d = new DailyHours(); d.getNames(); return(View(d)); // } // else // return View(h); }
public ActionResult Add(DailyHours h) { if (h == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (h == null) { return(HttpNotFound()); } h.InsertDailyhours(h); ModelState.Clear(); DailyHours d = new DailyHours(); d.getNames(); return(View(d)); }