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