コード例 #1
0
        public ActionResult Add(Models.Signature model)
        {
            model.CreateTime = DateTime.Now;
            model.Random     = true;

            db.Signatures.Add(model);

            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public ActionResult Edit(Models.Signature model)
        {
            model.CreateTime = DateTime.Now;
            model.Random     = true;

            db.Entry(model).State = System.Data.EntityState.Modified;

            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public ActionResult Add()
        {
            var model = new Models.Signature();

            return View(model);
        }
コード例 #4
0
        public ActionResult Add()
        {
            var model = new Models.Signature();

            return(View(model));
        }