/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeiinvoicelistresults(ref DataRow row, Apeiinvoicelistresults entity) { row.SetField("groupnm", entity.groupnm); row.SetField("groupseqno", entity.groupseqno); row.SetField("grouptype", entity.grouptype); row.SetField("createdby", entity.createdby); row.SetField("createddt", entity.createddt); row.SetField("invdt", entity.invdt); row.SetField("apinvno", entity.apinvno); row.SetField("invseqno", entity.invseqno); row.SetField("notesfl", entity.notesfl); row.SetField("vendno", entity.vendno); row.SetField("vendname", entity.vendname); row.SetField("amount", entity.amount); row.SetField("transcd", entity.transcd); row.SetField("transtype", entity.transtype); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdword", entity.stagecdword); row.SetField("disputefl", entity.disputefl); row.SetField("suspfl", entity.suspfl); row.SetField("manaddrfl", entity.manaddrfl); row.SetField("statusmsg", entity.statusmsg); row.SetField("refer", entity.refer); row.SetField("reconoverfl", entity.reconoverfl); row.SetField("invtype", entity.invtype); row.SetField("edifl", entity.edifl); row.SetField("proctype", entity.proctype); row.SetField("proctypeword", entity.proctypeword); row.SetField("reconty", entity.reconty); row.SetField("recontyword", entity.recontyword); row.SetField("discdt", entity.discdt); row.SetField("duedt", entity.duedt); row.SetField("apei-rowid", entity.apeiRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Apeiinvoicelistresults BuildApeiinvoicelistresultsFromRow(DataRow row) { Apeiinvoicelistresults entity = new Apeiinvoicelistresults(); entity.groupnm = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm"); entity.groupseqno = row.IsNull("groupseqno") ? 0 : row.Field <int>("groupseqno"); entity.grouptype = row.IsNull("grouptype") ? string.Empty : row.Field <string>("grouptype"); entity.createdby = row.IsNull("createdby") ? string.Empty : row.Field <string>("createdby"); entity.createddt = row.Field <DateTime?>("createddt"); entity.invdt = row.Field <DateTime?>("invdt"); entity.apinvno = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno"); entity.invseqno = row.IsNull("invseqno") ? 0 : row.Field <int>("invseqno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendname = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.transcd = row.IsNull("transcd") ? 0 : row.Field <int>("transcd"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagecdword = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword"); entity.disputefl = row.Field <bool>("disputefl"); entity.suspfl = row.Field <bool>("suspfl"); entity.manaddrfl = row.Field <bool>("manaddrfl"); entity.statusmsg = row.IsNull("statusmsg") ? string.Empty : row.Field <string>("statusmsg"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.reconoverfl = row.Field <bool>("reconoverfl"); entity.invtype = row.IsNull("invtype") ? string.Empty : row.Field <string>("invtype"); entity.edifl = row.Field <bool>("edifl"); entity.proctype = row.IsNull("proctype") ? string.Empty : row.Field <string>("proctype"); entity.proctypeword = row.IsNull("proctypeword") ? string.Empty : row.Field <string>("proctypeword"); entity.reconty = row.IsNull("reconty") ? string.Empty : row.Field <string>("reconty"); entity.recontyword = row.IsNull("recontyword") ? string.Empty : row.Field <string>("recontyword"); entity.discdt = row.Field <DateTime?>("discdt"); entity.duedt = row.Field <DateTime?>("duedt"); entity.apeiRowid = row.Field <byte[]>("apei-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }