// 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));
        }
Exemple #2
0
        //资产登记页面删除(进行删除操作)
        // GET: Asset/Delete/5
        public ActionResult AssetDelete(int id)
        {
            info_Asset asset = new info_Asset
            {
                AID = id
            };

            if (iab.Delete(asset) > 0)
            {
                return(Content("<script>alert('删除成功');window.location.href='/Asset/AssetSelect'</script>"));
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/Asset/AssetSelect'</script>"));
            }
        }
Exemple #3
0
 public ActionResult AssetRepairEdits(info_Asset asset)
 {
     try
     {
         asset.CRelustID = 1;
         // TODO: Add update logic here
         if (iab.Update(asset) > 0)
         {
             return(Content("<script>alert('修改成功');window.location.href='/Asset/AssetRepairSelect'</script>"));
         }
         else
         {
             return(Content("<script>alert('修改失败');window.location.href='/Asset/AssetRepairSelect'</script>"));
         }
     }
     catch
     {
         return(RedirectToAction("AssetRepairSelect"));
     }
 }
Exemple #4
0
 public ActionResult AssetEdits(info_Asset asset)
 {
     try
     {
         // TODO: Add insert logic here
         asset.RealName = Session["UserRealName"].ToString();
         asset.TID      = 1;
         if (iab.Update(asset) > 0)
         {
             return(Content("<script>alert('修改成功');window.location.href='/Asset/AssetSelect'</script>"));
         }
         else
         {
             return(Content("<script>alert('修改失败');window.location.href='/Asset/AssetSelect'</script>"));
         }
     }
     catch
     {
         return(RedirectToAction("Index"));
     }
 }
Exemple #5
0
 //进入资产审核申请操作页面(进行修改操作)
 public ActionResult AssetReviewEdits(info_Asset asset)
 {
     asset.AShenHeRan  = Session["UserRealName"].ToString();
     asset.AShenHeRiQi = DateTime.Now.ToString();
     if (asset.AShenHeJieGuo == "同意")
     {
         asset.CRelustID = 2;
     }
     else if (asset.AShenHeJieGuo == "不同意")
     {
         asset.CRelustID = 3;
         asset.TID       = 1;
     }
     if (iab.Update(asset) > 0)
     {
         return(Content("<script>alert('审核成功');window.location.href='/Asset/AssetReviewSelect'</script>"));
     }
     else
     {
         return(Content("<script>alert('修改失败');window.location.href='/Asset/AssetReviewSelect'</script>"));
     }
 }
Exemple #6
0
 public int Update(info_Asset t)
 {
     return(iad.Update(t));
 }
Exemple #7
0
 public int Delete(info_Asset t)
 {
     return(iad.Delete(t));
 }
Exemple #8
0
 public int Add(info_Asset t)
 {
     return(iad.Add(t));
 }