using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NetLibrary.Express;
namespace TradeModel
{
public class OrderPrcel
{
///
/// 快递服务名称
///
public string ExpressService { get; set; }
public int ExpressID { get; set; }
public int ExpressType { get; set; }
public string OrderDate { get; set; }
///
/// 打印路径
///
public List ListPrintTemplate { get; set; }
///
/// 国家编号,通过邮编前N位读取
///
public string AreaSerial { get; set; }
public string AreaSerial2 { get; set; }
///
/// 买家国家
///
public String RevCountry { get; set; }
public String CountryCode { get; set; }
///
/// 买家国家
///
public String CountryName { get; set; }
///
/// 收件人
///
public string RevPerson { get; set; }
///
/// 收件地址
///
public string RevAddress { get; set; }
///
/// 收件人电话
///
public string RevPhone { get; set; }
///
/// 收件人电话
///
public string RevMobile { get; set; }
///
/// 收件人邮编
///
public string RevZip { get; set; }
///
/// 收件人邮编条码图片路径
///
public string RevZipBarCode { get; set; }
///
/// 发件人
///
public string SendPerson { get; set; }
///
/// 发件地址
///
public string SendAddress { get; set; }
///
/// 发件人电话
///
public string SendPhone { get; set; }
///
/// 发件人邮编
///
public string SendZip { get; set; }
///
/// 条码
///
public string BarCode { get; set; }
///
/// 订单号
///
public string OrderCode { get; set; }
///
/// 物品合计数量
///
public string CountGoodsNum { get; set; }
///
/// 物品合计价格
///
public string CountGoodsPrice { get; set; }
///
/// 物品合计重量
///
public string CountGoodsWeight { get; set; }
public List ListModel { get; set; }
public string ShopName { get; set; }
public OrderPrcel()
{
ListPrintTemplate = new List();
ListModel = new List();
}
public void CreateRevZipBarCode()
{
RevZipBarCode = "../attached/Code128/code128_420" + this.RevZip + ".jpg";
string imgPath = AppDomain.CurrentDomain.BaseDirectory + "attached/Code128/code128_420" + this.RevZip + ".jpg";
if (System.IO.File.Exists(imgPath) == true) return;
string barType = "A";
string rawData = "420" + this.RevZip;
if (string.IsNullOrEmpty(barType))
{
barType = "C";
}
int cw = 1;
int hm = 1;
int vm = 1;
bool showblank = true;
bool showfont = true;
int emSize = 16;
int textA = 1;
absCode128 code128;
code128 = new GS1_128(rawData);
code128.BarCellWidth = (byte)cw;
code128.HorizontalMulriple = (byte)hm;
code128.VerticalMulriple = (byte)vm;
code128.ShowBlank = showblank;
code128.DataDisplay = showfont;
code128.FontSize = emSize;
code128.TextAlignment = (System.Drawing.StringAlignment)textA;
System.Drawing.Image img = code128.GetBarCodeImage();
img.Save(imgPath, System.Drawing.Imaging.ImageFormat.Jpeg);
img.Dispose();
}
}
public class OrderPrcelDetail
{
public String GoodsCode { get; set; }
///
/// 物品数量
///
public String GoodsNum { get; set; }
///
/// 物品单价
///
public String GoodsPrice { get; set; }
///
/// 重量
///
public String GoodsWeight { get; set; }
///
/// 物品名称
///
public String GoodsName { get; set; }
///
/// 物品简称
///
public String GoodsSimpleName { get; set; }
///
/// 产地
///
public String GoodsOrigin { get; set; }
///
/// 打印单上的SKU
///
public string GoodsSku { get; set; }
public string TypeDesc { get; set; }
public string PostionDesc { get; set; }
}
}