/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeiinvdetgldistproof(ref DataRow row, Apeiinvdetgldistproof entity) { row.SetField("groupnm", entity.groupnm); row.SetField("createddt", entity.createddt); row.SetField("groupseqno", entity.groupseqno); row.SetField("proof", entity.proof); row.SetField("proofcosting", entity.proofcosting); row.SetField("userfield", entity.userfield); }
public static Apeiinvdetgldistproof BuildApeiinvdetgldistproofFromRow(DataRow row) { Apeiinvdetgldistproof entity = new Apeiinvdetgldistproof(); 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.proof = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof"); entity.proofcosting = row.IsNull("proofcosting") ? decimal.Zero : row.Field <decimal>("proofcosting"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }