/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeiolinescriteria(ref DataRow row, Oeiolinescriteria entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("showlines", entity.showlines); row.SetField("fromlineno", entity.fromlineno); row.SetField("tolineno", entity.tolineno); row.SetField("customfield", entity.customfield); }
public static Oeiolinescriteria BuildOeiolinescriteriaFromRow(DataRow row) { Oeiolinescriteria entity = new Oeiolinescriteria(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.showlines = row.IsNull("showlines") ? string.Empty : row.Field <string>("showlines"); entity.fromlineno = row.IsNull("fromlineno") ? 0 : row.Field <int>("fromlineno"); entity.tolineno = row.IsNull("tolineno") ? 0 : row.Field <int>("tolineno"); entity.customfield = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield"); return(entity); }