/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIciccriteria(ref DataRow row, Iciccriteria entity) { row.SetField("transty", entity.transty); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("lineno", entity.lineno); row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("vendno", entity.vendno); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Iciccriteria BuildIciccriteriaFromRow(DataRow row) { Iciccriteria entity = new Iciccriteria(); entity.transty = row.IsNull("transty") ? string.Empty : row.Field <string>("transty"); 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.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }