ClearCard() public static method

public static ClearCard ( short com, int baud ) : int
com short
baud int
return int
Exemplo n.º 1
0
        public int WriteNewCard(short com, int baud, ref string kmm, short kzt, string kh, string dqdm, string yhh, string tm, int ql, int csql, int ccsql, short cs, int ljgql, short bkcs, int ljyql, int bjql, int czsx, int tzed, string sqrq, string cssqrq, int oldprice, int newprice, string sxrq, string sxbj)
        {
            //清卡,新卡,卡上有内容
            MingHua.ClearCard(com, baud);

            HtDll.HTDL card = new HtDll.HTDL();
            //用户卡清卡
            card.ClearCard(com, baud);

            int result;

            //发卡
            if (kzt == 0)
            {
                //调用发卡
                result = card.NewCard(com, baud, 1, ql, kh, bjql);
            }
            else
            {
                //调用补卡
                result = card.CardInit(com, baud, 1, ql, kh, bjql, 5, "20131008", 0, cs);
            }
            Log.Debug("write card end ret=" + result);
            return(result);
        }
Exemplo n.º 2
0
        public int WriteNewCard(short com, int baud, ref string kmm, short kzt, string kh, string dqdm, string yhh, string tm, int ql, int csql, int ccsql, short cs, int ljgql, short bkcs, int ljyql, int bjql, int czsx, int tzed, string sqrq, string cssqrq, int oldprice, int newprice, string sxrq, string sxbj)
        {
            //清卡,新卡,卡上有内容
            MingHua.ClearCard(com, baud);
            //用户卡清卡
            StaticNewCard(com, baud);

            //卡号
            byte[] cardno = System.Text.Encoding.GetEncoding(1252).GetBytes(kh);

            int result;

            //发卡
            if (kzt == 0)
            {
                //调用发卡
                result = StaticInitCard(com, baud,
                                        cardno, ql, 0, cs,
                                        1, //初始化卡类型(1:发卡;3:补购气卡;0:补用户卡)
                                        2, //表型(1:一体表;2 ; 分体表 ,3:工业表)
                                        null);
            }
            else
            {
                //调用补卡
                result = StaticInitCard(com, baud,
                                        cardno, ql, 0, cs,
                                        2, //初始化卡类型(1:发卡;2:补购气卡;0:补用户卡)
                                        2, //表型(1:一体表;2 ; 分体表 ,3:工业表)
                                        null);
                Log.Debug("补卡结果:" + result);
            }
            Log.Debug("write new card end ret=" + result);
            return(result);
        }