Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            OrdersOutModel ordersOutModel = db.OrdersOutModels.Find(id);

            db.OrdersOutModels.Remove(ordersOutModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,GoodId,DateOpen,ConterpartyId,Prise,Count,Summ")] OrdersOutModel ordersOutModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ordersOutModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ConterpartyId = new SelectList(db.Conterparties, "Id", "Name", ordersOutModel.ConterpartyId);
     ViewBag.GoodId        = new SelectList(db.GoodModels, "Id", "Name", ordersOutModel.GoodId);
     return(View(ordersOutModel));
 }
Ejemplo n.º 3
0
        // GET: OrdersOut/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OrdersOutModel ordersOutModel = db.OrdersOutModels.Find(id);

            if (ordersOutModel == null)
            {
                return(HttpNotFound());
            }
            return(View(ordersOutModel));
        }
Ejemplo n.º 4
0
        // GET: OrdersOut/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OrdersOutModel ordersOutModel = db.OrdersOutModels.Find(id);

            if (ordersOutModel == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ConterpartyId = new SelectList(db.Conterparties, "Id", "Name", ordersOutModel.ConterpartyId);
            ViewBag.GoodId        = new SelectList(db.GoodModels, "Id", "Name", ordersOutModel.GoodId);
            return(View(ordersOutModel));
        }