コード例 #1
0
        public async Task <IActionResult> ChangeOrder(GetOrderModel model)
        {
            var order = await db.GetOrderAsync(model.Order.Id);

            // Get user
            var user = await db.GetUserAsync(order.UserId);

            // Send mail about changes in status to this user
            await NotificationService.Service.SendOrderNotificationAsync(user.Email, order, model.Status);

            // Change and save order
            await db.ChangeStatusAsync(model.Order.Id, model.Status);

            return(RedirectToAction("PersonalArea", "Home"));
        }