/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcsefcriteria(ref DataRow row, Icsefcriteria entity) { row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("receiptdt", entity.receiptdt); row.SetField("seqno", entity.seqno); row.SetField("availfl", entity.availfl); row.SetField("recordlimit", entity.recordlimit); row.SetField("userfield", entity.userfield); }
public static Icsefcriteria BuildIcsefcriteriaFromRow(DataRow row) { Icsefcriteria entity = new Icsefcriteria(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.receiptdt = row.Field <DateTime?>("receiptdt"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.availfl = row.Field <bool>("availfl"); entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }