Exemplo n.º 1
0
        public void Do(int orderId, string userEmail, string currentStatus, string callbackUrl)
        {
            //Url.Action("BuyDetails", "Order", new { id = offer.Order.Id }, protocol: Request.Url.Scheme)).ToString()
            string body = EmailHelpers.ActivateForm($"Статус вашего заказа (id:{orderId}) изменился на: {currentStatus}", "Посмотреть детали", callbackUrl).ToString();

            identityMessageService.SendAsync(new IdentityMessage()
            {
                Body    = body,
                Subject = "Статус заказа изменился",

                Destination = userEmail
            }).Wait();
        }
Exemplo n.º 2
0
        public void Do(int itemId, string callbackUrl)
        {
            var offer = offerService.GetOffer(itemId, i => i.UserProfile, i => i.UserProfile.ApplicationUser);

            if (offer != null)
            {
                offerService.DeactivateOffer(offer, offer.UserProfileId);
                offerService.SaveOffer();
                string body = EmailHelpers.ActivateForm($"Здравствуйте {offer.UserProfile.Name}, ваше объявление {offer.Header} деактивировано.", "Активировать", callbackUrl).ToString();
                identityMessageService.SendAsync(new IdentityMessage()
                {
                    Body    = body,
                    Subject = "Ваше объявление деактивировано",

                    Destination = offer.UserProfile.ApplicationUser.Email
                }).Wait();
            }
        }