Exemple #1
0
        void check(string epc)
        {
            try
            {
                TagDetailInfo tag    = GetTagDetailInfoByEpc(epc);
                string        curTab = tabControl.SelectedTab.Name.Trim();
                if (curTab == "checkEpc")
                {
                    Invoke(new Action(() =>
                    {
                        if (tag == null)
                        {
                            grid.Rows.Insert(0, "", "", "", "", epc, "EPC未注册");
                            grid.Rows[0].DefaultCellStyle.BackColor = Color.OrangeRed;
                        }
                        else
                        {
                            grid.Rows.Insert(0, "", tag.ZSATNR, tag.ZCOLSN, tag.ZSIZTX, epc, "");
                        }

                        lblCount.Text = epcList.Count.ToString();
                    }));
                }
                if (curTab == "deStoreCheck")
                {
                    Invoke(new Action(() =>
                    {
                        CDeliverStoreQuery re = SAPDataService.getDeliverStore(epc);
                        metroGrid1.Rows.Add(re.store, re.mtr, re.bar, re.shipDate, re.hu, re.msg);
                    }));
                }
                if (curTab == "storeReturnCheck")
                {
                    Invoke(new Action(() =>
                    {
                        if (tag != null)
                        {
                            CStoreQuery sq = SAPDataService.getStoreFromSAP(tag.EPC);
                            metroGrid2.Rows.Insert(0, grid.Rows.Count, tag.EPC, tag.ZSATNR, tag.ZCOLSN, tag.ZSIZTX, tag.PUT_STRA, sq.barcd, sq.storeid, sq.hu, sq.pxqty_fh, sq.flag, sq.equip_hla, sq.loucheng, sq.date, sq.time);
                        }
                        else
                        {
                            metroGrid2.Rows.Insert(0, grid.Rows.Count, "EPC未注册", "EPC未注册", "EPC未注册", "EPC未注册", "EPC未注册", "EPC未注册", "EPC未注册", "EPC未注册", "EPC未注册", "EPC未注册");
                            grid.Rows[0].DefaultCellStyle.BackColor = Color.OrangeRed;
                        }
                    }));
                }
            }
            catch (Exception ex)
            {
                Log4netHelper.LogError(ex);
            }
        }
Exemple #2
0
 void queryStoreDeliver(string epc)
 {
     if (tabControl.SelectedTab?.Text == "发货门店查询")
     {
         try
         {
             CDeliverStoreQuery re = SAPDataService.getDeliverStore(epc);
             metroGrid1.Rows.Add(re.store, re.mtr, re.bar, re.shipDate, re.hu, re.msg);
         }
         catch (Exception ex)
         {
             Log4netHelper.LogError(ex);
         }
     }
 }