Beispiel #1
0
        public ActionResult Good(int id)
        {
            Good good = db.Goods.Find(id);
            ShipOrderDetailView svd = new ShipOrderDetailView();

            svd.GoodId = good.GoodID;
            svd.Good   = good.txt;
            svd.Unit   = good.Unit;
            svd.ShipOrderDetailViewId = (int)Session["id"];
            return(View(svd));
        }
Beispiel #2
0
        public ActionResult Good(ShipOrderDetailView svd)
        {
            svd.ShipOrderDetailViewId = (int)Session["id"];
            List <ShipOrderDetailView> detal = (List <ShipOrderDetailView>)Session["Detal"];
            int ShipOrderId = 0;

            foreach (var o in detal)
            {
                ShipOrderId = o.ShipOrderId;
            }
            VShipRepository repo = new VShipRepository();

            repo.SaveDetail(ShipOrderId, svd);
            //db.SaveChanges();
            return(RedirectToAction("Edit", "VShips", new { id = ShipOrderId }));
        }