public ActionResult Details(int?id) //Delivery Request ID
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }


            var deliveryInfo = db.GetDeliveryInfoByRequestID(id).FirstOrDefault();

            if (deliveryInfo == null)
            {
                return(HttpNotFound());
            }

            var items = db.GetDeliveryInfoItemsByRequestID(id).ToList();

            ViewBag.DeliveryInfo = deliveryInfo;
            ViewBag.Items        = items;
            ViewBag.ProjectID    = db.ProjectDeliveryRequests.Where(p => p.RequestID == id).Select(p => p.ProjectID).FirstOrDefault();

            ViewBag.CustodyLocations = new SelectList(db.GetCustodyLocationsBySiteCoID(siteusercompanyid).ToList(), nameof(GetCustodyLocationsBySiteCoID_Result.ViewID), nameof(GetCustodyLocationsBySiteCoID_Result.Name));
            ViewBag.DeliveryStatus   = new SelectList(db.GetDeliveryStatusBySiteCoID(siteusercompanyid).ToList(), nameof(GetDeliveryStatusBySiteCoID_Result.ViewID), nameof(GetDeliveryStatusBySiteCoID_Result.Name));

            return(View());
        }
Esempio n. 2
0
        // GET: Options/AccountingOptions
        public ActionResult Index()
        {
            int siteCoID = base.siteusercompanyid;

            ViewBag.CoSalesOrderStatus   = db.GetSalesOrderStatusBySiteCoID(siteCoID);
            ViewBag.CoPorStatus          = db.GetPorStatusBySiteCoID(siteCoID);
            ViewBag.CoDeliveryTypes      = db.GetDeliveryTypesBySiteCoID(siteCoID);
            ViewBag.CoCreditMemoStatus   = db.GetCreditMemoStatusBySiteCoID(siteCoID);
            ViewBag.CoDeliveryStatus     = db.GetDeliveryStatusBySiteCoID(siteCoID);
            ViewBag.CoRmaStatus          = db.GetRmaStatusBySiteCoID(siteCoID);
            ViewBag.CoShippingMethods    = db.GetShippingMethodsBySiteCoID(siteCoID);
            ViewBag.CoCostCodes          = db.GetCostCodesBySiteCoID(siteCoID);
            ViewBag.CoInventoryTemplates = db.GetInventoryTemplatesBySiteCoID(siteCoID);
            ViewBag.CoShipToList         = db.GetShipToListBySiteCoID(siteCoID);
            ViewBag.CoCustodyLocations   = db.GetCustodyLocationsBySiteCoID(siteCoID);
            ViewBag.CoTaxes = db.GetTaxesBySiteCoID(siteCoID);

            return(View());
        }