Esempio n. 1
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var model = new DeliveryModel();

            model.Delivery  = DeliveryContainer.getDeliveryById((int)id);
            model.Markets   = MarketContainer.GetMarkets();
            model.Suppliers = SupplierContainer.GetSuppliers();

            return(View(model));
        }
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var model = new DeliveryModel();

            model.Delivery = DeliveryContainer.getDeliveryById((int)id);
            if ((int)Session["role"] != 3)
            {
                model.Statuses.Remove("Refuzata");
            }
            model.Markets   = MarketContainer.GetMarkets();
            model.Suppliers = SupplierContainer.GetSuppliers();

            return(View(model));
        }