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: Crane/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } 起重设备台帐 起重设备台帐 = await db.起重设备台帐.FindAsync(id); if (起重设备台帐 == null) { return(HttpNotFound()); } return(View(起重设备台帐)); }