/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIccatalogcopy(ref DataRow row, Iccatalogcopy entity) { row.SetField("fromcatalog", entity.fromcatalog); row.SetField("tocatalog", entity.tocatalog); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Iccatalogcopy BuildIccatalogcopyFromRow(DataRow row) { Iccatalogcopy entity = new Iccatalogcopy(); entity.fromcatalog = row.IsNull("fromcatalog") ? string.Empty : row.Field <string>("fromcatalog"); entity.tocatalog = row.IsNull("tocatalog") ? string.Empty : row.Field <string>("tocatalog"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }