private void ReportResult(string name, string idcardType, string cardID, string receipt, string result)
        {
            string         outstring;
            string         strsql = "";
            AccessOperator Accor  = new AccessOperator();

            //01身份证
            MsgPutOut("数据回盘", "正在回盘数据,请耐心等待...");
            string recode = TCPinterface.ReportResult(name, idcardType, cardID, receipt, result, out outstring);

            if (recode.Equals("0000"))
            {
                strsql = "UPDATE ProductData SET [Status01]='4' WHERE [SHBZHM28]='" + cardID + "'";
                ucFlowChart1.SetStepStatus(4, true);
                MsgPutOut("数据回盘", "回盘成功");
            }
            else
            {
                strsql = "UPDATE ProductData SET [Status01]='3' WHERE [SHBZHM28]='" + cardID + "'";
                ucFlowChart1.SetStepStatus(4, false);
                MsgPutOut("数据回盘", "回盘失败:" + outstring);
            }
            int count = Accor.ExecuteNonQuery(strsql);

            if (count <= 0)
            {
                MsgPutOut("数据回盘", "更新本地数据库失败");
            }
        }
        private int SaveData(string idcard, string carddata, string idcardType, string receipt)
        {
            //Status01,CGBZ02,SBYY03,KSDM04,YHKH05,KSBM06,ATR07,ShJPCH08,SJPCH09,CSMC10,
            //CJJGZKPCH11,CJJGMC12,XZQHDM13,XZQHMC14,DWBH15,DWMC16,YXBJ17,KDLB18,GFBB19,
            //CSHJGBM20,FKRQ21,KYXQ22,KH23,SGDBBH24,ZKZL25,RYCCSLDBM26,XM27,SHBZHM28,YHBM29,XB30,
            //MZ31,CSRQ32,XMKZ33,CSD34,BHKBZ35,CSKSBM36,SGRSBH37,ZZMM38,CZDZ39,HKXZ40,
            //HKSZD41,XL42,GRSF43,ZJLX44,ZJHM45,ZJYXQ46,ZJZZRQ47,LXDH48,GJ49,ZY50,
            //HYLB51,JHRXM52,JHRXB53,JHRZJLX54,JHRZJHM55,JHRDZ56,JHRLXDH57,JYHKH58,YL1,YL2
            AccessOperator Accor  = new AccessOperator();
            string         sql    = "SELECT [SHBZHM28] FROM ProductData WHERE [SHBZHM28]='" + idcard + "'";
            DataTable      dtread = Accor.ExecuteDataTable(sql);

            if (dtread.Rows.Count > 0)
            {
                return(0);
            }
            string tableFields = "Status01,CGBZ02,SBYY03,KSDM04,YHKH05,KSBM06,ATR07,ShJPCH08,SJPCH09,CSMC10,CJJGZKPCH11,CJJGMC12,XZQHDM13,XZQHMC14,DWBH15,DWMC16,YXBJ17,KDLB18,GFBB19,CSHJGBM20,FKRQ21,KYXQ22,KH23,SGDBBH24,ZKZL25,RYCCSLDBM26,XM27,SHBZHM28,YHBM29,XB30,MZ31,CSRQ32,XMKZ33,CSD34,BHKBZ35,CSKSBM36,SGRSBH37,ZZMM38,CZDZ39,HKXZ40,HKSZD41,XL42,GRSF43,ZJLX44,ZJHM45,ZJYXQ46,ZJZZRQ47,LXDH48,GJ49,ZY50,HYLB51,JHRXM52,JHRXB53,JHRZJLX54,JHRZJHM55,JHRDZ56,JHRLXDH57,JYHKH58,YL1,YL2,FullDATA59,BY60,BY61,BY62";

            string[] tabledata   = tableFields.Split(',');
            string[] data        = carddata.Split('|');
            string   insertvalue = "'1','','','','','','','" + carddata.Replace("|", "','") + "','" + carddata + "','" + idcardType + "','" + receipt + "',''";
            string   strsql      = "insert into ProductData (" + tableFields + ") values (" + insertvalue + ")";
            int      count       = Accor.ExecuteNonQuery(strsql);
            int      ret         = count > 0 ? 0 : -1; //插入成功或失败

            return(ret);
        }
        private void ProductCard(string name, string idcardType, string idNo, string receipt)
        {
            string ICdata    = "";
            string reportStr = "";
            string strsql    = "";

            ICdata = TCPinterface.WriteICBaseData(name, idcardType, idNo, receipt) + "#" + GlobalClass.fulldata;

            AccessOperator Accor = new AccessOperator();
            PrintParameter pp    = new PrintParameter();

            tvCardInit.Enabled = false;
            int ret = ProductExecute(pp, ICdata, out reportStr);

            if (ret != 0)
            {
                MsgPutOut("制作卡片", "制卡失败。错误:" + ret);
                strsql = "UPDATE ProductData SET [Status01]='2' WHERE [SHBZHM28]='" + idNo + "'";
                int count = Accor.ExecuteNonQuery(strsql);
                if (count <= 0)
                {
                    MsgPutOut("制作卡片", "更新本地数据库失败");
                }
            }
            else
            {
                MsgPutOut("制作卡片", "制卡成功!");
                string[] strrep = reportStr.Split('|');
                strsql = "UPDATE ProductData SET [Status01]='3',[CGBZ02]='1',[SBYY03]='',[KSDM04]='"
                         + strrep[0] + "',[YHKH05]='" + strrep[1] + "',[KSBM06]='" + strrep[2] + "',[ATR07]='" + strrep[3] + "' WHERE [SHBZHM28]='" + idNo + "'";
                int count = Accor.ExecuteNonQuery(strsql);
                if (count <= 0)
                {
                    MsgPutOut("制作卡片", "更新本地数据库失败");
                }
                ReportResult(name, idcardType, idNo, receipt, reportStr);
            }
            RefreshTree();
            tvCardInit.Enabled = true;
        }