Пример #1
0
        public ActionResult Create([Bind(Include = "ApproverID,SiteID,BUID,ApproverType,ApproverEmpNo,ApproverEmpName,SetupEmp,SetupTime,LevelApprover")] Approver approver)
        {
            if (ModelState.IsValid)
            {
                db.Approvers.Add(approver);
                approver.SetupTime = DateTime.Now;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.BUID         = new SelectList(db.BUs, "BUID", "BUName", approver.BUID);
            ViewBag.SiteID       = new SelectList(db.Sites, "SiteID", "SiteName", approver.SiteID);
            ViewBag.ApproverType = new SelectList(db.ApproverTypes, "ApproverTypeID", "ApproverTypeID", approver.ApproverType);
            return(View(approver));
        }
        public ActionResult Create([Bind(Include = "APPID,APPNO,APPSTATUS,Checkwait,APPSTATES,USEREMP,COSTCODE," +
                                                   "USERDEPARTMENT,USERNAME,USERMAIL,USERPHONE,FACTORY,PRIORITY,APPREASON,REQUIREDDEPARTMENT,CODEWORKSID,APPTYPE," +
                                                   "CHECKWAITNAME,BUID,SiteID,TIMECREATE,DOU,FileName,FileContent,ApplicantNo,ApplicantName,ApplicantCode,ApplicantMail" +
                                                   ",ApplicantPhone,ApplicantDep,FormID,Recipientunit,Organizer,Copysubmission,Page,Issuer,Documentnumber,Daycreate,Title,A" +
                                                   "ppContent,Signer1No,Signer1Name,Signer2No,Signer2Name,Signer3No,Signer3Name,Signer4No,Signer4Name,Signer5No,Signer5Name," +
                                                   "Signer6No,Signer6Name,Signer7No,Signer7Name,Signer8No,Signer8Name,Signer9No,Signer9Name,Signer2NoAgent,Signer2NameAgent," +
                                                   "Signer3NoAgent,Signer3NameAgent,Signer4NoAgent,Signer4NameAgent,Signer5NoAgent,Signer5NameAgent,Signer6NoAgent,Signer6NameAgent," +
                                                   "Signer7NoAgent,Signer7NameAgent,Signer8NoAgent,Signer8NameAgent,Signer9NoAgent,Signer9NameAgent")] DATA_APP_ESIGN dATA_APP_ESIGN)
        {
            if (ModelState.IsValid)
            {
                db.DATA_APP_ESIGN.Add(dATA_APP_ESIGN);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dATA_APP_ESIGN));
        }