Web应用程序的每周销售 [英] Weekly sales in web application

查看:89
本文介绍了Web应用程序的每周销售的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我目前正在开发Web应用程序.在此,我必须显示今天的销售额,每周的销售额和每月的销售额.我不知道要显示每周的销售量.我想同时显示详细信息和图表.任何人都有获取当前周详细信息的想法...?

谢谢....

Hi,
I am currently working on a web application. In this I have to display today''s sales, weekly sale''s and monthly sales. I didn''t get the idea to display weekly sales. I want to display both details and chart. Anybody have the idea to get the current weeks details...?

Thank you....

推荐答案

如果您要求获取当前星期范围,则下面是获取当前星期范围的功能代码
if you are asking for getting current week range then below is the function code for getting current week range
// to get First date of week
        public string fDate()
        {
            DayOfWeek weekStart = new DayOfWeek();
            DateTime startdate = DateTime.Today.AddDays(weekStart - DateTime.Today.DayOfWeek);
            string Fdateofweek= startdate.ToShortDateString();
            return Fdateofweek;
        }
        // to get today date
        public string cDate()
        {
            DateTime enddate = DateTime.Today;
            string CurrnetDay =enddate.ToShortDateString();
            return CurrnetDay;
        }



现在进行Sql查询
就像



Now Make Sql Query
like

string query = "select * from tablename WHERE Date BETWEEN '" + fDate() + "' AND '" + cDate() + "'";


这篇关于Web应用程序的每周销售的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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