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 queryStore(string epc)
 {
     try
     {
         if (tabControl.SelectedTab?.Text == "门店退货查询")
         {
             TagDetailInfo tag = getTagDetailInfoByEpc(epc);
             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未注册");
             }
         }
     }
     catch (Exception ex)
     {
         Log4netHelper.LogError(ex);
     }
 }