/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCorescrtretsttresults(ref DataRow row, Corescrtretsttresults entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("lineno", entity.lineno); row.SetField("stg", entity.stg); row.SetField("qty", entity.qty); row.SetField("origsuf", entity.origsuf); row.SetField("origstg", entity.origstg); row.SetField("ordernotesfl", entity.ordernotesfl); row.SetField("commentfl", entity.commentfl); }
public static Corescrtretsttresults BuildCorescrtretsttresultsFromRow(DataRow row) { Corescrtretsttresults entity = new Corescrtretsttresults(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.stg = row.IsNull("stg") ? 0 : row.Field <int>("stg"); entity.qty = row.IsNull("qty") ? 0 : row.Field <int>("qty"); entity.origsuf = row.IsNull("origsuf") ? 0 : row.Field <int>("origsuf"); entity.origstg = row.IsNull("origstg") ? 0 : row.Field <int>("origstg"); entity.ordernotesfl = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl"); entity.commentfl = row.IsNull("commentfl") ? string.Empty : row.Field <string>("commentfl"); return(entity); }