Beispiel #1
0
        private void btnQuerySubmit_Click(object sender, EventArgs e)
        {
            listViewOrder.Items.Clear();
            WebService.LabelPrint serv = new WebService.LabelPrint();
            string           _val      = serv.list(txtdateStart.Value, txtdateEnd.Value);
            List <OrderList> list      = Serializer.XmlDeSerialize <List <OrderList> >(_val);

            foreach (OrderList order in list)
            {
                if (checkBoxStatus.Checked && !bool.Parse(order.Isqs))
                {
                    continue;
                }

                if (bool.Parse(order.Isqs))
                {
                    order.Isqs = "已签收";
                }
                else
                {
                    order.Isqs = "未签收";
                }

                if (TxtBillSn.Text.TrimEnd().Length > 0 && order.Ordersn.IndexOf(TxtBillSn.Text.TrimEnd()) < 0)
                {
                    continue;
                }
                ListViewItem lvi = new ListViewItem(new string[] { order.Odate, order.Ordersn, order.Note, order.Chdm, order.Isqs, order.Creater });
                lvi.Tag = order;
                listViewOrder.Items.Add(lvi);
            }
            panel1.Visible = false;
        }
Beispiel #2
0
        private void LoadData()
        {
            WebService.LabelPrint serv = new WebService.LabelPrint();
            string rel = serv.BarCodeOrderId(txtBarCode.Text);
            List <OrderLabelInfo> Labels = Serializer.XmlDeSerialize <List <OrderLabelInfo> >(rel);

            if (Labels.Count == 0)
            {
                MessageBox.Show("找不到该条码");
                return;
            }
            foreach (OrderLabelInfo lable in Labels)
            {
                if (!dictLable.ContainsKey(lable.Sphh))
                {
                    dictLable.Add(lable.Sphh, lable);
                }
            }
            /*条码明细*/
            rel = serv.BarCodeDetail(txtBarCode.Text);
            OrderLabelDetail detail = Serializer.XmlDeSerialize <OrderLabelDetail>(rel);
            ListViewItem     lvi    = new ListViewItem(new string[] { detail.Spid, detail.Tm, detail.Qrcode, detail.Hx, detail.Lsdj });

            DetailList.Add(detail);

            listView1.Items.Add(lvi);
            txtBarCode.Text = "";

            loading.hide();
        }
Beispiel #3
0
        /// <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();
        }
Beispiel #4
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();
        }
Beispiel #5
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();
            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();
        }
Beispiel #6
0
        private void btnQuerySubmit_Click(object sender, EventArgs e)
        {
            listViewOrder.Items.Clear();
            WebService.LabelPrint serv = new WebService.LabelPrint();
            string           _val      = serv.list(txtdateStart.Value, txtdateEnd.Value);
            List <OrderList> list      = Serializer.XmlDeSerialize <List <OrderList> >(_val);

            foreach (OrderList order in list)
            {
                ListViewItem lvi = new ListViewItem(new string[] { order.Odate, order.Ordersn, order.Note });
                lvi.Tag = order;
                listViewOrder.Items.Add(lvi);
            }
            panel1.Visible = false;
        }
Beispiel #7
0
        private void listViewOrder_DoubleClick(object sender, EventArgs e)
        {
            listViewDetail.Items.Clear();
            if (listViewOrder.SelectedItems.Count < 1)
            {
                return;
            }
            int id = int.Parse(((OrderList)listViewOrder.SelectedItems[0].Tag).Id);

            WebService.LabelPrint serv = new WebService.LabelPrint();
            string _val = serv.orderItem(id);
            List <OrderLabelItem> list = Serializer.XmlDeSerialize <List <OrderLabelItem> >(_val);

            foreach (OrderLabelItem item in list)
            {
                ListViewItem lvi = new ListViewItem(new string[] { item.Sphh, item.Spmc, item.Sl, item.Temp, "" });
                lvi.Checked = true;
                listViewDetail.Items.Add(lvi);
            }
        }