コード例 #1
0
        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));
        }
コード例 #2
0
        // 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));
        }