Exemple #1
0
        public override void SetParamters(byte[] objParamters)
        {
            m_structBlankPara = new RuleExpression.BLANKVALPARA();
            BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters));

            pParameter.BaseStream.Position = 0;

            int nCount1 = pParameter.ReadInt32();

            //解析字符串
            Byte[] bb = new byte[nCount1];
            pParameter.Read(bb, 0, nCount1);
            string para_str = Encoding.Default.GetString(bb);

            para_str.Trim();

            string[] strResult = para_str.Split('|');

            int i = 0;

            m_structBlankPara.strAlias  = strResult[i++];
            m_structBlankPara.strScript = strResult[i++];
            m_structBlankPara.strFtName = strResult[i++];

            m_structBlankPara.iType = pParameter.ReadInt32();
            int fieldLength = pParameter.ReadInt32();

            //解析字段名
            if (fieldLength > 0)
            {
                Byte[] bb1 = new byte[fieldLength];
                pParameter.Read(bb1, 0, fieldLength);
                string strFields = Encoding.Default.GetString(bb1);

                strFields.Trim();

                //解析字段名
                string[] strResult1 = strFields.Split('|');

                m_structBlankPara.fieldArray = new List <string>();

                for (int j = 0; j < strResult1.Length; j++)
                {
                    m_structBlankPara.fieldArray.Add(strResult1[j]);
                }
            }

            int fieldNum = pParameter.ReadInt32();

            m_structBlankPara.fieldTypeArray = new ArrayList();

            int fType = -1;

            for (int f = 0; f < fieldNum; f++)
            {
                fType = pParameter.ReadInt32();
                m_structBlankPara.fieldTypeArray.Add(fType);
            }
        }
Exemple #2
0
        public override void SetParamters(byte[] objParamters)
        {
            m_structBlankPara = new RuleExpression.BLANKVALPARA();
            BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters));
            pParameter.BaseStream.Position = 0;

            int nCount1 = pParameter.ReadInt32();

            //�����ַ���
            Byte[] bb = new byte[nCount1];
            pParameter.Read(bb, 0, nCount1);
            string para_str = Encoding.Default.GetString(bb);
            para_str.Trim();

            string[] strResult = para_str.Split('|');

            int i = 0;
            m_structBlankPara.strAlias = strResult[i++];
            m_structBlankPara.strScript = strResult[i++];
            m_structBlankPara.strFtName = strResult[i++];

            m_structBlankPara.iType = pParameter.ReadInt32();
            int fieldLength = pParameter.ReadInt32();

            //�����ֶ���
            if (fieldLength > 0)
            {
                Byte[] bb1 = new byte[fieldLength];
                pParameter.Read(bb1, 0, fieldLength);
                string strFields = Encoding.Default.GetString(bb1);

                strFields.Trim();

                //�����ֶ���
                string[] strResult1 = strFields.Split('|');

                m_structBlankPara.fieldArray = new List<string>();

                for (int j = 0; j < strResult1.Length; j++)
                {
                    m_structBlankPara.fieldArray.Add(strResult1[j]);
                }
            }

            int fieldNum = pParameter.ReadInt32();
            m_structBlankPara.fieldTypeArray = new ArrayList();

            int fType = -1;

            for (int f = 0; f < fieldNum; f++)
            {
                fType = pParameter.ReadInt32();
                m_structBlankPara.fieldTypeArray.Add(fType);
            }
        }