有关在GridView中删除项目的疑问

有关在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.