/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdecgetproductcriteria(ref DataRow row, Pdecgetproductcriteria entity) { row.SetField("vendno", entity.vendno); row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("action", entity.action); row.SetField("userfield", entity.userfield); }
public static Pdecgetproductcriteria BuildPdecgetproductcriteriaFromRow(DataRow row) { Pdecgetproductcriteria entity = new Pdecgetproductcriteria(); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.action = row.IsNull("action") ? string.Empty : row.Field <string>("action"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }