/// <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); }
private static extern int RTb_get_table_property_by_id(int handle, ref _RT_TABLE field);
private static extern int RTb_append_table(int handle, ref _RT_TABLE table);
/// <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; }
public int AppendTable(int handle, ref _RT_TABLE table) { return RTb_append_table(handle, ref table); }
private extern static int RTb_get_table_property_by_id(int handle, ref _RT_TABLE field);
public int AppendTable(int handle, ref _RT_TABLE table) { return(RTb_append_table(handle, ref table)); }
private extern static int RTb_append_table(int handle, ref _RT_TABLE table);