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)
{
int com1 = com;
int cs1 = 0;
int type = 0;
byte[] kh2 = new byte[8];
int ql2 = 0;
int type1 = 0;
Gold_Readcard(com1, baud, kh2, ref ql2, ref cs1, ref type);
Gold_Formatcard(com, baud, kh2);
int klx = 1;//代表民用
byte[] kh1 = new byte[8];
kh1 = System.Text.Encoding.GetEncoding(1252).GetBytes(kh);
Log.Debug("MY Gold_Writecard start and kh is " + kh1 + " ql is " + ql + " cs is" + cs);
int i = Gold_Writecard(com, baud, kh1, ql, cs, klx);
Log.Debug("MY Gold_Writecard end and i is " + i);
return i;
}