using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL;
|
using CY.Model;
|
using CY.Infrastructure.Query;
|
using CY.Infrastructure.Common;
|
using CY.BLL.Sys;
|
using CY.BLL.OA;
|
using CY.BLL.EC;
|
using CY.BLL.Inquiry;
|
using CY.Model.Inquiry;
|
|
namespace CY.WebForm.Pages.financial
|
{
|
public partial class OrderFinancialPrint : BasePage
|
{
|
EC_OrderBasicBLL _eC_OrderBasicBLL = null;
|
OA_StaffBLL bll_OA_StaffBLL = null;
|
|
public string ssshtml = "";
|
|
//初始化
|
public OrderFinancialPrint()
|
{
|
|
_eC_OrderBasicBLL = new EC_OrderBasicBLL();
|
bll_OA_StaffBLL = new OA_StaffBLL();
|
|
}
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
|
if (!IsPostBack)
|
{
|
|
|
|
|
|
BindList();
|
|
}
|
}
|
|
//绑定列表
|
private void BindList()
|
{
|
|
Pagination pa = new Pagination();
|
pa.PageSize = 10000;
|
pa.PageIndex = 1;
|
|
|
|
Dictionary<int, object> searchParam = new Dictionary<int, object>();
|
Guid customeid = MyConvert.ConvertToGuid(Request["customeid"]);
|
if (!Guid.Empty.Equals(customeid))
|
SetParamValue(searchParam, 0, customeid);
|
SetParamValue(searchParam, 1, CurrentUser.MemberId);
|
SetParamValue(searchParam, 2, Request["txtOrderId"].ToString2());
|
SetParamValue(searchParam, 3, Request["txtCustormerName"].ToString2());
|
SetParamValue(searchParam, 4, Request["txtBeginData"].ToString2());
|
SetParamValue(searchParam, 5, Request["txtEndDate"].ToString2());
|
SetParamValue(searchParam, 6, Request["selPrintTypes"].ToString2());
|
SetParamValue(searchParam, 7, Request["selOrderTypes"].ToString2());
|
SetParamValue(searchParam, 8, Request["selOrderStates"].ToString2());
|
SetParamValue(searchParam, 9, Request["selPayStates"].ToString2());
|
SetParamValue(searchParam, 10, Request["txtCreaterName"].ToString2());
|
SetParamValue(searchParam, 11, Request["selCustormerLevels"].ToString2());
|
SetParamValue(searchParam, 12, Request["selAccountManagerId"].ToString2());
|
SetParamValue(searchParam, 13, Request["selBusinessManagerId"].ToString2());
|
|
|
|
|
|
|
List<EC_OrderBasic> result = _eC_OrderBasicBLL.SelectModelPage_Financial(pa, searchParam).ToList();
|
|
|
int aaa = 1;
|
|
//List<OA_DeliverPlan> oA_DeliverPlans1 = oA_DeliverPlans.OrderBy(x => x.DriverId).ThenBy(x => x.Sort).ToList();
|
ssshtml = "";
|
ssshtml += "<div class=\"printtable printtable1\"> <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border:0;\">";
|
ssshtml += "<tr><th style=\"width:2%;\">编号</th><th style=\"text-align:center;\"width=\"7%\">订单号</th><th width=\"20%\">印件名称</th><th width=\"15%\">客户名称</th><th style=\"text-align:center;\"width=\"5%\">印刷类别</th><th width=\"5%\">订单状态</th><th width=\"5%\">支付状态</th><th width=\"5%\">订单类型</th><th width=\"5%\">印刷数量</th><th width=\"5%\">金额</th><th width=\"5%\">已收款</th><th width=\"5%\">未收款</th></tr>";
|
for (int i = 0; i < result.Count; i++)
|
{
|
|
|
|
|
ssshtml += "<tr><td>" + (i+1) + "</td><td>" + result[i].SellerOrderId + "</td><td>" + result[i].DocumentName + "</td><td>" + result[i].BuyerName + "</td><td>" + result[i].PrintType.PrintName + "</td><td>" + result[i].OrderStateObj.Name + "</td><td>" + result[i].PayStateObj.Name + "</td><td>" + result[i].OrderType.Name + "</td><td>" + result[i].OrderExtend.PrintNum + " </td><td>" + result[i].SumPrice + "</td><td>" + result[i].TradingSingle.PayedMoney + "</td><td>" + result[i].UnPayedMoney + "</td></tr>";
|
|
|
|
|
}
|
ssshtml += "</table></div>";
|
|
// this.RepClientList.DataSource =
|
//this.RepClientList.DataBind();
|
//UCPager1.AspNetPager.RecordCount = pa.RecordCount;
|
}
|
|
/// <summary>
|
/// 设置查询参数方法
|
/// </summary>
|
/// <param name="target">设置目标</param>
|
/// <param name="key">键</param>
|
/// <param name="value">值</param>
|
private static void SetParamValue(Dictionary<int, object> target, int key, object value)
|
{
|
if (string.IsNullOrEmpty(string.Format("{0}", value)))
|
return;
|
else
|
{
|
}
|
|
if (target.ContainsKey(key))
|
{
|
target[key] = value;
|
}
|
else
|
{
|
target.Add(key, value);
|
}
|
}
|
}
|
}
|