/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromLocpendingpickresults(ref DataRow row, Locpendingpickresults entity) { row.SetField("reccount", entity.reccount); row.SetField("qty", entity.qty); row.SetField("locpendingpickresultsuserfield", entity.locpendingpickresultsuserfield); row.SetField("userfield", entity.userfield); }
public static Locpendingpickresults BuildLocpendingpickresultsFromRow(DataRow row) { Locpendingpickresults entity = new Locpendingpickresults(); entity.reccount = row.IsNull("reccount") ? 0 : row.Field <int>("reccount"); entity.qty = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty"); entity.locpendingpickresultsuserfield = row.IsNull("locpendingpickresultsuserfield") ? string.Empty : row.Field <string>("locpendingpickresultsuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }