// GET: Technology/Edit/5技术支持内容等级id查询 public ActionResult Edit(int id) { FillClass(); //查询软件名称 FillQuestion(); //查询问题分类 FillSection(); //查询部门 ViewData["urm"] = Session["UserRealName"]; //登记人 info_Technology it = itb.SelectWhere(e => e.TID == id).FirstOrDefault(); return(View(it)); }
public ActionResult Edit(info_Technology it) { int update = itb.Update(it); if (update > 0) { return(Content("<script>alert('修改成功!');window.location.href='/Technology/Index'</script>")); } else { return(Content("<script>alert('修改失败!');window.location.href='Index'</script>")); } }
public ActionResult Create(info_Technology it) { it.TUserId = (int)Session["UserID"]; int add = itb.Add(it); if (add > 0) { return(Content("ok")); } else { return(Content("<script>alert('添加失败!');window.location.href='Index'</script>")); } }
// GET: Technology/Delete/5技术支持内容等级删除 public ActionResult Delete(int id) { info_Technology it = new info_Technology(); it.TID = id; int del = itb.Delete(it); if (del > 0) { return(Content("<script>alert('删除成功!');window.location.href='/Technology/Index'</script>")); } else { return(Content("<script>alert('删除失败!');window.location.href='Index'</script>")); } }
public int Delete(info_Technology a) { return(imd.Delete(a)); }
public int Update(info_Technology t) { return(imd.Update(t)); }
public int Add(info_Technology t) { return(imd.Add(t)); }