public async Task <ActionResult> Edit([Bind(Include = "AreaId,AreaName,AreaStatus")] DEInspectArea inspectArea) { if (ModelState.IsValid) { inspectArea.Rtp = WebSecurity.CurrentUserId; inspectArea.Rtt = DateTime.Now; db.Entry(inspectArea).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(inspectArea)); }
// GET: Admin/DEInspectArea/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DEInspectArea inspectArea = await db.DEInspectArea.FindAsync(id); if (inspectArea == null) { return(HttpNotFound()); } return(View(inspectArea)); }