/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSajournalcopy(ref DataRow row, Sajournalcopy entity) { row.SetField("fromjrnlno", entity.fromjrnlno); row.SetField("tojrnlno", entity.tojrnlno); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Sajournalcopy BuildSajournalcopyFromRow(DataRow row) { Sajournalcopy entity = new Sajournalcopy(); entity.fromjrnlno = row.IsNull("fromjrnlno") ? 0 : row.Field <int>("fromjrnlno"); entity.tojrnlno = row.IsNull("tojrnlno") ? 0 : row.Field <int>("tojrnlno"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }