Ejemplo n.º 1
0
        /// <summary>
        /// 获取所有表的信息
        /// </summary>
        /// <param name="Result"></param>
        /// <returns></returns>
        public int GetTables(ref string Result)
        {
            int handle = 0;

            if (0 != Connect(ref handle))
            {
                return(SOAP_FAULT);
            }
            int[] ids   = new int[999];
            int   count = 999;

            if (0 != RTb_get_tables(handle, ids, ref count))
            {
                return(SOAP_FAULT);
            }
            _RT_TABLE field = new _RT_TABLE();

            for (int i = 0; i < count; i++)
            {
                field.id = ids[i];

                try
                {
                    if (0 == RTb_get_table_property_by_id(handle, ref field))
                    {
                        Result += field.id.ToString() + "," + field.name + "," + field.desc + "|";
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            if (string.IsNullOrEmpty(Result))
            {
                return(SOAP_FAULT);
            }
            else
            {
                Result = Result.Remove(Result.Length - 1);
            }

            return(SOAP_OK);
        }
Ejemplo n.º 2
0
 private static extern int RTb_get_table_property_by_id(int handle, ref _RT_TABLE field);
Ejemplo n.º 3
0
 private static extern int RTb_append_table(int handle, ref _RT_TABLE table);
Ejemplo n.º 4
0
        /// <summary>
        /// 获取所有表的信息
        /// </summary>
        /// <param name="Result"></param>
        /// <returns></returns>
        public int GetTables(ref string Result)
        {
            int handle = 0;
            if (0 != Connect(ref handle))
            {
                return SOAP_FAULT;
            }
            int[] ids = new int[999];
            int count = 999;
            if (0 != RTb_get_tables(handle, ids, ref count))
            {
                return SOAP_FAULT;
            }
            _RT_TABLE field = new _RT_TABLE();
            for (int i = 0; i < count; i++)
            {
                field.id = ids[i];

                try
                {
                    if (0 == RTb_get_table_property_by_id(handle, ref field))
                    {
                        Result += field.id.ToString() + "," + field.name + "," + field.desc + "|";
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            if (string.IsNullOrEmpty(Result))
            {
                return SOAP_FAULT;
            }
            else
            {
                Result = Result.Remove(Result.Length - 1);
            }

            return SOAP_OK;
        }
Ejemplo n.º 5
0
 public int AppendTable(int handle, ref _RT_TABLE table)
 {
     return RTb_append_table(handle, ref table);
 }
Ejemplo n.º 6
0
 private extern static int RTb_get_table_property_by_id(int handle, ref _RT_TABLE field);
Ejemplo n.º 7
0
 public int AppendTable(int handle, ref _RT_TABLE table)
 {
     return(RTb_append_table(handle, ref table));
 }
Ejemplo n.º 8
0
 private extern static int RTb_append_table(int handle, ref _RT_TABLE table);