// GET: Admin/Variable/Details/5 public async Task <ActionResult> Details(String LINENAME, String PARTNO, String VARNAME) { ENG_VARIABLES eNG_VARIABLES = await db.ENG_VARIABLES.FindAsync(LINENAME, PARTNO, VARNAME); if (eNG_VARIABLES == null) { return(HttpNotFound()); } return(View(eNG_VARIABLES)); }
// GET: Admin/Variable public async Task <ActionResult> Index(ENG_VARIABLES Query) { ViewBag.Title = ModelName; ViewBag.SubTitle = "查询"; ViewBag.Query = Query; await InitSelect(Query.LINENAME); return(View(await db.ENG_VARIABLES .Where(l => (String.IsNullOrEmpty(Query.LINENAME) || l.LINENAME.Equals(Query.LINENAME)) && (String.IsNullOrEmpty(Query.VARNAME) || (l.VARNAME != null && l.VARNAME.IndexOf(Query.VARNAME) > -1))) .ToListAsync())); }
public async Task <ActionResult> DeleteConfirmed(String LINENAME, String PARTNO, String VARNAME) { ViewBag.Title = ModelName; ViewBag.SubTitle = "删除"; ENG_VARIABLES eNG_VARIABLES = await db.ENG_VARIABLES.FindAsync(LINENAME, PARTNO, VARNAME); db.ENG_VARIABLES.Remove(eNG_VARIABLES); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
// GET: Admin/Variable/Delete/5 public async Task <ActionResult> Delete(String LINENAME, String PARTNO, String VARNAME) { ViewBag.Title = ModelName; ViewBag.SubTitle = "删除"; ENG_VARIABLES eNG_VARIABLES = await db.ENG_VARIABLES.FindAsync(LINENAME, PARTNO, VARNAME); if (eNG_VARIABLES == null) { return(HttpNotFound()); } return(View(eNG_VARIABLES)); }
// GET: Admin/Variable/Edit/5 public async Task <ActionResult> Edit(String LINENAME, String PARTNO, String VARNAME) { ViewBag.Title = ModelName; ViewBag.SubTitle = "编辑"; ENG_VARIABLES eNG_VARIABLES = await db.ENG_VARIABLES.FindAsync(LINENAME, PARTNO, VARNAME); if (eNG_VARIABLES == null) { return(HttpNotFound()); } await InitSelect(eNG_VARIABLES.LINENAME, eNG_VARIABLES.PARTNO, eNG_VARIABLES.L_STNO); return(View(eNG_VARIABLES)); }
public async Task <ActionResult> Create([Bind(Include = "LINENAME,PARTNO,VARNAME,VARTYPE,L_STNO,VARDESC,VARVALUE,UPDATETIME")] ENG_VARIABLES eNG_VARIABLES) { ViewBag.Title = ModelName; ViewBag.SubTitle = "新建"; if (ModelState.IsValid) { if (String.IsNullOrEmpty(eNG_VARIABLES.LINENAME)) { eNG_VARIABLES.LINENAME = "ALL"; } db.ENG_VARIABLES.Add(eNG_VARIABLES); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } await InitSelect(eNG_VARIABLES.LINENAME, eNG_VARIABLES.PARTNO, eNG_VARIABLES.L_STNO); return(View(eNG_VARIABLES)); }