Пример #1
0
        /// <summary>
        /// Canceles a buy/sell by refunding commodity/funds.
        /// </summary>
        public static void cancelRequestAction()
        {
            Console.WriteLine("> Please enter the Id of the request you wish to cancel:");
            string Id = Console.ReadLine();
            int    id = inputCheck1(Id);

            if (id == -1)
            {
                return;
            }

            DAL.MarketClient m = new DAL.MarketClient();
            try
            {
                m.SendCancelBuySellRequest(id);
            }
            catch (DAL.Utils.MarketException mx)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(mx.Message.ToString());
                Console.ResetColor();
            }
            catch (AggregateException ax)
            {
                ServerCrashError();
            }
        }
Пример #2
0
        public static void cancelRequestAction()
        {
            Console.WriteLine("please enter the Id of the request you want to cancel");
            string Id = Console.ReadLine();
            int    id = ezer(Id);

            while (id == -1)
            {
                Id = Console.ReadLine();
                id = ezer(Id);
            }
            DAL.MarketClient m = new DAL.MarketClient();
            try
            {
                m.SendCancelBuySellRequest(id);
            }
            catch (DAL.Utils.MarketException mx)
            {
                Console.WriteLine(mx.Message.ToString());
            }
            catch (AggregateException ax)
            {
                Console.WriteLine("The server isn't working at the momment, please try again later");
            }
        }