예제 #1
0
        public JsonResult OnPostCreate(CreateCeremonyGuest command)
        {
            var result    = _ceremonyGuestApplication.Create(command);
            var ceremony  = _ceremonyApplication.GetDetail(command.CeremonyId);
            var guests    = _ceremonyGuestApplication.GetCeremonyGuests(command.CeremonyId);
            var guestInfo = _guestApplication.GetGuestsInfo(guests);

            foreach (var item in guestInfo)
            {
                _emailService.SendEmail(ceremony.Title, " جناب آقای دعوتنامه شرکت در در مراسم", item.Email);
            }

            return(new JsonResult(result));
        }
예제 #2
0
        public IActionResult OnGetEdit(long id)
        {
            var ceremony = _ceremonyApplication.GetDetail(id);

            return(Partial("Edit", ceremony));
        }