/// <summary> /// 打印标签 /// </summary> private void PrintLabel() { if (listViewOrder.SelectedItems.Count < 1) { return; } OrderList _order = (OrderList)listViewOrder.SelectedItems[0].Tag; int id = int.Parse(_order.Id); WebService.LabelPrint serv = new WebService.LabelPrint(); string _val = serv.orderDetail40mm(id); List <OrderLabelDetail> detaillist = Serializer.XmlDeSerialize <List <OrderLabelDetail> >(_val); log.InfoFormat("条码:{0}", _val); LabelPrint14 _print = new LabelPrint14(printType); /*获取订单明细记录*/ _print.detaillist = LabelDetailGenerate(DataFilter(detaillist));//此处添加筛选 /*获取标签内容*/ _val = serv.ItemInfo(id); _print.DictLabel = common.List2Dict(Serializer.XmlDeSerialize <List <OrderLabelInfo> >(_val)); _print.Order = _order; _print.print(); labelinfo = _print.pagelabel; //返回页面打印内容情况 labelinfo.info = String.Format("订单号:{0}订单日期:{1}", _order.Ordersn, _order.Odate); LoadHide(); }
private void LoadDetail() { if (listViewOrder.SelectedItems.Count < 1) { return; } OrderList _order = (OrderList)listViewOrder.SelectedItems[0].Tag; int id = int.Parse(_order.Id); WebService.LabelPrint serv = new WebService.LabelPrint(); List <OrderLabelDetail> detaillist = new List <OrderLabelDetail>(); foreach (ListViewItem item in listViewDetail.Items) { if (item.Checked) { labelLoading.Text = String.Format("正在下载{0}信息", item.SubItems[0].Text); string _val = serv.orderDetailItem(id, item.SubItems[0].Text); //log.Info(_val); List <OrderLabelDetail> _detaillist = Serializer.XmlDeSerialize <List <OrderLabelDetail> >(_val); log.InfoFormat("记录数:{0}", _detaillist.Count); detaillist.AddRange(_detaillist); } } labelLoading.Text = "开始打印..."; LabelPrint14 _print = new LabelPrint14(printType); _print.PageLableCount = 12; _print.LabelHeigth = 108; _print.LabelTotalHeigth = 203; _print.LabelWidth = 45; /*获取订单明细记录*/ _print.detaillist = detaillist; /*获取标签内容*/ string _strval = serv.ItemInfo(id); log.InfoFormat("标签内容:{0}", _strval); _print.DictLabel = common.List2Dict(Serializer.XmlDeSerialize <List <OrderLabelInfo> >(_strval)); _print.Order = _order; _print.print(); labelinfo = _print.pagelabel; //返回页面打印内容情况 labelinfo.info = String.Format("订单号:{0}订单日期:{1}", _order.Ordersn, _order.Odate); LoadHide(); }
private void PrintLable() { LabelPrint14 _print = new LabelPrint14(0); _print.PageLableCount = 12; _print.LabelHeigth = 108; _print.LabelTotalHeigth = 203; _print.LabelWidth = 45; /*获取订单明细记录*/ _print.detaillist = DetailList; /*获取标签内容*/ _print.DictLabel = dictLable; _print.print(); //labelinfo = _print.pagelabel; //返回页面打印内容情况 //labelinfo.info = String.Format("订单号:{0}订单日期:{1}", _order.Ordersn, _order.Odate); loading.hide(); }