public ActionResult Index() { var dateTime = _orderDataService.GetLastDateTimeOrder(Token); var data = _orderDataService.GetOrder(Token, dateTime).ToList(); var viewModel = Irbis.Code.Order.OrderHelper.GetOrderView(data); return(View(viewModel)); }
public JsonResult Checkout(string name, string phone, string address, string comment) { var user = new Irbis.Entities.User() { Name = name, Phone = phone, Address = address, Comment = comment }; var data = _сartDataService.GetShoppingСart(Token); _orderDataService.SaveOrder(data, user, Token); _сartDataService.Clear(Token); var dateTime = _orderDataService.GetLastDateTimeOrder(Token); var order = _orderDataService.GetOrder(Token, dateTime).ToList(); var orderView = Irbis.Code.Order.OrderHelper.GetOrderView(order); var mes = TelegramMes(orderView); TelegramBot.SendMessageOrder(mes); return(Json(true)); }