/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWmsblookupresults(ref DataRow row, Wmsblookupresults entity) { row.SetField("binloc", entity.binloc); row.SetField("bintype", entity.bintype); row.SetField("sizetype", entity.sizetype); row.SetField("descrip", entity.descrip); row.SetField("assigncode", entity.assigncode); row.SetField("statuscode", entity.statuscode); row.SetField("productcnt", entity.productcnt); row.SetField("rowid-wmsb", entity.rowidWmsb.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Wmsblookupresults BuildWmsblookupresultsFromRow(DataRow row) { Wmsblookupresults entity = new Wmsblookupresults(); entity.binloc = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc"); entity.bintype = row.IsNull("bintype") ? string.Empty : row.Field <string>("bintype"); entity.sizetype = row.IsNull("sizetype") ? string.Empty : row.Field <string>("sizetype"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.assigncode = row.IsNull("assigncode") ? string.Empty : row.Field <string>("assigncode"); entity.statuscode = row.IsNull("statuscode") ? string.Empty : row.Field <string>("statuscode"); entity.productcnt = row.IsNull("productcnt") ? 0 : row.Field <int>("productcnt"); entity.rowidWmsb = row.Field <byte[]>("rowid-wmsb").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }