建议使代码/体验更好 [英] Suggestions to make code/ experience better

查看:59
本文介绍了建议使代码/体验更好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Folks,我目前正处于一个使用asp和c#的项目中,其中一个我的任务是创建一个审查页面,其中管理员有机会查看在变化,并决定他们是否想接受或拒绝,它工作正常,代码是好的但我想看看我是否可以清理它并使其更专业,基本上当点击批准或拒绝按钮时,更改是在数据库,但它只给了一个标签,说它已被批准或拒绝。



无论如何,我可以做一些事情,它说你的变化已被批准/拒绝,点击这里给这个人发电子邮件并告诉他们?我不确定当他们点击这里时如何执行此操作或发送电子邮件所需的代码,我希望他们能够通过电子邮件向建议原始更改的人发送电子邮件...



我很抱歉,如果这听起来令人困惑,但基本上我想看看我是否可以向登录的人发送电子邮件并尝试使用通用电子邮件进行更改,表示更改已批准或已拒绝..



任何帮助都会很棒...



亲切的问候RD

Hello Folks, I am currently in the midst of a project featuring the use of asp and c# and one of the pages Ive been tasked to do is to create a sort of review page where the admin of sorts has the opportunity to look at changes and decide if they want to accept or decline, it works fine and the code is good but im looking to see if I can clean it up and make it more professional, basically when approve or decline button is clicked the change is made in the db but it only gives a label back saying its been approved or declined.

Is there anyway I can do something where it says your changes have been approved/ declined and click here to email the person and let them know? I aint sure how to do this or the code needed to email when they click here, I would want them to be able to email the person who has suggested the original change...

Im sorry if this sounds confusing but basically I would want to see if I can send an email to the person who was logged in and trying to make a change with a generic email saying change approved or declined..

Any help would be great...

Kind Regards RD

推荐答案

当然你可以用C#发送电子邮件。



请关注我过去的答案 - 从asp.net发送电子邮件到gmail [ ^ ]。



此代码运行正常,使用Gmail作为SMTP。



请正确更换您的电子邮件ID和密码并进行测试。



如果您遇到任何困难,请回复我。
Of course you can send email in C#.

Please follow my past answer - sending email to gmail from asp.net[^].

This code is working perfectly, which uses Gmail as SMTP.

Please replace your email ids and passwords correctly and test.

In case you face any difficulty, please reply me.


当一个人创建评论时,他们是否需要登录?



此外,信息是如何存储的?它在数据库中吗?



如果确实如此,捕获操作员联系人详细信息然后你可能会有一个事件说明它何时被接受,它看起来是原始联系人(通过一个sql查询)然后将模板电子邮件发送给该联系人。
When a person creates a review, are they required to login?

Also, how is the information stored? Is it in a database?

If it does, capture the operators contact detail and then you could have an event that says when it has been accepted, it looks to the original contact (Via a sql query) and then sends a template email out to that contact.


这篇关于建议使代码/体验更好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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