取两个日期之差的数据 [英] fetching the data with the difference of two dates

查看:59
本文介绍了取两个日期之差的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想通过两个日期之间的差值和名称来获取网格视图中的数据.这些都在标签上.




I want to fetch the data in my grid view by the difference of two dates and with a name. these all are on the labels

推荐答案

您需要先尝试.请执行以下步骤:
1.设计一个页面,在其中放置一些搜索参数.例如,在数据库中搜索名称,然后在其文本框内通过日期选择器或文本框搜索日期.
2.现在,放置一个搜索按钮作为搜索的触发事件.单击搜索按钮,您将在编写逻辑.
3.单击搜索按钮,获取搜索参数(如此处文本框中的名称),使用它,形成查询并在数据库上执行
4.将查询结果返回到数据表中,然后根据需要将其绑定到网格或任何其他适当的控件
5.现在,Datagrid将显示检索到的结果.

完毕!试试吧!
You need to try first. Follow these steps:
1. Design a page where you place few search parameters. For example, searching a name in DB, so a textbox for it, from-to date via datepicker or textbox.
2. Now, place a search button as the trigger event of the search. On click of search button you would be writing your logic.
3. In search button click, get the search parameters (like the name in textbox here), use it, form a query and execute on database
4. Get the query result back in a datatable and bind it to a grid or any other appropriate control based on your needs
5. For now, Datagrid will display the retrieved result.

Done! Try!


这篇关于取两个日期之差的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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