public void ImportRow(CremaDataRow row) { this.table.BeginLoadData(); try { this.table.ImportRow(row.InternalObject); foreach (var item in row.Table.childs) { var childRows = row.GetChildRows(item); var thisChild = this.childs[item.TableName]; if (thisChild == null) { continue; } foreach (var childRow in childRows) { thisChild.ImportRow(childRow); } } } finally { this.table.EndLoadData(); } }
public static string FieldAsString(this CremaDataRow row, CremaDataColumn column) { object value = row[column]; if (value == null || value == DBNull.Value) { return(null); } return(value.ToString()); }
public CremaDataRow AddRow(CremaDataRow parent, params object[] args) { var dataRow = this.NewRow(parent); for (var i = 0; i < args.Length; i++) { dataRow[i] = args[i]; } this.rows.Add(dataRow); return(dataRow); }
internal static void SetFieldForce <T>(this CremaDataRow row, CremaDataColumn column, T value) { if (column.ReadOnly == true) { row.InternalObject.SetReadOnlyField <T>(column.InternalObject, value); } else { row.InternalObject.SetField <T>(column.InternalObject, value); } }
public CremaDataRow NewRow(CremaDataRow parentRow) { if (parentRow == null) { throw new ArgumentNullException(nameof(parentRow)); } if (this.Parent == null) { throw new CremaDataException(Resources.Exception_UsableOnChildTable); } var newRow = this.NewRow(); newRow.ParentID = parentRow.RelationID; return(newRow); }
public static T Field <T>(this CremaDataRow row, string columnName, DataRowVersion version) { return(row.InternalObject.Field <T>(columnName, version)); }
public static string FieldAsString(this CremaDataRow row, string columnName, DataRowVersion version) { return(row.FieldAsString(row.Table.Columns[columnName], version)); }
public static string FieldAsString(this CremaDataRow row, int columnIndex, DataRowVersion version) { return(row.FieldAsString(row.Table.Columns[columnIndex], version)); }
public static void SetFieldAsString(this CremaDataRow row, string columnName, string textValue) { row.SetFieldAsString(row.Table.Columns[columnName], textValue); }
public static string FieldAsString(this CremaDataRow row, string columnName) { return(row.FieldAsString(row.Table.Columns[columnName])); }
public static string FieldAsString(this CremaDataRow row, int columnIndex) { return(row.FieldAsString(row.Table.Columns[columnIndex])); }
public static void SetField <T>(this CremaDataRow row, string columnName, T value) { row.InternalObject.SetField <T>(columnName, value); }
public static void SetField <T>(this CremaDataRow row, int columnIndex, T value) { row.InternalObject.SetField <T>(columnIndex, value); }
public static void SetFieldAsString(this CremaDataRow row, int columnIndex, string textValue) { row.SetFieldAsString(row.Table.Columns[columnIndex], textValue); }
public static T Field <T>(this CremaDataRow row, int columnIndex, DataRowVersion version) { return(row.InternalObject.Field <T>(columnIndex, version)); }
public static T Field <T>(this CremaDataRow row, CremaDataColumn column, DataRowVersion version) { return(row.InternalObject.Field <T>(column.InternalObject, version)); }
internal static T Field <T>(this CremaDataRow row, InternalRelation relation) { return(row.InternalObject.Field <T>(relation)); }
internal static T Field <T>(this CremaDataRow row, InternalDataColumn column) { return(row.InternalObject.Field <T>(column)); }
public static void SetFieldAsString(this CremaDataRow row, CremaDataColumn column, string textValue) { row[column] = column.ConvertFromString(textValue); }
public static void SetField <T>(this CremaDataRow row, CremaDataColumn column, T value) { row.InternalObject.SetField <T>(column.InternalObject, value); }
internal CremaDataTableNewRowEventArgs(DataTableNewRowEventArgs e) { this.row = (e.Row as InternalDataRow).Target; }