/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcearbuildlistcriteria(ref DataRow row, Icearbuildlistcriteria entity) { row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("fromshipdate", entity.fromshipdate); row.SetField("toshipdate", entity.toshipdate); row.SetField("usestockuom", entity.usestockuom); row.SetField("qtyonhand", entity.qtyonhand); row.SetField("calcendqty", entity.calcendqty); row.SetField("userfield", entity.userfield); }
public static Icearbuildlistcriteria BuildIcearbuildlistcriteriaFromRow(DataRow row) { Icearbuildlistcriteria entity = new Icearbuildlistcriteria(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.fromshipdate = row.Field <DateTime?>("fromshipdate"); entity.toshipdate = row.Field <DateTime?>("toshipdate"); entity.usestockuom = row.Field <bool>("usestockuom"); entity.qtyonhand = row.IsNull("qtyonhand") ? decimal.Zero : row.Field <decimal>("qtyonhand"); entity.calcendqty = row.IsNull("calcendqty") ? decimal.Zero : row.Field <decimal>("calcendqty"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }