예제 #1
0
        public override void Execute(TelegramBotClient botClient, System.Object message)
        {
            IStandartCommand standartCommand = new CancelMyTransaction();
            ITransaction     transaction     = new CancelMyTransaction();
            ISplitName       splitName       = new CancelMyTransaction();

            if (standartCommand.SetCallbackQuery(message, out _message))
            {
                return;
            }

            if (standartCommand.SetDataBase(out db))
            {
                return;
            }

            if (standartCommand.SetUserAndCheckIsNull(botClient, _message, out user, db))
            {
                return;
            }

            Int32 IdTransaction = splitName.GetNameSplit(Name);

            Name = CommandTextBlockchain.GetAdminInBlockChain;

            if (transaction.GetTransaction(out this.transaction, IdTransaction, db))
            {
                return;
            }

            SendMessage(botClient);
        }
        public override void Execute(TelegramBotClient botClient, System.Object message)
        {
            IStandartCommand standartCommand = new CancelMyTransaction();
            ITransaction     transaction     = new CancelMyTransaction();
            ISplitName       splitName       = new CancelMyTransaction();

            if (standartCommand.SetCallbackQuery(message, out _message))
            {
                return;
            }

            if (standartCommand.SetDataBase(out db))
            {
                return;
            }

            if (standartCommand.SetUserAndCheckIsNull(botClient, _message, out user, db))
            {
                return;
            }

            SetUser();

            if (user.ID == userAdmin.ID)
            {
                SetSettings();
                if (IsNullDataBase.IsNull(botClient, _message, settings))
                {
                    return;
                }

                Int32 IdTransaction = splitName.GetNameSplit(Name);
                Name = CommandTextBlockchain.GetMoneyRecipientAdminInMyTransaction;

                if (transaction.GetTransaction(out this.transaction, IdTransaction, db))
                {
                    return;
                }
                ChangeTransaction();
                if (CheckTransaction())
                {
                    PaySender();
                }

                SendMessage(botClient);

                DeleteMessage(botClient);
            }
        }