com.huiyou.Web/factory/orderreport.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using com.huiyou.Web.tools;
using com.huiyou.Bll;
using System.Data;
using com.huiyou.Common;

namespace com.huiyou.Web.factory
{
    public partial class orderreport : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!FactoryLoginHelper.FactoryEnter()) return;

            if (!Page.IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            string factoryId = Session[FactoryLoginHelper.FactoryIdSession].ToString();
            string startDate = Request["startDate"];
            string endDate = Request["endDate"];

            if (string.IsNullOrEmpty(startDate))
            {
                startDate = DateTime.Now.ToString("yyyy-MM-01");
            }

            if (string.IsNullOrEmpty(endDate))
            {
                endDate = DateTime.Now.ToString("yyyy-MM-dd");
            }

            string sql = "select " + Environment.NewLine;
            sql += "(" + Environment.NewLine;
            sql += "	select COUNT(1) from tb_OrderHead" + Environment.NewLine;
            sql += "	where factoryId=" + factoryId + Environment.NewLine;
            sql += "	and CreateTime>='" + startDate + "'" + Environment.NewLine;
            sql += "	and CreateTime-1<'" + endDate + "'" + Environment.NewLine;
            sql += ") OrderNum," + Environment.NewLine;
            sql += "(" + Environment.NewLine;
            sql += "	select COUNT(1) from tb_OrderHead" + Environment.NewLine;
            sql += "	where factoryId=" + factoryId + Environment.NewLine;
            sql += "	and SendDate>='" + startDate + "'" + Environment.NewLine;
            sql += "	and SendDate-1<'" + endDate + "'" + Environment.NewLine;
            sql += ") SendNum" + Environment.NewLine;

            DataTable dt = DBHelper.SelectDataSet(sql).Tables[0];

            repReport.DataSource = dt;
            repReport.DataBind();
后面还有 7 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。