コード例 #1
0
        private void PopulateOpCoWarehouses()
        {
            // Populate the stock warehouse from the opco shipment table
            ddlStockWarehouse.DataSource = WarehouseController.GetOpCoStockWarehouseCodes("");
            ddlStockWarehouse.DataBind();

            //Populate the delivery warehouse from the opco shipment table
            //ddlDeliveryWarehouse.DataSource = WarehouseController.GetOpCoDeliveryWarehouseCodes("");
            //ddlDeliveryWarehouse.DataBind();
            PopulateOpCoDeliveryWarehouses("");
        }
コード例 #2
0
        public void TestGetOpCoStockWarehouseCodes()
        {
            using (TransactionScope ts = new TransactionScope())
            {
                // Populate and Create an OpCo Shipment with default values
                OpCoShipment opCoShipment = OpcoShipmentTests.PopulateNewItem();
                OpCoShipmentController.SaveShipment(opCoShipment);

                // Save the OpCo Code
                string SaveOpCoCode = opCoShipment.OpCoCode;

                // Create a second OpCo Shipment with the same OpCo Code, but a different stock warehouse code
                opCoShipment.Id                 = -1;
                opCoShipment.OpCoCode           = SaveOpCoCode;
                opCoShipment.StockWarehouseCode = "ZZZ";
                opCoShipment.ShipmentNumber     = "Ship2";
                opCoShipment.DespatchNumber     = "Despatch2";

                OpCoShipmentController.SaveShipment(opCoShipment);

                List <Warehouse> warehouseList = WarehouseController.GetOpCoStockWarehouseCodes(SaveOpCoCode);
                Assert.IsTrue(warehouseList.Count == 2);
            }
        }