/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeiinvdetcmopninv(ref DataRow row, Apeiinvdetcmopninv entity) { row.SetField("apinvno", entity.apinvno); row.SetField("seqno", entity.seqno); row.SetField("duedt", entity.duedt); row.SetField("disputefl", entity.disputefl); row.SetField("amount", entity.amount); row.SetField("appamount", entity.appamount); row.SetField("discamt", entity.discamt); row.SetField("origdisc", entity.origdisc); row.SetField("discdt", entity.discdt); row.SetField("divno", entity.divno); row.SetField("invdt", entity.invdt); row.SetField("invtype", entity.invtype); row.SetField("notesfl", entity.notesfl); row.SetField("paymtamt", entity.paymtamt); row.SetField("paymtcd", entity.paymtcd); row.SetField("paymtdt", entity.paymtdt); row.SetField("refer", entity.refer); row.SetField("termstype", entity.termstype); row.SetField("transcd", entity.transcd); row.SetField("vendno", entity.vendno); row.SetField("vendtype", entity.vendtype); row.SetField("statustype", entity.statustype); row.SetField("apet-rowid", entity.apetRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Apeiinvdetcmopninv BuildApeiinvdetcmopninvFromRow(DataRow row) { Apeiinvdetcmopninv entity = new Apeiinvdetcmopninv(); entity.apinvno = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.duedt = row.Field <DateTime?>("duedt"); entity.disputefl = row.Field <bool>("disputefl"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.appamount = row.IsNull("appamount") ? decimal.Zero : row.Field <decimal>("appamount"); entity.discamt = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt"); entity.origdisc = row.IsNull("origdisc") ? decimal.Zero : row.Field <decimal>("origdisc"); entity.discdt = row.Field <DateTime?>("discdt"); entity.divno = row.IsNull("divno") ? 0 : row.Field <int>("divno"); entity.invdt = row.Field <DateTime?>("invdt"); entity.invtype = row.IsNull("invtype") ? string.Empty : row.Field <string>("invtype"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.paymtamt = row.IsNull("paymtamt") ? decimal.Zero : row.Field <decimal>("paymtamt"); entity.paymtcd = row.IsNull("paymtcd") ? 0 : row.Field <int>("paymtcd"); entity.paymtdt = row.Field <DateTime?>("paymtdt"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.termstype = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype"); entity.transcd = row.IsNull("transcd") ? 0 : row.Field <int>("transcd"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendtype = row.IsNull("vendtype") ? string.Empty : row.Field <string>("vendtype"); entity.statustype = row.Field <bool>("statustype"); entity.apetRowid = row.Field <byte[]>("apet-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }