/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSasgtgetlistresults(ref DataRow row, Sasgtgetlistresults entity) { row.SetField("tariffcd", entity.tariffcd); row.SetField("countryoforigin", entity.countryoforigin); row.SetField("dutyrate", entity.dutyrate); row.SetField("glno", entity.glno); row.SetField("glnodesc", entity.glnodesc); row.SetField("sasgtrowid", entity.sasgtrowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Sasgtgetlistresults BuildSasgtgetlistresultsFromRow(DataRow row) { Sasgtgetlistresults entity = new Sasgtgetlistresults(); entity.tariffcd = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd"); entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin"); entity.dutyrate = row.IsNull("dutyrate") ? decimal.Zero : row.Field <decimal>("dutyrate"); entity.glno = row.IsNull("glno") ? string.Empty : row.Field <string>("glno"); entity.glnodesc = row.IsNull("glnodesc") ? string.Empty : row.Field <string>("glnodesc"); entity.sasgtrowid = row.Field <byte[]>("sasgtrowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }