C#在取消或编辑预订时发送通知 [英] C# sending notification upon cancel or edit booking

查看:96
本文介绍了C#在取消或编辑预订时发送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在做一项任务,我必须做一个发送通知的代码。当用户编辑预订或取消预订时,系统将自动生成将发送到他们的电子邮件的通知,并将提示用户接受或拒绝该预订。



我尝试了什么:



我遇到这部分代码有问题请帮帮我谢谢!

Hi,

I am doing an assignment where I have to do a code for sending of notification. When a user edits a booking or cancels a booking, the system will automatically generate a notification that will be sent to their email and will prompt the user to accept or decline it.

What I have tried:

I am having problems with this part of the code please help me thank you!

推荐答案

如果您已设法构建图书应用程序,我不明白如何无法构建功能,因为它会向预订人员发送电子邮件。



这看起来非常简单,我想你已经完成了你想要做的事情的复杂化,你在应用程序中保存预订,你建立了一个电子邮件模板,让人们如果他们接受预订,请发送包含点击链接的电子邮件。



要接受预订,请公开接受说...预订ID和接受......然后在此api标记内将此预订视为conf irmed如果传回的第二个参数是DECLINED则将预订标记为已拒绝。



我不确定你是多么熟练,但如果你成功了建立一个预订应用程序,但无法确定如何确认这些预订(而不是侮辱),然后我建议你将问题分解成小块,并开始以这种方式解决你的问题。例如......如果您不知道如何在C#中发送电子邮件...那么我首先使用Google搜索如何使用C#发送电子邮件。如果您不知道如何将数据保存到数据库,那么我将谷歌如何将数据保存到DB c#等等。
If you've managed to build a book application i don't understand how are unable to build functionality in that sends an email to the person making the booking.

This seems pretty straight forward and I imagine you are over complicating what you are trying to do, where you save the booking in the app, you build out an email template, get the persons address, send the email with a link to click if they accept the booking.

For accepting the booking, expose an API endpoint that accepts say...booking id and "ACCEPTED"...then within this api mark this booking as confirmed and if the second parameter passed back is DECLINED then mark the booking as declined.

I'm not sure how technically adept you are but if you've managed to build a booking app but can't work out how to confirm those bookings (not an insult) then I would suggest you break the issue down into smaller pieces and start to tackle your problems in that manner. For example...if you don't know how to send an email in C#...then i'd start by googling "How to send emails with C#". From there if you don't know how to save data to a database then i'd google "How to save data to DB c#"...etc.


这篇关于C#在取消或编辑预订时发送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆