///
        ///		\brief Called to create the button for the MarketPlace.
        ///		\details <b>Details</b>
        ///		\param sender - <b>object</b> - Represents the object that is calling the method.
        ///     \param e - <b>RoutedEventArgs</b> - Represents the item thats being sent in.
        ///
        ///		This Method goes to the market place window.
        ///
        ///		\return N/A.
        ///
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            MarketPlace market = new MarketPlace();

            purchaseAccepted = market.ShowDialog();
            if (purchaseAccepted == true)
            {
                Successful successful = new Successful();
                successful.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        ///
        ///		\brief Called to create a order.
        ///		\details <b>Details</b>
        ///
        ///		This Methods creates a customers order.
        ///
        ///		\return void.
        ///

        /* -------------------------------------------------------------------------------------------
        * Method        :   CreateOrder()
        * Description   :   creates a new order for the user
        * Parameters    :   string compName - the company name
        *                   string destination - where the order is going
        *                   string origin - origin of the order
        * Returns       :   bool - returns if the payment was verified or not
        * ------------------------------------------------------------------------------------------*/
        static public bool CreateOrder(string compName, string destination, string origin)
        {
            string carrier1;
            string carrier2;

            //gets the carriers
            carrier1 = Planner.SelectCarrier(destination);
            carrier2 = Planner.SelectCarrier(origin);
            int load      = MarketPlace.loadValue();                                                                 //gets the load type
            int truckType = MarketPlace.vanType();                                                                   //gets the truck type

            return(Billing.VerifyPayment(compName, carrier1, carrier2, origin, destination, true, load, truckType)); //returns if the payment was verified
        }