如何设置调查到期日 [英] How to set survey expiry Date

查看:94
本文介绍了如何设置调查到期日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我想让我的调查到期日在mu调查表中。



假设有1个反馈表,其中包含列名反馈日期,客户ID,评级,票号。



另一个表是反馈配置在此我要制作我的用户调查到期日期和调查更新日期。



用户可以在关闭机票或收到邮件后24小时内更新他的调查



调查将在收到邮件15天后到期。



假设今天我收到了用于调查的邮件,因此我可以更新24小时我的调查结果。



假设我15天后打开邮件我试图打开调查这次我希望调查到期。





请帮帮我



谢谢

Dear All,

I want to make my survey expire date in mu survey table.

suppose 1 Feedback table is there with with column name feedback date,cust id,rating,ticket number.

one another table is Feedback config in this i want to make my user survey expire date and survey update date.

user can update his survey within 24 hours after closing the ticket or getting the mail

survey will expire after 15 days of getting mail.

suppose today i got mail for survey with url so i will be able to update my survey withing 24 hour.

suppose i open my mail after 15 days i try to open survey this time i want to expire the survey.


please help me out

Thanks

推荐答案

然后设置一个令牌以及该调查。令牌将保存您的用户和调查的详细信息以及何时启动。例如,如果我要求进行调查,应用程序将存储我的用户ID,调查详细信息(可选)和启动时的时间。



现在,那个时间是DateTime格式,我可以比较它是否是24小时或我应该允许用户使用它。例如,



Then set a token along with that survey. The token would hold the details for your user and the survey and when it was initiated. For example, if I am asking to get a survey, application would store my User ID, Survey details (optional) and Time when I started it.

Now, that time would be in DateTime format, I can compare it to see whether it is 24 hours old or should I allow user to use it. For example,

if((DateTime.Now - surveyCreated).TotalHours < 24) {
   // Survey was created with in 24 hours
} else {
   // Expire the token
}





当用户想要使用该令牌时,如果该令牌过期,他将无法更新调查或使用该工具。



When ever user wants to use that token, if that is expired he won't be able to update the survey or use the tool at all.


这篇关于如何设置调查到期日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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