使用Web服务检索开始日期和结束日期之间的数据 [英] retrieve data between startdate and enddate using webservice

查看:80
本文介绍了使用Web服务检索开始日期和结束日期之间的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我的Web应用程序中的功能类似于使用Web服务在开始日期和结束日期之间检索数据.

因此,在我的服务中提供packagecloseddate.


验证此包裹的关闭日期以获取每月包裹数

并将结果显示给图表控件.作为每月计数,每周计数是年度计数.

所以,我该怎么做.


hi every body

in my webapplication have a functionality like retrieve data between startdate and enddate using webservice.

So in my service provide packagecloseddate.


to validate this packagecloseddate to retrieve the monthly packagecounts

and showing the result to chart control. as a monthlycount,weeklycount are yearly count.

So,how can i do this functionality.


any idea for this sugesstion me.

推荐答案

如果要在DB层上检索数据,则可以将存储过程与适当的SQL查询和联接一起使用.
如果在应用程序层进行编写,则可以使用LInQ(语言集成查询).例如,这是一个linq语句,用于获取两个日期之间的所有记录

If you want to retrieve data at DB layer, you can use stored procedure with appropriate SQL queries and joins.

In case of writing at application layer, you can use LInQ (Language Intergrated Query). As an example, here is a linq statement to get all records between two dates

var appointmentNoShow = from a in appointments
                         from p in properties
                         from c in clients
                         where a.Id == p.OID
                         where a.Start.Date >= startDate.Date
                         where a.Start.Date <= endDate.Date 



有用的示例位于: http://msdn.microsoft.com/en-us/vstudio/aa336746. aspx [ ^ ]



Useful samples are available at: http://msdn.microsoft.com/en-us/vstudio/aa336746.aspx[^]


这篇关于使用Web服务检索开始日期和结束日期之间的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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