示例#1
0
        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();
            string _val = serv.orderDetail(id);
            List <OrderLabelDetail> detaillist = Serializer.XmlDeSerialize <List <OrderLabelDetail> >(_val);

            LabelPrint _print = new LabelPrint(printType);

            _print.LeftMargin = (320 - 45 * 6) / 2;
            _print.topMargin  = (440 - 203 * 2) / 2;

            /*获取订单明细记录*/
            _print.detaillist = DataFilter(detaillist);//此处添加筛选

            /*获取标签内容*/
            _val             = serv.ItemInfo(id);
            _print.DictLabel = common.List2Dict(Serializer.XmlDeSerialize <List <OrderLabelInfo> >(_val));

            _print.print();
            labelinfo      = _print.pagelabel; //返回页面打印内容情况
            labelinfo.info = String.Format("订单号:{0}订单日期:{1}", _order.Ordersn, _order.Odate);

            LoadHide();
        }
示例#2
0
        private void PrintLable()
        {
            LabelPrint _print = new LabelPrint(0);

            _print.LeftMargin = (320 - 45 * 6) / 2;
            _print.topMargin  = (440 - 203 * 2) / 2;

            /*获取订单明细记录*/
            _print.detaillist = DetailList;

            /*获取标签内容*/
            _print.DictLabel = dictLable;

            _print.print();
            //labelinfo = _print.pagelabel; //返回页面打印内容情况
            //labelinfo.info = String.Format("订单号:{0}订单日期:{1}", _order.Ordersn, _order.Odate);
            loading.hide();
        }