public ActionResult Edit([Bind(Include = "GoodsID,Name,Sex,Season,Material,Style,GoodsImage,Amount,Unitprice,Type,SizeImage,ShangjiaTime,Pageview,TotalStorageAmount,ThumbNum")] Goods goods)
 {
     if (ModelState.IsValid)
     {
         db.Entry(goods).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(goods));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "AddressID,Address1,UserID")] Address address)
 {
     if (ModelState.IsValid)
     {
         db.Entry(address).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserID = new SelectList(db.Users, "UserID", "Password", address.UserID);
     return(View(address));
 }
 public ActionResult Edit([Bind(Include = "OrderID,OrderTime,TotalAmount,UserID,UserName,Tel,Address")] Orders orders)
 {
     if (ModelState.IsValid)
     {
         db.Entry(orders).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserID = new SelectList(db.Users, "UserID", "Password", orders.UserID);
     return(View(orders));
 }
 public ActionResult Edit([Bind(Include = "GoodsCommentID,ComContent,ComImage,Video,ImageOrNot,VideoOrNot,UserID,GoodsID,ComTime,ThumbNum")] GoodsComment goodsComment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(goodsComment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GoodsID = new SelectList(db.Goods, "GoodsID", "Name", goodsComment.GoodsID);
     ViewBag.UserID  = new SelectList(db.Users, "UserID", "Password", goodsComment.UserID);
     return(View(goodsComment));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "ComReplyID,UserID,GoodsCommentID,RepContent,RepTime")] ComReply comReply)
 {
     if (ModelState.IsValid)
     {
         db.Entry(comReply).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GoodsCommentID = new SelectList(db.GoodsComment, "GoodsCommentID", "ComContent", comReply.GoodsCommentID);
     ViewBag.UserID         = new SelectList(db.Users, "UserID", "Password", comReply.UserID);
     return(View(comReply));
 }
Exemplo n.º 6
0
 public void EditVideo(Video video)
 {
     db.Entry(video).State = EntityState.Modified;
     db.SaveChanges();
 }
Exemplo n.º 7
0
 public void EditOrders(Orders orders)
 {
     db.Entry(orders).State = EntityState.Modified;
     db.SaveChanges();
 }
Exemplo n.º 8
0
 public void UpdateShirt(Shirt shirt)
 {
     db.Entry(shirt).State = EntityState.Modified;
     db.SaveChanges();
 }
Exemplo n.º 9
0
 public void EditNote(Note note)
 {
     db.Entry(note).State = EntityState.Modified;
     db.SaveChanges();
 }
Exemplo n.º 10
0
 public void EditGoods(Goods goods)
 {
     db.Entry(goods).State = EntityState.Modified;
     db.SaveChanges();
 }