// GET: WhuWxiu/Edit/5 public ActionResult Edit(int id) { ShengCheng(); //查询陪同人员 FillClass(); //查询检测人员 info_Maintenance im = img.SelectWhere(e => e.MIDs == id).FirstOrDefault(); info_Software ies = isb.SelectWhere(e => e.SID == im.MDeviceName).FirstOrDefault(); ViewData["a"] = ies.Sdynacomm; return(View(im)); }
// GET: Maintain/Details/5 // //进入机房维护维修查看页面 public ActionResult MaintainLook(int id) { ShengCheng(); //查询陪同人员 FillClass(); //查询检测人员 info_Maintenance im = img.SelectWhere(e => e.MIDs == id).FirstOrDefault(); info_Asset ies = iab.SelectWhere(e => e.AID == im.MDeviceName).FirstOrDefault(); ViewData["a"] = ies.AName; return(View(im)); }
public ActionResult Create(info_Maintenance imc) { int add = img.Add(imc); if (add > 0) { return(Content("ok")); } else { return(Content("<script>alert('添加失败!');window.location.href='Index'</script>")); } }
public ActionResult Edit(info_Maintenance im) { //info_Maintenance ims = img.SelectWhere(e => e.MIDs == im.MIDs).FirstOrDefault(); int update = img.Update(im); if (update > 0) { return(Content("<script>alert('修改成功!');window.location.href='/WhuWxiu/Index'</script>")); } else { return(Content("<script>alert('修改失败!');window.location.href='Index'</script>")); } }
//点击机房维护维修查看 public ActionResult SelectTongJiWeiHuWeiXiuChaKan(int id) { info_Maintenance im = img.SelectWhere(e => e.MIDs == id).FirstOrDefault(); info_Software iss = isb.SelectWhere(e => e.SID == im.MDeviceName).FirstOrDefault(); ViewData["a"] = iss.Sdynacomm; //查询陪同人员 int mm = Convert.ToInt32(im.MAccompanyingOfficials); info_User iu = iud.SelectWhere(e => e.UserID == mm).FirstOrDefault(); ViewData["p"] = iu.UserRealName; //查询检测人员 int rr = Convert.ToInt32(im.MTestingPersonnel); info_ComputerRoomVisit ir = lcr.SelectWheres(e => e.CID == rr).FirstOrDefault(); ViewData["s"] = ir.CName; return(View(im)); }
public int Update(info_Maintenance t) { return(iad.Update(t)); }
public int Delete(info_Maintenance t) { return(iad.Delete(t)); }
public int Add(info_Maintenance t) { return(iad.Add(t)); }