Ejemplo n.º 1
0
        public ActionResult Approve(int pq, int customerID, int productQuoteID)
        {
            ViewBag.Pq         = pq;
            ViewBag.CustomerID = customerID;

            if ((productQuoteID == 0) || (productQuoteID.ToString().Length == 0))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            customerOrderRepository.Approve(productQuoteID);

            ShipmentTracking shipmentTracking = shipmentTrackingRepository.FindShipmentTrackingByProductQuoteID(productQuoteID);

            shipmentTracking.ApprovedRealDate      = DateTime.Now;
            shipmentTracking.ApprovedEstimatedDate = DateTime.Now;
            shipmentTracking.ApprovedCompleted     = true;

            shipmentTrackingRepository.Update(shipmentTracking);

            return(RedirectToAction("../ProductQuote", new { pq = ViewBag.Pq, customerID = ViewBag.CustomerID }));
        }