/// <summary> /// Изменить адрес доставки для заказка /// </summary> /// <returns></returns> private async Task <IActionResult> SendAddressEditor() { BotMessage = new AddressListMessage(FollowerId); await EditMessage(BotMessage.BuildMsg()); return(base.OkResult); }
protected override void Constructor() { if (Update.Message != null && Update.Message.ReplyToMessage != null) { CommandName = Update.Message.ReplyToMessage.Text; } try { PaymentsMethodsListMsg = new PaymentsMethodsListMessage(); if (base.Argumetns.Count > 0) { OrderId = Argumetns[0]; OrderViewMsg = new OrderViewMessage(this.OrderId); MyOrdersMsg = new MyOrdersMessage(base.FollowerId, BotInfo.Id); using (MarketBotDbContext db = new MarketBotDbContext()) Order = db.Orders.Where(o => o.Id == this.OrderId).Include(o => o.OrderConfirm). Include(o => o.OrderDone).Include(o => o.OrderDeleted). Include(o => o.OrderProduct).Include(o => o.Follower).Include(o => o.FeedBack).Include(o => o.Invoice).FirstOrDefault(); CheckPayMsg = new CheckPayMessage(Order); } RequestPhoneNumberMsg = new RequestPhoneNumberMessage(base.FollowerId); ViewShipAddressMsg = new AddressListMessage(base.FollowerId); OrderPreviewMsg = new OrderTempMessage(base.FollowerId, BotInfo.Id); } catch { } finally { } }
/// <summary> /// ПОказать одним сообщеним все адреса пользователя /// </summary> /// <returns></returns> private async Task <IActionResult> SendAddressList(int MessageId = 0) { BotMessage = new AddressListMessage(base.FollowerId); await SendMessage(BotMessage.BuildMsg(), MessageId); return(base.OkResult); }
public async Task <IActionResult> DoneApartment() { ViewAddressListMsg = new AddressListMessage(base.FollowerId); var mess = ViewAddressListMsg.BuildMsg(); if (mess != null) { await EditMessage(mess); } else { await AnswerCallback(""); } return(OkResult); }
protected override void Initializer() { try { if (base.Argumetns.Count > 0) { this.AddressId = Argumetns[0]; ViewAddressListMsg = new AddressListMessage(base.FollowerId); } if (base.Update.Message != null && base.Update.Message.Location != null) { ConfirmNewAddress = new NewAddressConfirmMessage(base.FollowerId, Update.Message.Location.Latitude, Update.Message.Location.Longitude); } } catch { } }