//待审核保存 public ActionResult DaiShenHe(info_ComputerRoomVisit ifc) { info_ComputerRoomVisit cm = lcr.SelectWheres(e => e.CID == ifc.CID).FirstOrDefault(); if (ifc.CXuanXiang == 1) { cm.CRelustID = 2; cm.CBringOut = ifc.CBringOut; } else { cm.CRelustID = 3; } cm.CInstructor = ifc.CRegistar; cm.CInstructorTime = DateTime.Now; cm.COpinion = ifc.COpinion; int cz = lcr.Update(cm); if (cz > 0) { return(Content("<script>alert('提交成功');window.location.href='/JiFang/ShenPiShiTu'</script>")); } else { return(Content("<script>alert('提交失败');window.location.href='JiFang/ShenPiShiTu'</script>")); } }
[HttpPost]//机房出入申请的添加操作 public ActionResult Create(info_ComputerRoomVisit crv) { try { if (crv.CName == "" || crv.CName == null || crv.Cause == null || crv.Cause == "" || crv.Cause == null || crv.Cause == "") { return(Content("nook")); } else { crv.CRelustID = 1; crv.CEntryTime = DateTime.Now; crv.CLeaveTime = DateTime.Now; crv.CRegistar = Session["UserRealName"].ToString(); int tianjia = lcr.Add(crv); if (tianjia > 0) { return(Content("OK")); } else { return(Content("nook")); } } } catch { return(View()); } }
//待审核 public ActionResult DaiShenHe(int id) { //DengJiRen(); info_ComputerRoomVisit lfc = lcr.SelectWheres(e => e.CID == id).FirstOrDefault(); ChaXunPeiTong(id); return(View(lfc)); }
public ActionResult Edit(info_ComputerRoomVisit cr) { try { int cmr = lcr.Update(cr); if (cmr > 0) { return(Content("<script>alert('修改成功');window.location.href='Index'</script>")); } else { return(Content("<script>alert('修改失败');window.location.href='Edit'</script>")); } } catch { return(View()); } }
//点击机房维护维修查看 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_ComputerRoomVisit cr) { return(iud.Update(cr)); }
//删除机房记录 public int Delete(info_ComputerRoomVisit cr) { return(iud.Delete(cr)); }
//添加机房记录 public int Add(info_ComputerRoomVisit cr) { return(iud.Add(cr)); }