private ArrayList ConvertDataTable(DataTable dataTable)
        {
            ArrayList list = new ArrayList(dataTable.Rows.Count);

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                DataRow  row  = dataTable.Rows[i];
                ASObject obj2 = new ASObject(this._remoteClass);
                for (int j = 0; j < dataTable.Columns.Count; j++)
                {
                    DataColumn column = dataTable.Columns[j];
                    obj2.Add(column.ColumnName, row[column]);
                }
                list.Add(obj2);
            }
            return(list);
        }
Beispiel #2
0
        private ArrayList ConvertDataTable(DataTable dataTable)
        {
            ArrayList result = new ArrayList(dataTable.Rows.Count);

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                DataRow  dataRow = dataTable.Rows[i];
                ASObject aso     = new ASObject(_remoteClass);
                for (int j = 0; j < dataTable.Columns.Count; j++)
                {
                    DataColumn column = dataTable.Columns[j];

                    /*
                     * object value = null;
                     * if( !dataRow.IsNull(column) )
                     *      value = dataRow[column];
                     */
                    aso.Add(column.ColumnName, dataRow[column]);
                }
                result.Add(aso);
            }
            return(result);
        }