Beispiel #1
0
        public ActionResult Choose(int id)
        {
            var order = db.Orders.Get(id);

            var employee = EmployeesService.ChooseEmployees(db, order.Date, order.Language, order.Character);

            if (employee is null || !employee.Any())
            {
                Response.Write("<script>alert('Аниматоры не найдены!')</script>");
                return(View("GetOrdersInfo"));
            }

            var message = $"Дата: {order.Date:dd:MM}{Environment.NewLine}" +
                          $"Продолжительность: {order.Time:mm\\:ss} {Environment.NewLine}" +
                          $"Персонаж: {order.Character.Name} {Environment.NewLine}" +
                          $"Язык: {order.Language.Lang}";

            Task.Run(() => Bot.SendInfo(Convert.ToInt32(employee.First().Contact), message));
            return(View("Index"));
        }