/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlinquiryrevalresults(ref DataRow row, Glinquiryrevalresults entity) { row.SetField("revalno", entity.revalno); row.SetField("seqno", entity.seqno); row.SetField("revaldt", entity.revaldt); row.SetField("sourcecd", entity.sourcecd); row.SetField("idno", entity.idno); row.SetField("cdocno", entity.cdocno); row.SetField("docseqno", entity.docseqno); row.SetField("ctranscd", entity.ctranscd); row.SetField("jrnlno", entity.jrnlno); row.SetField("setno", entity.setno); row.SetField("oldexrate", entity.oldexrate); row.SetField("newexrate", entity.newexrate); row.SetField("operinit", entity.operinit); row.SetField("rowid-gletv", entity.rowidGletv.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Glinquiryrevalresults BuildGlinquiryrevalresultsFromRow(DataRow row) { Glinquiryrevalresults entity = new Glinquiryrevalresults(); entity.revalno = row.IsNull("revalno") ? 0 : row.Field <int>("revalno"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.revaldt = row.Field <DateTime?>("revaldt"); entity.sourcecd = row.IsNull("sourcecd") ? string.Empty : row.Field <string>("sourcecd"); entity.idno = row.IsNull("idno") ? decimal.Zero : row.Field <decimal>("idno"); entity.cdocno = row.IsNull("cdocno") ? string.Empty : row.Field <string>("cdocno"); entity.docseqno = row.IsNull("docseqno") ? 0 : row.Field <int>("docseqno"); entity.ctranscd = row.IsNull("ctranscd") ? string.Empty : row.Field <string>("ctranscd"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.setno = row.IsNull("setno") ? 0 : row.Field <int>("setno"); entity.oldexrate = row.IsNull("oldexrate") ? decimal.Zero : row.Field <decimal>("oldexrate"); entity.newexrate = row.IsNull("newexrate") ? decimal.Zero : row.Field <decimal>("newexrate"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.rowidGletv = row.Field <byte[]>("rowid-gletv").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }