/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAricloadaretsetresults(ref DataRow row, Aricloadaretsetresults entity) { row.SetField("cono", entity.cono); row.SetField("invno", entity.invno); row.SetField("invsuf", entity.invsuf); row.SetField("seqno", entity.seqno); row.SetField("custno", entity.custno); row.SetField("jrnlno", entity.jrnlno); row.SetField("setno", entity.setno); row.SetField("transcd", entity.transcd); row.SetField("amount", entity.amount); row.SetField("paymtamt", entity.paymtamt); row.SetField("pifamt", entity.pifamt); row.SetField("discamt", entity.discamt); row.SetField("paymtdt", entity.paymtdt); row.SetField("statustype", entity.statustype); row.SetField("userfield", entity.userfield); }
public static Aricloadaretsetresults BuildAricloadaretsetresultsFromRow(DataRow row) { Aricloadaretsetresults entity = new Aricloadaretsetresults(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.invno = row.IsNull("invno") ? 0 : row.Field <int>("invno"); entity.invsuf = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.setno = row.IsNull("setno") ? 0 : row.Field <int>("setno"); entity.transcd = row.IsNull("transcd") ? string.Empty : row.Field <string>("transcd"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.paymtamt = row.IsNull("paymtamt") ? decimal.Zero : row.Field <decimal>("paymtamt"); entity.pifamt = row.IsNull("pifamt") ? decimal.Zero : row.Field <decimal>("pifamt"); entity.discamt = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt"); entity.paymtdt = row.Field <DateTime?>("paymtdt"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }