Пример #1
0
        private async Task SendConfirmNotificationAsync(ExteralApplication app, VetMember user, ExteralApplicationPayment eap)
        {
            Discord.EmbedBuilder builder = new Discord.EmbedBuilder();

            builder.WithTitle($"{app.Name}:購入確認");
            builder.WithUrl(app.CallbackUrl + $"?id={eap.Id}");
            builder.WithAuthor(app.VetMember.Name, app.VetMember.GetAvaterIconUrl(), app.VetMember.GetMemberPageUrl(StaticSettings.SiteBaseUrl));
            builder.AddField("金額", eap.Amount);
            builder.WithDescription(eap.Description);
            builder.WithFooter("よろしければ、タイトルをクリックして購入処理をつづけてください");

            await CoreService.SendDirectMessage(new[] { user }, string.Empty, builder.Build());
        }
Пример #2
0
        public async Task <IActionResult> OnGetAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ExteralApplication = await DbContext.ExteralApplications
                                 .Include(e => e.VetMember).FirstOrDefaultAsync(m => m.Id == id);

            if (ExteralApplication == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Пример #3
0
        public async Task <IActionResult> OnPostAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ExteralApplication = await DbContext.ExteralApplications.FindAsync(id);

            if (ExteralApplication != null)
            {
                DbContext.ExteralApplications.Remove(ExteralApplication);
                await DbContext.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Пример #4
0
        public async Task <IActionResult> OnGetAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ExteralApplication = await DbContext.ExteralApplications
                                 .Include(e => e.VetMember).FirstOrDefaultAsync(m => m.Id == id);

            if (ExteralApplication == null)
            {
                return(NotFound());
            }
            ViewData["VetMemberId"] = new SelectList(DbContext.VetMembers, "Id", "Name");
            return(Page());
        }