Пример #1
0
        public ActionResult AddArchive(long?id)
        {
            ViewBag.retentionPeriodNo = new SelectList(db.RetentionPeriod, "retentionPeriodNo", "retentionPeriodName");
            ViewBag.securityID        = new SelectList(db.SecurityClassification, "securityID", "securityName");
            ViewBag.structureTypeID   = new SelectList(db.StructureType, "structureTypeID", "structureTypeName");
            ViewBag.indexer           = new SelectList(ab.AspNetUsers, "UserName", "UserName");
            ViewBag.checker           = new SelectList(ab.AspNetUsers, "UserName", "UserName");
            ViewBag.typist            = new SelectList(ab.AspNetUsers, "UserName", "UserName");
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            vw_passList pass = new vw_passList();

            return(View(pass));
        }
Пример #2
0
        public ActionResult ProjectInfoes(long?id3, string id6)
        {
            if (id3 == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var projectinfo = from b in db.vw_passList
                              where b.projectID == id3
                              orderby b.paperProjectSeqNo, b.paijiaNo
            select b;
            vw_passList pro = projectinfo.First();
            int         wenziCnt = 0, tuzhiCnt = 0, photoCnt = 0;

            foreach (var item in projectinfo)
            {
                wenziCnt += Convert.ToInt32(item.textMaterial);
                tuzhiCnt += Convert.ToInt32(item.drawing);
                photoCnt += Convert.ToInt32(item.photoCount);
            }
            pro.textMaterial = wenziCnt;
            pro.drawing      = tuzhiCnt;
            pro.photoCount   = photoCnt;
            //编制分类号

            string strfenleihao = pro.mainCategoryID;

            if (pro.subDictionaryID != null)
            {
                if (pro.subDictionaryID.Trim() != "0")
                {
                    strfenleihao = strfenleihao + pro.subDictionaryID;
                    if (pro.minorDictionaryID.Trim() != "0")
                    {
                        strfenleihao = strfenleihao + "." + pro.minorDictionaryID;
                    }
                }
            }
            ViewData["ClassNo"]     = strfenleihao; //分类号
            ViewData["ProjectName"] = pro.projectName;

            string jgdate = Convert.ToDateTime(pro.jgDate).ToString("yyyy-MM-dd");

            ViewData["jgDate"] = jgdate;
            if (jgdate.Trim() == "1753-01-01")
            {
                ViewData["jgDate"] = "";
            }
            string bydate = Convert.ToDateTime(pro.indexDate).ToString("yyyy-MM-dd");

            ViewData["indexeDate"] = bydate;
            if (bydate.Trim() == "1753-01-01")
            {
                ViewData["indexeDate"] = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString("D2") + "-25";
            }
            string jcdate = Convert.ToDateTime(pro.checkDate).ToString("yyyy-MM-dd");

            ViewData["checkDate"] = jcdate;
            if (jcdate.Trim() == "1753-01-01")
            {
                ViewData["checkDate"] = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString("D2") + "-25";
            }
            string lrdate = Convert.ToDateTime(pro.typerDate).ToString("yyyy-MM-dd");

            ViewData["TyperDate"] = lrdate;
            if (lrdate == "1753-01-01")
            {
                ViewData["TyperDate"] = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString("D2") + "-25";
            }
            ViewData["id6"] = id6;//传登url,用于工程著录单返回


            return(View(pro));
        }