Пример #1
0
        public async Task <ActionResult> Edit([Bind(Include = "UserName,Password,PubTime,Status")] User user)
        {
            if (ModelState.IsValid)
            {
                db.Entry(user).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(user));
        }
Пример #2
0
        public async Task <ActionResult> Edit([Bind(Include = "Sid,Img,Name,Position,Priority,Credit,Price,PubTime")] Scene scene)
        {
            if (ModelState.IsValid)
            {
                db.Entry(scene).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(scene));
        }
Пример #3
0
        public async Task <ActionResult> Edit([Bind(Include = "Nid,UserName,Details,PubTime")] Note note)
        {
            if (ModelState.IsValid)
            {
                db.Entry(note).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.UserName = new SelectList(db.User, "UserName", "Password", note.UserName);
            return(View(note));
        }
Пример #4
0
        public async Task <ActionResult> Edit([Bind(Include = "Oid,Sid,UserName,Total,PubTime")] Order order)
        {
            if (ModelState.IsValid)
            {
                db.Entry(order).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.Sid      = new SelectList(db.Scene, "Sid", "Img", order.Sid);
            ViewBag.UserName = new SelectList(db.User, "UserName", "Password", order.UserName);
            return(View(order));
        }