C# Класс Card.SiDaTe

MainWindow.xaml 的交互逻辑
Наследование: ICard, IVerbose
Показать файл Открыть проект

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

Метод Описание
CheckGasCard ( short com, int baud ) : int
FormatGasCard ( short com, int baud, string kmm, string kh, string dqdm ) : int
GetError ( int errCode ) : string

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

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

读卡

SiDaTe ( ) : Com.Aote.Logs
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

写新卡(即开户)

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

Метод Описание
DoCheckCard ( int icdev ) : int
DoClearCard ( int icdev ) : int
DoInitCard2 ( int icdev, StringBuilder MeterNo, Double SumofCharge, Int32 BuyTimes, Double StartVolume, Double CurrPrice, Double SetPrice, StringBuilder PriceSetTime, Int16 CardState, Int16 DevT, Double AlarmMoney, Double MaxOverMoney ) : int
DoReadUserCard2 ( int icdev, StringBuilder MeterNo, Double &SumCharge, Int32 &BuyTimes, Int16 &CardState, Int16 &DevT, Int16 &IsInsert ) : int
DoSellGas2 ( int icdev, StringBuilder MeterNo, Double SumCharge, Int32 BuyTimes, Int16 DevT, Double CurrPrice, Double SetPrice, StringBuilder PriceSetTime, Double AlarmMoney, Double MaxOverMoney ) : int
auto_init ( Int16 Port, UInt32 Baud ) : int
ic_exit ( int icdev ) : Int16

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

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

public CheckGasCard ( short com, int baud ) : int
com short
baud int
Результат 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

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

public OpenCard ( short com, int baud ) : int
com short
baud int
Результат int

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

读卡
public ReadGasCard ( short com, int baud, string &kh, int &ql, decimal &money, short &cs, short &bkcs, string &yhh ) : int
com short 串口号,从0开始
baud int 波特率
kh string 设备编号,10位字符
ql int 气量,卡上有气不能购气
money decimal 金额,按金额计算的卡,卡上有金额不能购气(未用)
cs short 购气次数,以卡上购气次数为准。如果读不出,返回-1。返回-1后以数据库里为准
bkcs short 补卡次数,以卡上补卡次数为准。如果读不出,返回-1。返回-1后以数据库里为准(未用)
yhh string
Результат int

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

public SiDaTe ( ) : Com.Aote.Logs
Результат Com.Aote.Logs

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开始
baud int 波特率
kmm string 卡密码,写卡后返回新密码(未用,可以随便传个值)
kh string 设备编号,10位字符
dqdm string 地区代码,从气表管理里取(未用)
ql int 气量
csql int 上次购气量,有些表需要传(未用)
ccsql int 上上次购气量,有些表需要传(未用)
cs short 购气次数
ljgql int 当前表累计购气量(未用)
bjql int 报警气量
czsx int 充值上限,可以在气表管理中设置(未用)
tzed int 透支额度,可以在气表管理中设置(未用)
sqrq string 售气日期,格式为YYYYMMDD(未用)
cssqrq string 上次售气日期,格式为YYYYMMDD(未用)
oldprice int 旧单价,价格管理中取(未用)
newprice int 新单价,价格管理中取(未用)
sxrq string 生效日期,价格管理中取(未用)
sxbj string 生效标记,0不生效,1生效,价格管理中取(未用)
Результат 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开始
baud int 波特率
kmm string 卡密码,写卡后返回新密码(未用,可以随便传个值)
kzt short 卡状态,0开户卡,1用户卡(未用)
kh string 设备编号,10位字符
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 售气日期,格式为YYYYMMDD(未用)
cssqrq string 上次售气日期,格式为YYYYMMDD(未用)
oldprice int 旧单价,价格管理中取(未用)
newprice int 新单价,价格管理中取(未用)
sxrq string 生效日期,价格管理中取(未用)
sxbj string 生效标记,0不生效,1生效,价格管理中取(未用)
klx int
meterid string
Результат int