Пример #1
0
        public bool IntegralParseLine(string strValue, string strSplit, out CMSMStruct.IntegralStruct its, out Exception err)
        {
            int i = 0;

            its = new CMSMData.CMSMStruct.IntegralStruct();
            err = null;
            try
            {
                string[] strFields = strValue.Split(strSplit.ToCharArray());
                its.strSerial   = strFields[i++];
                its.strAssID    = strFields[i++];
                its.strCardID   = strFields[i++];
                its.strIgType   = strFields[i++];
                its.iIgLast     = int.Parse(strFields[i++]);
                its.iIgGet      = int.Parse(strFields[i++]);
                its.iIgArrival  = int.Parse(strFields[i++]);
                its.iLinkCons   = int.Parse(strFields[i++]);
                its.strIgDate   = strFields[i++];
                its.strOperName = strFields[i++];
                its.strComments = strFields[i++];
                its.strDeptID   = strFields[i++];
            }
            catch (Exception e)
            {
                err = e;
                return(false);
            }
            return(true);
        }
Пример #2
0
        public string ToIntegralString(CMSMStruct.IntegralStruct asstmp)
        {
            /*
             * iSerial--DU001
             * iAssID--DU002
             * vcCardID--DU003
             * vcIgType--DU004
             * iIgLast--DU005
             * iIgGet--DU006
             * iIgArrival--DU007
             * iLinkCons--DU008
             * dtIgDate--DU009
             * vcOperName--DU010
             * vcComments--DU011
             * vcDeptID--DU012
             * DU018--数据类型:1--会员资料;2--消费明细;3--小票数据;4--积分日志;5--充值日志;6--营业日志
             */
            StringBuilder sb = new StringBuilder(1024);

            sb.Append(asstmp.strSerial);
            sb.Append(",");
            sb.Append(asstmp.strAssID);
            sb.Append(",");
            sb.Append(asstmp.strCardID);
            sb.Append(",");
            sb.Append(asstmp.strIgType);
            sb.Append(",");
            sb.Append(asstmp.iIgLast.ToString());
            sb.Append(",");
            sb.Append(asstmp.iIgGet.ToString());
            sb.Append(",");
            sb.Append(asstmp.iIgArrival.ToString());
            sb.Append(",");
            sb.Append(asstmp.iLinkCons.ToString());
            sb.Append(",");
            sb.Append(asstmp.strIgDate);
            sb.Append(",");
            sb.Append(asstmp.strOperName);
            sb.Append(",");
            sb.Append(asstmp.strComments);
            sb.Append(",");
            sb.Append(asstmp.strDeptID);
//			sb.Append(",null,null,null,null,null,4");
            return(sb.ToString());
        }