Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "instructor,videoProjectSeqNo,dateReceived,projectName,SheetID,location,buildingArea,planningStartDate,planningEndDate,constructArea,instructor,qjdsyYear,qjdsyNo,csyj,csyjPerson,csyjDate,fzryj,fzryjPerson,fzryjDate,zgyj,zgyjPerson,zgyjDate,operater,checker,videoCassetteBoxCount,photoBoxCount,opticalDiskCount,constructUnit,dateConstrcuted,timeConstrcuted,startVideoArchivesNo,endVideoArchivesNo,startVideoRegisNo,endVideoRegisNo,startVideoPaijiaNo,endVideoPaijiaNo,startPhotoArchivesNo,endPhotoArchivesNo,startPhotoRegisNo,endPhotoRegisNo,startPhotoPaijiaNo,endPhotoPaijiaNo,videoStatus,ID")] VideoArchives videoArchives, string csyjPerson, string action)
 {
     if (action == "返回")
     {
         var status = videoArchives.videoStatus;
         if (status == "2")
         {
             return(RedirectToAction("Index_shenhe"));
         }
         if (status == "3")
         {
             return(RedirectToAction("Index_dairuku"));
         }
         if (status == "4")
         {
             return(RedirectToAction("Index_ruku"));
         }
         if (status == "5")
         {
             return(RedirectToAction("Index_bohui"));
         }
         if (status == "6")
         {
             return(RedirectToAction("Index_zanruku"));
         }
         return(RedirectToAction("Index"));
     }
     if (ModelState.IsValid)
     {
         videoArchives.csyjPerson = csyjPerson.Trim();
         var status = videoArchives.videoStatus;
         db.Entry(videoArchives).State = EntityState.Modified;
         db.SaveChanges();
         if (status == "2")
         {
             return(RedirectToAction("Index_shenhe"));
         }
         if (status == "3")
         {
             return(RedirectToAction("Index_dairuku"));
         }
         if (status == "4")
         {
             return(RedirectToAction("Index_ruku"));
         }
         if (status == "5")
         {
             return(RedirectToAction("Index_bohui"));
         }
         if (status == "6")
         {
             return(RedirectToAction("Index_zanruku"));
         }
         return(RedirectToAction("Index"));
     }
     else
     {
         return(Content("<script >alert('信息有误,请核查!');window.history.back();</script >"));
     }
 }
Ejemplo n.º 2
0
 public ActionResult Shenhe([Bind(Include = "videoProjectSeqNo,dateReceived,projectName,SheetID,location,buildingArea,planningStartDate,planningEndDate,constructArea,instructor,qjdsyYear,qjdsyNo,csyj,csyjPerson,csyjDate,fzryj,fzryjPerson,fzryjDate,zgyj,zgyjPerson,zgyjDate,operater,checker,videoCassetteBoxCount,photoBoxCount,opticalDiskCount,constructUnit,dateConstrcuted,timeConstrcuted,startVideoArchivesNo,endVideoArchivesNo,startVideoRegisNo,endVideoRegisNo,startVideoPaijiaNo,endVideoPaijiaNo,startPhotoArchivesNo,endPhotoArchivesNo,startPhotoRegisNo,endPhotoRegisNo,startPhotoPaijiaNo,endPhotoPaijiaNo,videoStatus,ID")] VideoArchives videoArchives)
 {
     if (ModelState.IsValid)
     {
         db.Entry(videoArchives).State = EntityState.Modified;
         videoArchives.videoStatus     = "2";
         db.SaveChanges();
         return(RedirectToAction("Index_shenhe"));
     }
     return(View(videoArchives));
 }
Ejemplo n.º 3
0
        // GET: VideoArchives/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VideoArchives videoArchives = db.VideoArchives.Find(id);

            if (videoArchives == null)
            {
                return(HttpNotFound());
            }
            return(View(videoArchives));
        }
Ejemplo n.º 4
0
 public ActionResult Create([Bind(Include = "videoProjectSeqNo,dateReceived,projectName,SheetID,location,buildingArea,planningStartDate,planningEndDate,constructArea,instructor,qjdsyYear,qjdsyNo,csyj,csyjPerson,csyjDate,operater,videoCassetteBoxCount,photoBoxCount,ID")] VideoArchives videoArchives, string csyjPerson)
 {
     videoArchives.videoStatus = "1";
     if (ModelState.IsValid)
     {
         videoArchives.csyjPerson = csyjPerson.Trim();
         db.VideoArchives.Add(videoArchives);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     else
     {
         return(Content("<script >alert('信息有误,请核查!');window.history.back();</script >"));
         // return Content("<script >alert('信息有误!');window.location.href='/VideoContractSheets/Create?=SheetID="+videoArchives.SheetID+ "&videoProjectSeqNo="+videoArchives.videoProjectSeqNo+"';</script >");
     }
 }
Ejemplo n.º 5
0
        //// GET: VideoArchives/Delete/5
        //public ActionResult Delete(int? id)
        //{
        //    if (id == null)
        //    {
        //        return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
        //    }
        //    VideoArchives videoArchives = db.VideoArchives.Find(id);
        //    if (videoArchives == null)
        //    {
        //        return HttpNotFound();
        //    }
        //    return View(videoArchives);
        //}

        //// POST: VideoArchives/Delete/5
        //[HttpPost, ActionName("Delete")]
        //[ValidateAntiForgeryToken]
        //public ActionResult DeleteConfirmed(int id)
        //{
        //    VideoArchives videoArchives = db.VideoArchives.Find(id);
        //    db.VideoArchives.Remove(videoArchives);
        //    db.SaveChanges();
        //    return RedirectToAction("Index");
        //}

        public ActionResult Delete(long id)
        {
            try
            {
                VideoArchives videoArchives     = db.VideoArchives.Find(id);
                var           status            = videoArchives.videoStatus;
                var           videoCassetteList = db.VideoCassetteList.Where(a => a.ProjectIDS.Trim() == videoArchives.videoProjectSeqNo.ToString().Trim());
                foreach (var tem in videoCassetteList)
                {
                    VideoCassetteList del = tem;
                    db.VideoCassetteList.Remove(del);
                }
                db.VideoArchives.Remove(videoArchives);
                string strFileSavePath = Server.MapPath("~/声像资料/" + videoArchives.videoProjectSeqNo);//文件存储路径
                if (Directory.Exists(strFileSavePath))
                {
                    DirectoryInfo dir = new DirectoryInfo(strFileSavePath);//删除该目录
                    dir.Delete(true);
                }
                db.SaveChanges();
                if (status == "2")
                {
                    return(RedirectToAction("Index_shenhe"));
                }
                if (status == "3")
                {
                    return(RedirectToAction("Index_dairuku"));
                }
                if (status == "4")
                {
                    return(RedirectToAction("Index_ruku"));
                }
                if (status == "5")
                {
                    return(RedirectToAction("Index_bohui"));
                }
                if (status == "6")
                {
                    return(RedirectToAction("Index_zanruku"));
                }
                return(RedirectToAction("Index"));
            }
            catch (Exception e)
            {
                return(Content("<script >alert('删除失败,请核查!');window.history.back();</script >"));
            }
        }
Ejemplo n.º 6
0
        // GET: VideoArchives/Edit/5
        public ActionResult Shenhe(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VideoArchives videoArchives = db.VideoArchives.Find(id);
            //工作联系单信息
            VideoContractSheet videoContractSheet = db.VideoContractSheet.Find(videoArchives.SheetID);

            ViewBag.sheetNo  = videoContractSheet.sheetNo;
            ViewBag.fillDate = videoContractSheet.fillDate;
            ViewBag.developmentOrgnization = videoContractSheet.developmentOrgnization;
            ViewBag.location           = videoContractSheet.location;
            ViewBag.buildingArea       = videoContractSheet.buildingArea;
            ViewBag.projectResponsible = videoContractSheet.projectResponsible;

            ViewBag.fzryij = "经审核,该工程声像竣工档案接收情况属实,声像科拟签发《建设工程声像竣工档案验收意见书》,请批示!";
            if (videoArchives == null)
            {
                return(HttpNotFound());
            }
            return(View(videoArchives));
        }
Ejemplo n.º 7
0
        // GET: VideoArchives/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VideoArchives videoArchives = db.VideoArchives.Find(id);
            //声像科指导人
            List <SelectListItem> zhidaoren = new List <SelectListItem> {
                new SelectListItem {
                    Text = "李德林", Value = "李德林"
                },
                new SelectListItem {
                    Text = "马卫陆", Value = "马卫陆"
                }
            };

            //经办人:
            ViewBag.operater = new SelectList(zhidaoren, "Value", "Text", videoArchives.operater);
            //初审人:
            ViewBag.csyjPerson1 = new SelectList(zhidaoren, "Value", "Text", videoArchives.csyjPerson.Trim());
            ViewBag.csyjPerson  = videoArchives.csyjPerson.Trim();
            if (videoArchives.csyjDate != null)
            {
                ViewBag.csyjDate = videoArchives.csyjDate.Value.ToString("yyyy-MM-dd");
            }
            if (videoArchives.dateReceived != null)
            {
                ViewBag.dateReceived = videoArchives.dateReceived.Value.ToString("yyyy-MM-dd");
            }
            if (videoArchives == null)
            {
                return(HttpNotFound());
            }
            var status = videoArchives.videoStatus;

            ViewBag.fanhui = "Index";
            if (status == "2")
            {
                ViewBag.fanhui = "Index_shenhe";
            }
            if (status == "3")
            {
                ViewBag.fanhui = "Index_dairuku";
            }
            if (status == "4")
            {
                ViewBag.fanhui = "Index_ruku";
            }
            if (status == "5")
            {
                ViewBag.fanhui = "Index_bohui";
            }
            if (status == "6")
            {
                ViewBag.fanhui = "Index_zanruku";
            }
            if (videoArchives.planningStartDate != null)
            {
                ViewBag.planningStartDate = videoArchives.planningStartDate.Value.ToString("yyyy-MM-dd");
            }
            if (videoArchives.planningEndDate != null)
            {
                ViewBag.planningEndDate = videoArchives.planningEndDate.Value.ToString("yyyy-MM-dd");
            }
            //工程地点分区
            List <SelectListItem> list1 = new List <SelectListItem> {
                new SelectListItem {
                    Text = "", Value = ""
                },
                new SelectListItem {
                    Text = "市南区", Value = "市南区"
                },
                new SelectListItem {
                    Text = "市北区", Value = "市北区"
                },
                new SelectListItem {
                    Text = "李沧区", Value = "李沧区"
                }
            };

            ViewBag.constructArea1 = new SelectList(list1, "Value", "Text", videoArchives.constructArea);
            ViewBag.constructArea  = videoArchives.constructArea;
            return(View(videoArchives));
        }