/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAutoprctypelookupresults(ref DataRow row, Autoprctypelookupresults entity) { row.SetField("autotype", entity.autotype); row.SetField("vendno", entity.vendno); row.SetField("vendnotes", entity.vendnotes); row.SetField("prodline", entity.prodline); row.SetField("prodcat", entity.prodcat); row.SetField("cpriceonty", entity.cpriceonty); row.SetField("pricetype", entity.pricetype); row.SetField("pdsa-rowid", entity.pdsaRowid.ToByteArray()); }
public static Autoprctypelookupresults BuildAutoprctypelookupresultsFromRow(DataRow row) { Autoprctypelookupresults entity = new Autoprctypelookupresults(); entity.autotype = row.IsNull("autotype") ? string.Empty : row.Field <string>("autotype"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendnotes = row.IsNull("vendnotes") ? string.Empty : row.Field <string>("vendnotes"); entity.prodline = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline"); entity.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.cpriceonty = row.IsNull("cpriceonty") ? string.Empty : row.Field <string>("cpriceonty"); entity.pricetype = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype"); entity.pdsaRowid = row.Field <byte[]>("pdsa-rowid").ToStringEncoded(); return(entity); }