C# Класс Card.KeLuoMuMZ

对卡操作的描述及操作时需要特别注意的问题的描述
Наследование: ICard, IVerbose
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Log Log

Открытые методы

Метод Описание
CheckGasCard ( Int16 com, Int32 baud ) : int

判卡

FormatGasCard ( short com, int baud, string kmm, string kh, string dqdm ) : int
GetError ( int errCode ) : string

根据错误码,该错误码不在GenericService的Errors数组中,数组中的错误,统一处理,此处只返回不在错误列表中的错误信息

KeLuoMuMZ ( ) : System
OpenCard ( Int16 com, Int32 baud ) : int

航天卡实现,其他不用

ReadGasCard ( short com, int baud, string &kh, int &ql, decimal &money, short &cs, short &bkcs, string &dqdm ) : int

读卡

Test ( ) : string
WriteGasCard ( short com, int baud, string &kmm, string kh, string dqdm, int ql, int csql, int ccsql, short cs, int ljgql, int bjql, int czsx, int tzed, string sqrq, string cssqrq, int oldprice, int newprice, string sxrq, string sxbj ) : int

售气写卡

WriteNewCard ( short com, int baud, 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, int klx, string meterid ) : int

写新卡

Приватные методы

Метод Описание
MakeGasCard ( Int16 com, byte cardNo, byte customeNo, Int16 orderNum, Int32 orderamount ) : int
ReadGasCard ( Int16 com, byte kh, byte yhh, Int32 &ql, Int32 &cs, Int32 &ljgql, Int32 &syql, Int32 &klx ) : Int32
StaticCheckGasCard ( Int16 com, byte Istrue ) : int
StaticFormatGasCard ( Int16 com, byte customeNo ) : int
StaticWriteGasCard ( Int16 com, byte cardNo, byte customeNo, Int32 orderNum, Int32 orderamount ) : Int16
Staticrd_Company ( Int16 com, byte Istrue ) : int

Описание методов

CheckGasCard() публичный Метод

判卡
public CheckGasCard ( Int16 com, Int32 baud ) : int
com System.Int16 串口号,0代表串口1
baud System.Int32
Результат int

FormatGasCard() публичный Метод

public FormatGasCard ( short com, int baud, string kmm, string kh, string dqdm ) : int
com short
baud int
kmm string
kh string
dqdm string
Результат int

GetError() публичный Метод

根据错误码,该错误码不在GenericService的Errors数组中,数组中的错误,统一处理,此处只返回不在错误列表中的错误信息
public GetError ( int errCode ) : string
errCode int 错误代码
Результат string

KeLuoMuMZ() публичный Метод

public KeLuoMuMZ ( ) : System
Результат System

OpenCard() публичный Метод

航天卡实现,其他不用
public OpenCard ( Int16 com, Int32 baud ) : int
com System.Int16 串口号,0代表串口1
baud System.Int32
Результат int

ReadGasCard() публичный Метод

读卡
public ReadGasCard ( short com, int baud, string &kh, int &ql, decimal &money, short &cs, short &bkcs, string &dqdm ) : int
com short 串口号,0代表串口1
baud int
kh string 卡号
ql int 气量
money decimal 金额
cs short 次数
bkcs short 补卡次数
dqdm string 地区代码
Результат int

Test() публичный Метод

public Test ( ) : string
Результат string

WriteGasCard() публичный Метод

售气写卡
public WriteGasCard ( short com, int baud, string &kmm, string kh, string dqdm, int ql, int csql, int ccsql, short cs, int ljgql, int bjql, int czsx, int tzed, string sqrq, string cssqrq, int oldprice, int newprice, string sxrq, string sxbj ) : int
com short 串口号,0代表串口1
baud int
kmm string 卡密码
kh string 卡号
dqdm string 地区代码
ql int 气量,小于或等于0,表示退气,大于0表示购气。
csql int 上次气量
ccsql int 上上次气量
cs short 次数
ljgql int 累购气量
bjql int 报警气量
czsx int 充值上限
tzed int 透支额度
sqrq string 售气日期
cssqrq string 上次售气日期
oldprice int 老价格
newprice int 新价格
sxrq string 售气日期
sxbj string 生效标记
Результат int

WriteNewCard() публичный Метод

写新卡
public WriteNewCard ( short com, int baud, 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, int klx, string meterid ) : int
com short 串口号,0代表串口1
baud int
kmm string 卡密码
kzt short 卡状态
kh string 卡号
dqdm string 地区代码
yhh string 用户号
tm string 条码
ql int 气量
csql int 上次气量
ccsql int 上上次气量
cs short 次数
ljgql int 累购气量
bkcs short 补卡次数
ljyql int 累计用气量
bjql int 报警气量
czsx int 充值上限
tzed int 透支额度
sqrq string 售气日期
cssqrq string 上次售气日期
oldprice int 老价格
newprice int 新价格
sxrq string 生效日期
sxbj string 生效标记
klx int
meterid string
Результат int

Описание свойств

Log публичное статическое свойство

得到日志实例。代码中的写法为了兼顾以前卡的封装 对于新卡,按照下行的方式来写 private static log4net.ILog Log = log4net.LogManager.GetLogger(typeof(KeLuoMuMZ));
public static Log Log
Результат Log