78 lines
3.8 KiB
C#
78 lines
3.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Drawing;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.CoreFrameWork;
|
|
using SuperMap.RealEstate.ServiceModel;
|
|
using SuperMap.RealEstate.Utility;
|
|
using SuperMap.RealEstate.Web.UI;
|
|
using SuperMap.RealEstate.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using SuperMap.RealEstate.HighWay.SellData.Business;
|
|
using Business = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
using HZQR.Common;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Modules.MapShow
|
|
{
|
|
public partial class ServerpartRank : BasePage
|
|
{
|
|
protected string _bReportTitle = System.Configuration.ConfigurationManager.AppSettings["bReportTiTle"].ToString();
|
|
protected string _bDateType = System.Configuration.ConfigurationManager.AppSettings["bDateType"].ToString();
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack)
|
|
{
|
|
Title = Label2.Text;
|
|
return;
|
|
}
|
|
|
|
StatisticsStartDay.Text = DateTime.Now.Date.AddDays(-30).ToString();
|
|
StatisticsEndDay.Text = DateTime.Now.Date.ToString();
|
|
Business.CommonHelper.BindingDefaultDate(_bDateType, StatisticsStartDay, StatisticsEndDay);
|
|
string WhereSQL = string.Empty;
|
|
if (StatisticsStartDay.Text.Trim() != "")
|
|
{
|
|
WhereSQL += " AND NVL(STATISTICS_DATE,ENDACCOUNT_DATE) >= TO_DATE('" + StatisticsStartDay.Text + "','YYYY/MM/DD')";
|
|
}
|
|
if (StatisticsEndDay.Text.Trim() != "")
|
|
{
|
|
WhereSQL += " AND NVL(STATISTICS_DATE,ENDACCOUNT_DATE) < TO_DATE('" + StatisticsEndDay.Text + "','YYYY/MM/DD') + 1";
|
|
}
|
|
GridViewEx1.DataSource = new Business.SERVERPART(this.Transaction).ExecuteDataTable(
|
|
@"SELECT * FROM (SELECT NVL(SUM(TICKETCOUNT),0) AS TICKETCOUNT,NVL(SUM(TOTALCOUNT),0) AS TOTALCOUNT,
|
|
NVL(SUM(TOTALSELLAMOUNT),0) AS CASHPAY,A.SERVERPART_ID,A.SERVERPART_NAME
|
|
FROM HIGHWAY_SELLDATA.T_ENDACCOUNT A,HIGHWAY_STORAGE.T_SERVERPARTSHOP B
|
|
WHERE A.SERVERPART_ID = B.SERVERPART_ID AND A.SHOPCODE = B.SHOPCODE " + WhereSQL +
|
|
" GROUP BY A.SERVERPART_ID,A.SERVERPART_NAME ORDER BY CASHPAY DESC)WHERE ROWNUM <= 20");
|
|
GridViewEx1.DataBind();
|
|
Business.CommonHelper.BindReportHeader(Label2, _bReportTitle, "", PassportInfo.CityAuthority, Transaction);
|
|
Title = Label2.Text;
|
|
}
|
|
|
|
#region 方法 -> 查询
|
|
protected void ButtonStatistics_Click(object sender, EventArgs e)
|
|
{
|
|
string WhereSQL = string.Empty;
|
|
if (StatisticsStartDay.Text.Trim() != "")
|
|
{
|
|
WhereSQL += " AND NVL(STATISTICS_DATE,ENDACCOUNT_DATE) >= TO_DATE('" + StatisticsStartDay.Text + "','YYYY/MM/DD')";
|
|
}
|
|
if (StatisticsEndDay.Text.Trim() != "")
|
|
{
|
|
WhereSQL += " AND NVL(STATISTICS_DATE,ENDACCOUNT_DATE) < TO_DATE('" + StatisticsEndDay.Text + "','YYYY/MM/DD') + 1";
|
|
}
|
|
GridViewEx1.DataSource = new Business.SERVERPART(this.Transaction).ExecuteDataTable(
|
|
@"SELECT * FROM (SELECT NVL(SUM(TICKETCOUNT),0) AS TICKETCOUNT,NVL(SUM(TOTALCOUNT),0) AS TOTALCOUNT,
|
|
NVL(SUM(TOTALSELLAMOUNT),0) AS CASHPAY,A.SERVERPART_ID,A.SERVERPART_NAME
|
|
FROM HIGHWAY_SELLDATA.T_ENDACCOUNT A,HIGHWAY_STORAGE.T_SERVERPARTSHOP B
|
|
WHERE A.SERVERPART_ID = B.SERVERPART_ID AND A.SHOPCODE = B.SHOPCODE " + WhereSQL +
|
|
" GROUP BY A.SERVERPART_ID,A.SERVERPART_NAME ORDER BY CASHPAY DESC)WHERE ROWNUM <= 20");
|
|
GridViewEx1.DataBind();
|
|
}
|
|
#endregion
|
|
}
|
|
} |