/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromJmjobheaderlookupresults(ref DataRow row, Jmjobheaderlookupresults entity) { row.SetField("job_and_revision", entity.jobAndRevision); row.SetField("jobid", entity.jobid); row.SetField("jobrevno", entity.jobrevno); row.SetField("notesfl", entity.notesfl); row.SetField("custno", entity.custno); row.SetField("custnotesfl", entity.custnotesfl); row.SetField("custpo", entity.custpo); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdword", entity.stagecdword); row.SetField("rowid-jmeh", entity.rowidJmeh.ToByteArray()); }
public static Jmjobheaderlookupresults BuildJmjobheaderlookupresultsFromRow(DataRow row) { Jmjobheaderlookupresults entity = new Jmjobheaderlookupresults(); entity.jobAndRevision = row.IsNull("job_and_revision") ? string.Empty : row.Field <string>("job_and_revision"); entity.jobid = row.IsNull("jobid") ? string.Empty : row.Field <string>("jobid"); entity.jobrevno = row.IsNull("jobrevno") ? 0 : row.Field <int>("jobrevno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.custnotesfl = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl"); entity.custpo = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagecdword = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword"); entity.rowidJmeh = row.Field <byte[]>("rowid-jmeh").ToStringEncoded(); return(entity); }