Esempio n. 1
0
 public void ShipDeparted(int companyID, MovingMsg msg)
 {
     var shipDepartedCmd = new SqlCommand("procShipDeparted");
     shipDepartedCmd.Parameters.AddWithValue("@CommodityTransactionID", msg.transactionID);
     shipDepartedCmd.Parameters.AddWithValue("@ShippingCompanyID", companyID);
     shipDepartedCmd.Parameters.AddWithValue("@DepartTime", msg.time);
     shipDepartedCmd.Parameters.AddWithValue("@DestPort", msg.destPortID);
     dbConn.StoredProc(shipDepartedCmd);
 }
Esempio n. 2
0
        public void ShipArrived(int companyID, MovingMsg msg)
        {
            var shipArrivedCmd = new SqlCommand("procShipArrived");
            shipArrivedCmd.Parameters.AddWithValue("@CommodityTransactionID", msg.transactionID);
            shipArrivedCmd.Parameters.AddWithValue("@ShippingCompanyID", companyID);
            shipArrivedCmd.Parameters.AddWithValue("@ArrivalTime", msg.time);
            shipArrivedCmd.Parameters.AddWithValue("@DepartPort", msg.departPortID);
            shipArrivedCmd.Parameters.AddWithValue("@ArrivalPort", msg.destPortID);
            shipArrivedCmd.Parameters.AddWithValue("@ShippingCompanyRate", Globals.SHIPPING_COMPANY_RATE);
            shipArrivedCmd.Parameters.AddWithValue("@FuelRate", Globals.FUEL_RATE);
            dbConn.StoredProc(shipArrivedCmd);

            var saleCmd = new SqlCommand("procCommoditySale");
            saleCmd.Parameters.AddWithValue("@CommodityTransactionID", msg.transactionID);
            saleCmd.Parameters.AddWithValue("@SalePortID", msg.destPortID);
            dbConn.StoredProc(saleCmd);
        }