예제 #1
0
        //待审核保存
        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>"));
            }
        }
예제 #2
0
 [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());
     }
 }
예제 #3
0
        //待审核
        public ActionResult DaiShenHe(int id)
        {
            //DengJiRen();
            info_ComputerRoomVisit lfc = lcr.SelectWheres(e => e.CID == id).FirstOrDefault();

            ChaXunPeiTong(id);
            return(View(lfc));
        }
예제 #4
0
 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));
        }
예제 #6
0
 //修改机房记录
 public int Update(info_ComputerRoomVisit cr)
 {
     return(iud.Update(cr));
 }
예제 #7
0
 //删除机房记录
 public int Delete(info_ComputerRoomVisit cr)
 {
     return(iud.Delete(cr));
 }
예제 #8
0
 //添加机房记录
 public int Add(info_ComputerRoomVisit cr)
 {
     return(iud.Add(cr));
 }