有关在GridView中删除项目的疑问 [英] Doubt regarding deleting of items in gridview

查看:69
本文介绍了有关在GridView中删除项目的疑问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的项目中,我要预订会议室并在gridview中显示.我的问题是是否有人预定会议室,并且如果该活动完成,它将显示在gridview中,因此应在该gridview中将其删除,即只有最新的不应显示较旧的活动. br/>
更改将以存储过程或代码的形式出现.

hi all,

in my project i am having booking of conferenceroom and displaying in gridview.my question is if someone books the room and it get displayed in gridview if that activity is completed it should be deleted in that gridview i.e only latest should display no older activities.

the changes will come in storedprocedures or in code.

please any one suggest me.

推荐答案

仅从存储过程中获取日期和时间小于当前时间的记录.
From Store procedure fetch only that records whose date and time is less than current time.
i.e.
SELECT   * FROM  Booking WHERE (DATE_Book > '2010-02-24')


此外,您还可以根据时间进行过滤.
然后将获取的结果分配给Gridview.

如果对您有帮助,请标记为 答案/解决方案 .


Additionally you can filter with time also.
Then assign fetched result to Gridview.

Mark as Answer/Solution, if it is helpful to you.


存储过程中的

存储过程应注意这一点,网格仅用于显示数据

或者,您可以用不同的显示方案显示所有数据.
in storedprocedures

storedprocedures should take care of this, grid is only to display data

or u can show all data with different display scheme.


在理想的世界中,我会将其放在数据层(即存储过程)中.此存储过程将向我返回当前处于活动状态的所有预订.
In a ideal world, I would put this in the data layer (i.e. stored procedure). This stored procedure would return me all the bookings which are currently active.


这篇关于有关在GridView中删除项目的疑问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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