Exemplo n.º 1
0
        public ActionResult Create(Result result)
        {
            if (ModelState.IsValid)
            {
                db.Result.Add(result);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Department = new SelectList(db.Department, "ID", "Name", result.Department);
            ViewBag.Proposal   = new SelectList(db.Proposal, "ID", "Title", result.Proposal);
            return(View(result));
        }
Exemplo n.º 2
0
        public ActionResult Submit()
        {
            Proposal pl = new Proposal();

            pl.Title                = Request["title"];
            pl.Content              = Request["content"];
            pl.Type                 = int.Parse(Request["op"]);
            pl.MainProposer         = int.Parse(Session["userid"].ToString());
            pl.Co_Proposers         = Request["co-sponsor"];
            pl.ProcessingDepartment = int.Parse(Request["processingdepartment"]);
            pl.Date                 = DateTime.Now;
            db.Proposal.Add(pl);
            db.SaveChanges();
            Response.Write("<script>alert('提交成功');</script>");

            return(View("Index"));
        }
Exemplo n.º 3
0
        public ActionResult Submit()
        {
            ProposalSystemEntities db = new ProposalSystemEntities();
            Result r1 = db.Result.Find(Session["resultid"]);

            r1.result1          = Request["opinion"];
            r1.ExecutionContent = Request["work"];
            r1.Date             = DateTime.Now;
            db.SaveChanges();
            Response.Write("<script>alert('提交成功');</script>");

            return(View("Index"));
        }
        public ActionResult Submit()
        {
            ProposalSystemEntities db = new ProposalSystemEntities();
            Result r1 = new Result();

            r1.Proposal    = int.Parse(Session["proposalid"].ToString());
            r1.Register    = Request["result"];
            r1.Instruction = Request["instruction"];
            r1.Date        = DateTime.Now;

            if (Request["result"] == "立案")
            {
                r1.Department = int.Parse(Request["department"].ToString());
            }

            db.Result.Add(r1);
            db.SaveChanges();
            Response.Write("<script>alert('提交成功');</script>");

            return(View("Index"));
        }