public async Task <ActionResult> DeleteConfirmed(int id) { 电梯台帐 电梯台帐 = await db.电梯台帐.FindAsync(id); db.电梯台帐.Remove(电梯台帐); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "序号,本次检验日期,下次检验日期,是否已检,设备代码,设备状态,设备等级,内部编号,安全管理人员,是否移交,移交日期,原,检,登,所属分厂,属地部门,设备名称,设备型号,设备制造单位,产品编号,出厂日期,始用时间,固定资产编号,维修次数")] 电梯台帐 电梯台帐) { if (ModelState.IsValid) { db.Entry(电梯台帐).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(电梯台帐)); }
// GET: 电梯台帐/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } 电梯台帐 电梯台帐 = await db.电梯台帐.FindAsync(id); if (电梯台帐 == null) { return(HttpNotFound()); } return(View(电梯台帐)); }