/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcipfetchpricingcriteria(ref DataRow row, Icipfetchpricingcriteria entity) { row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("qty", entity.qty); row.SetField("unit", entity.unit); row.SetField("userfield", entity.userfield); }
public static Icipfetchpricingcriteria BuildIcipfetchpricingcriteriaFromRow(DataRow row) { Icipfetchpricingcriteria entity = new Icipfetchpricingcriteria(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.qty = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }