/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdspvendcontresults(ref DataRow row, Pdspvendcontresults entity) { row.SetField("pdrecno", entity.pdrecno); row.SetField("levelcd", entity.levelcd); row.SetField("vendno", entity.vendno); row.SetField("vendnotesfl", entity.vendnotesfl); row.SetField("contractno", entity.contractno); row.SetField("prod", entity.prod); row.SetField("prodnotesfl", entity.prodnotesfl); row.SetField("statustype", entity.statustype); row.SetField("refer", entity.refer); row.SetField("startdt", entity.startdt); row.SetField("enddt", entity.enddt); row.SetField("units", entity.units); row.SetField("whse", entity.whse); row.SetField("iRecordLimit", entity.iRecordLimit); row.SetField("pd_rowid", entity.pdRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Pdspvendcontresults BuildPdspvendcontresultsFromRow(DataRow row) { Pdspvendcontresults entity = new Pdspvendcontresults(); entity.pdrecno = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno"); entity.levelcd = row.IsNull("levelcd") ? string.Empty : row.Field <string>("levelcd"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendnotesfl = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl"); entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.prodnotesfl = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.startdt = row.Field <DateTime?>("startdt"); entity.enddt = row.Field <DateTime?>("enddt"); entity.units = row.IsNull("units") ? string.Empty : row.Field <string>("units"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.iRecordLimit = row.IsNull("iRecordLimit") ? 0 : row.Field <int>("iRecordLimit"); entity.pdRowid = row.Field <byte[]>("pd_rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }