/// <summary> /// Добавить комментарий к заказу. БД /// </summary> /// <returns></returns> private async Task <IActionResult> AddCommentToOrderTmp() { OrderFunction = new OrderFunction(); OrderFunction.AddCommentToOrderTmp(FollowerId, BotInfo.Id, Update.Message.Text); OrderFunction.Dispose(); BotMessage = new OrderTempMessage(FollowerId, BotInfo.Id); await SendMessage(BotMessage.BuildMsg()); return(base.OkResult); }
/// <summary> /// Добавить номер телефона клиента /// </summary> /// <returns></returns> private async Task <IActionResult> InsertTelephoneNumber() { BotMessage = new OrderTempMessage(base.FollowerId, BotInfo.Id); if (FollowerFunction.AddTelephoneNumber(FollowerId, Update.Message.Contact.PhoneNumber) != null) { await SendMessage(BotMessage.BuildMsg()); } else { await SendMessage(new BotMessage { TextMessage = "Ошибка!" }); } return(OkResult); }
/// <summary> /// Сообщение с деталями Заказа из таблицы OrderTemp /// </summary> /// <returns></returns> private async Task <IActionResult> SendOrderTemp() { BotMessage = new OrderTempMessage(base.FollowerId, BotInfo.Id); var message = BotMessage.BuildMsg(); if (message != null) { await EditMessage(message); } if (message == null) { await AnswerCallback("Корзина пуста", true); } return(OkResult); }