/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeiinvdetcmappinv(ref DataRow row, Apeiinvdetcmappinv entity) { row.SetField("groupnm", entity.groupnm); row.SetField("createddt", entity.createddt); row.SetField("groupseqno", entity.groupseqno); row.SetField("apei-rowid", entity.apeiRowid.ToByteArray()); row.SetField("duedt", entity.duedt); row.SetField("disputefl", entity.disputefl); row.SetField("appinvno", entity.appinvno); row.SetField("invseqno", entity.invseqno); row.SetField("appseqno", entity.appseqno); row.SetField("appseqnoenabledfl", entity.appseqnoenabledfl); row.SetField("amount", entity.amount); row.SetField("amountenabledfl", entity.amountenabledfl); row.SetField("userfield", entity.userfield); }
public static Apeiinvdetcmappinv BuildApeiinvdetcmappinvFromRow(DataRow row) { Apeiinvdetcmappinv entity = new Apeiinvdetcmappinv(); entity.groupnm = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm"); entity.createddt = row.Field <DateTime?>("createddt"); entity.groupseqno = row.IsNull("groupseqno") ? 0 : row.Field <int>("groupseqno"); entity.apeiRowid = row.Field <byte[]>("apei-rowid").ToStringEncoded(); entity.duedt = row.Field <DateTime?>("duedt"); entity.disputefl = row.Field <bool>("disputefl"); entity.appinvno = row.IsNull("appinvno") ? string.Empty : row.Field <string>("appinvno"); entity.invseqno = row.IsNull("invseqno") ? 0 : row.Field <int>("invseqno"); entity.appseqno = row.IsNull("appseqno") ? 0 : row.Field <int>("appseqno"); entity.appseqnoenabledfl = row.Field <bool>("appseqnoenabledfl"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.amountenabledfl = row.Field <bool>("amountenabledfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }