/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCreateoeallocttcriteria(ref DataRow row, Createoeallocttcriteria entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("lineno", entity.lineno); row.SetField("prod", entity.prod); row.SetField("custno", entity.custno); row.SetField("transty", entity.transty); row.SetField("warrfl", entity.warrfl); row.SetField("callmode", entity.callmode); }
public static Createoeallocttcriteria BuildCreateoeallocttcriteriaFromRow(DataRow row) { Createoeallocttcriteria entity = new Createoeallocttcriteria(); 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.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.transty = row.IsNull("transty") ? string.Empty : row.Field <string>("transty"); entity.warrfl = row.Field <bool>("warrfl"); entity.callmode = row.IsNull("callmode") ? string.Empty : row.Field <string>("callmode"); return(entity); }