如何在asp.net中使用按钮或链接按钮接受或拒绝gridview中的用户帐户 [英] how to accept or reject user account in gridview using button or link buttion in asp.net
本文介绍了如何在asp.net中使用按钮或链接按钮接受或拒绝gridview中的用户帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有三个模块管理员,员工,学生.....
一旦员工在管理模块中注册我想接受或拒绝的帐户(管理员工)使用gridview ......请帮帮我....
i have three module admin,staff,student.....
once staff register the account i want to accept or reject in admin module(manage staff Page) using gridview......please help me....
推荐答案
注册:
在您的表中存储员工数据以及statusColumn
,statuscolumn
可以是0或1,如果其0表示接受,如果它的1表示拒绝。最初为所有员工设置1
管理员面板:
使用Gridview
显示所有已注册的员工信息以及将Statuscolumn
更新为0或1的按钮,无论它是什么,同时显示Gridview
使用RowDatabound
事件来显示员工的当前状态,无论其是活跃的还是无效的
如果(状态== 0)
{
button.text =接受;
}
否则
{
button.text =拒绝;
}
如果是管理员点击接受
文本按钮然后更新你的状态栏为1
如果管理员点击拒绝
文本按钮,然后更新你的
Registeration :
Store staff data along withstatusColumn
in your table ,statuscolumn
may be 0's or 1's ,if its 0 means accept,if its 1 means Reject .Initially set 1 for all staff's
Admin Panel :
UseGridview
to show all registered Staff's Information along with button to update theStatuscolumn
as 0 or 1 ,whatever it is while show yourGridview
useRowDatabound
event to show the current status of the Staff whether its active or Inactive
if(Status==0)
{
button.text="Accept";
}
else
{
button.text="Reject";
}
if admin ClickAccept
text button then update yourStatus column as 1
if admin clickReject
text button then update your
status column as 0<br />
不是。
That't it.
这篇关于如何在asp.net中使用按钮或链接按钮接受或拒绝gridview中的用户帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文