/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPtxtranseditresults(ref DataRow row, Ptxtranseditresults entity) { row.SetField("distpartnerid", entity.distpartnerid); row.SetField("distinvno", entity.distinvno); row.SetField("distinvsuf", entity.distinvsuf); row.SetField("distinvseqno", entity.distinvseqno); row.SetField("statustype", entity.statustype); row.SetField("statustypeorig", entity.statustypeorig); row.SetField("reportcd", entity.reportcd); row.SetField("reportcdorig", entity.reportcdorig); row.SetField("reporteddt", entity.reporteddt); row.SetField("reporteddtorig", entity.reporteddtorig); row.SetField("editmsg", entity.editmsg); row.SetField("rwidptxtranshdr", entity.rwidptxtranshdr.ToByteArray()); }
public static Ptxtranseditresults BuildPtxtranseditresultsFromRow(DataRow row) { Ptxtranseditresults entity = new Ptxtranseditresults(); entity.distpartnerid = row.IsNull("distpartnerid") ? string.Empty : row.Field <string>("distpartnerid"); entity.distinvno = row.IsNull("distinvno") ? 0 : row.Field <int>("distinvno"); entity.distinvsuf = row.IsNull("distinvsuf") ? 0 : row.Field <int>("distinvsuf"); entity.distinvseqno = row.IsNull("distinvseqno") ? 0 : row.Field <int>("distinvseqno"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.statustypeorig = row.IsNull("statustypeorig") ? string.Empty : row.Field <string>("statustypeorig"); entity.reportcd = row.IsNull("reportcd") ? string.Empty : row.Field <string>("reportcd"); entity.reportcdorig = row.IsNull("reportcdorig") ? string.Empty : row.Field <string>("reportcdorig"); entity.reporteddt = row.Field <DateTime?>("reporteddt"); entity.reporteddtorig = row.Field <DateTime?>("reporteddtorig"); entity.editmsg = row.IsNull("editmsg") ? string.Empty : row.Field <string>("editmsg"); entity.rwidptxtranshdr = row.Field <byte[]>("rwidptxtranshdr").ToStringEncoded(); return(entity); }