using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL.EC;
|
using CY.Infrastructure.Query;
|
using CY.Model;
|
|
namespace CY.WebForm.Pages.member
|
{
|
public partial class OrderByFinishListShow : System.Web.UI.Page
|
{
|
EC_OrderBLL _EC_OrderBLL = new EC_OrderBLL();
|
|
public string PrintHtml = "";
|
|
public string StartDate
|
{
|
get
|
{
|
return Request.Params["StartDate"] == null ? string.Empty : Request.Params["StartDate"].ToString();
|
}
|
}
|
|
public string EndDate
|
{
|
get
|
{
|
string endDate = Request.Params["EndDate"] == null ? string.Empty : Request.Params["EndDate"].ToString();
|
if (!string.IsNullOrEmpty(endDate))
|
{
|
endDate = DateTime.Parse(endDate).AddDays(1).ToString();
|
}
|
return endDate;
|
}
|
}
|
|
public string Province
|
{
|
get
|
{
|
return Request.Params["Province"] == null ? string.Empty : Request.Params["Province"].ToString();
|
}
|
}
|
|
public string City
|
{
|
get
|
{
|
return Request.Params["City"] == null ? string.Empty : Request.Params["City"].ToString();
|
}
|
}
|
|
public string County
|
{
|
get
|
{
|
return Request.Params["County"] == null ? string.Empty : Request.Params["County"].ToString();
|
}
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged;
|
if (!IsPostBack)
|
{
|
BindList();
|
}
|
}
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
private void BindList()
|
{
|
Pagination pa = new Pagination();
|
pa.PageSize = UCPager1.AspNetPager.PageSize;
|
pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex;
|
this.RepClientList.DataSource = _EC_OrderBLL.GetOrderListByFinish(pa, StartDate, EndDate, Province, City, County);
|
this.RepClientList.DataBind();
|
UCPager1.AspNetPager.RecordCount = pa.RecordCount;
|
|
Pagination pa_All = new Pagination();
|
pa_All.PageSize = int.MaxValue;
|
pa_All.PageIndex = 1;
|
List<EC_OrderBasic> m_EC_OrderBasic_List = _EC_OrderBLL.GetOrderListByFinish(pa_All, StartDate, EndDate, Province, City, County).ToList();
|
PrintHtml += "<tr><th>编号</th><th>订单类型</th><th>订单名称</th><th>卖家名称</th><th>买家名称</th><th>线上总金额</th><th>线上金额</th><th>使用授信</th><th>发生时间</th></tr>";
|
if (m_EC_OrderBasic_List != null && m_EC_OrderBasic_List.Count > 0)
|
{
|
int i = 1;
|
foreach (var item in m_EC_OrderBasic_List)
|
{
|
PrintHtml += "<tr><td>" + i + "</td><td>" + item.OrderType.Name + "</td><td><div style='max-width: 171px; overflow: visible; word-break: break-all; word-wrap: normal;'>" + item.DocumentName + "</div></td><td><div style='max-width: 171px; overflow: visible; word-break: break-all; word-wrap: normal;'>" + item.SellerName + "</div></td><td><div style='max-width: 171px; overflow: visible; word-break: break-all; word-wrap: normal;'>" + item.BuyerName + "</div></td><td>" + item.ALLPayMoney.ToString("0.00") + "</td><td>" + item.TradingSingle.OnlineMoney.Value.ToString("0.00") + "</td><td>" + item.TradingSingle.UsedCredit.Value.ToString("0.00") + "</td><td>" + item.LastUpdateTime + "</td></tr>";
|
i++;
|
}
|
}
|
}
|
|
//分页事件
|
protected void AspNetPager1_PageChanged(object src, EventArgs e)
|
{
|
BindList();
|
}
|
}
|
}
|