C# Class Card.ShanChengMY

Inheritance: ICard, IVerbose
Show file Open project: DuBin1988/newsellinggas

Public Methods

Method Description
CheckGasCard ( Int16 com, Int32 baud ) : int

判卡

FormatGasCard ( Int16 com, Int32 baud, string kmm, string kh, string dqdm ) : int

格式化卡

GetError ( int errCode ) : string

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

OpenCard ( Int16 com, Int32 baud ) : int
ReadGasCard ( short com, int baud, string &kh, int &ql, decimal &money, short &cs, short &bkcs, string &dm ) : int

读卡

ShanChengMY ( ) : System
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

写新卡

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

写新卡

Private Methods

Method Description
FormatCard ( Int32 icDev, byte keycode ) : int
ReadCard ( short com, byte keycode, byte cardNo, byte customerno, System.Int64 &BuyGasNum, Int32 &times, System.Int64 &remainnum, byte fgs, byte glz ) : int
ReadCompany ( short com, byte keycode ) : int
WriteNewUser ( short com, byte keycode, byte cardNo, byte customerno, System.Int64 BuyGasNum, Int32 times, System.Int64 sumnum, byte buydate, byte fgs, byte glz ) : int
WriteUser ( short com, byte keycode, System.Int64 BuyGasNum, Int32 times, System.Int64 sumnum, byte buydate, short UpdateFlag ) : int
ic_exit ( int icdev ) : int
ic_init ( Int16 com, Int32 baut ) : int

Method Details

CheckGasCard() public method

判卡
public CheckGasCard ( Int16 com, Int32 baud ) : int
com System.Int16 串口号,0代表串口1
baud System.Int32
return int

FormatGasCard() public method

格式化卡
public FormatGasCard ( Int16 com, Int32 baud, string kmm, string kh, string dqdm ) : int
com System.Int16 串口号,0代表串口1
baud System.Int32
kmm string 卡密码
kh string 卡号
dqdm string 地区代码
return int

GetError() public method

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

OpenCard() public method

public OpenCard ( Int16 com, Int32 baud ) : int
com System.Int16
baud System.Int32
return int

ReadGasCard() public method

读卡
public ReadGasCard ( short com, int baud, string &kh, int &ql, decimal &money, short &cs, short &bkcs, string &dm ) : int
com short 串口号,0代表串口1
baud int
kh string 卡号
ql int 气量
money decimal 金额
cs short 次数
bkcs short 补卡次数
dm string
return int

ShanChengMY() public method

public ShanChengMY ( ) : System
return System

Test() public method

public Test ( ) : string
return string

WriteGasCard() public method

售气写卡
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 生效标记
return int

WriteNewCard() public method

写新卡
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
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 生效标记
return int

WriteNewCard() public method

写新卡
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
return int