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.OA;
using CY.BLL.EC;
namespace CY.WebForm.Pages.business
{
//吴辉
//商业信函
public partial class AgSealPrint : BasePage
{
OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = null;
OA_IntentionCustomerBLL bll_OA_IntentionCustomerBLL = null;
EC_ExSingleTemBLL bll_EC_ExSingleTemBLL = null;
public int PrintWidth = 0;
public int PrintHeight = 0;
public string PrintType = "";
EC_OrderBasicBLL bll_EC_OrderBLL = null;
//初始化
public AgSealPrint()
{
bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL();
bll_OA_IntentionCustomerBLL = new OA_IntentionCustomerBLL();
bll_EC_ExSingleTemBLL = new EC_ExSingleTemBLL();
bll_EC_OrderBLL = new EC_OrderBasicBLL();
}
//页面加载
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string orderIdStr = Request["orderid"];
DataBindCorporate(orderIdStr);
}
}
///
/// 绑定打印数据
///
///
public void DataBindCorporate(string Keyid)
{
//PrintWidth = 2970;
//PrintHeight = 2100;
PrintWidth = 2100;
PrintHeight = 2970;
PrintType = "A4";
EC_OrderBasic _eC_OrderBasic = bll_EC_OrderBLL.SelectModelById(Convert.ToInt32(Keyid));
int iBagNum = 0;
int.TryParse(_eC_OrderBasic.OrderExtend.BagNum, out iBagNum);
string sdate = _eC_OrderBasic.DeliveryTime.Value.ToString("yyyy-MM-dd");
OA_CorporateClients oA_CorporateClients = null;
OA_CustomerCommunications oA_CustomerCommunications = null;
oA_CorporateClients = bll_OA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, _eC_OrderBasic.BuyerId);
oA_CustomerCommunications = bll_OA_CorporateClientsBLL.GetModel_CustomerCommunications(oA_CorporateClients.Keyid);
string Printhtml = "";
for (int i = 0; i < iBagNum; i++)
{
if (i % 2 == 0)
{
Printhtml = Printhtml + "
";
}
Printhtml = Printhtml + "
"
+"
"
+""
+ ""
+ "" + _eC_OrderBasic.SellerName+ "封签"
+" | "
+"
"
+ "
"
+ "
"
+ ""
+""
+"订单编号:"
+" | "
+ ""
+ ""+_eC_OrderBasic.SellerOrderId+""
+" | "
+"
"
+"
"
+ "
"
+ ""
+ ""
+ "印件名称"
+ " | "
+ ""
+ "" + _eC_OrderBasic.DocumentName + " | "
+ "
"
+ ""
+ ""
+ "委印单位"
+ " | "
+ "" + _eC_OrderBasic .SellerName+ ""
+ " | "
+ ""
+ "印刷数量"
+ " | "
+ "" + _eC_OrderBasic.OrderExtend.PrintNum+ ""
+ " | "
+ "
"
+ ""
+ ""
+ "书号"
+ " | "
+ "" + _eC_OrderBasic .OrderExtend.BookNum+ ""
+ " | "
+ ""
+ "定价"
+ " | "
+ "" + _eC_OrderBasic .OrderExtend.BookPrice+ ""
+ " | "
+ "
"
+ ""
+ ""
+ "每包数量"
+ " | "
+ ""+_eC_OrderBasic.OrderExtend.NumPerBag+""
+ " | "
+ ""
+ "总包数"
+ " | "
+ "" + _eC_OrderBasic.OrderExtend.BagNum + ""
+ " | "
+ ""
+ "本包号"
+ " | "
+ ""+ (i+1) +""
+ " | "
+ "
"
+ ""
+ ""
+ "包装"
+ " | "
+ ""
+ " | "
+ ""
+ "质检"
+ " | "
+ ""
+ " | "
+ ""
+ "出厂日期"
+ " | "
+ "" + sdate + ""
+ " | "
+ "
"
+ "
"
+ "
"
+ ""
+ "地址: | "
+ ""
+ "" + oA_CustomerCommunications.DetailedAddress + ""
+ " | "
+ ""
+ " 电话:"
+ " | "
+ ""
+ "" + oA_CustomerCommunications.CompanyPhone + ""
+ " | "
+ "
"
//+ ""
//+ "
"
+ "
"
+ "
";
if (i % 2 != 0)
{
Printhtml = Printhtml + "
";
}
}
this.divPrintHtml.InnerHtml = Printhtml;
}
}
}