/// <summary> /// Добавить новый статус заказа /// </summary> /// <param name="NewStatusId"></param> /// <returns></returns> private async Task <IActionResult> InsertOrderStatus(int NewStatusId) { var Order = OrderFunction.GetOrder(OrderId); if (Order != null) { var orderStatus = OrderFunction.InsertOrderStarus(OrderId, NewStatusId, FollowerId, false); BotMessage = new OrderStatusConfirmMessage(Order, orderStatus); await EditMessage(BotMessage.BuildMsg()); } return(OkResult); }
/// <summary> /// Добавить комментраий к новому статусу /// </summary> /// <returns></returns> private async Task <IActionResult> AddCommentToStatus() { int OrderStatusId = 0; try { OrderStatusId = Convert.ToInt32(base.OriginalMessage.Substring(ForceReplyAddCommentToStatus.Length)); var orderStatus = OrderFunction.AddCommentToStatus(OrderStatusId, ReplyToMessageText); var Order = OrderFunction.GetOrder(Convert.ToInt32(orderStatus.OrderId)); BotMessage = new OrderStatusConfirmMessage(Order, orderStatus); await SendMessage(BotMessage.BuildMsg()); return(OkResult); } catch { return(OkResult); } }