/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPorrarreptlistcriteria(ref DataRow row, Porrarreptlistcriteria entity) { row.SetField("buyer", entity.buyer); row.SetField("whse", entity.whse); row.SetField("vendno", entity.vendno); row.SetField("frtconsolidation", entity.frtconsolidation); row.SetField("sort1", entity.sort1); row.SetField("sort2", entity.sort2); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Porrarreptlistcriteria BuildPorrarreptlistcriteriaFromRow(DataRow row) { Porrarreptlistcriteria entity = new Porrarreptlistcriteria(); entity.buyer = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.frtconsolidation = row.IsNull("frtconsolidation") ? string.Empty : row.Field <string>("frtconsolidation"); entity.sort1 = row.IsNull("sort1") ? string.Empty : row.Field <string>("sort1"); entity.sort2 = row.IsNull("sort2") ? string.Empty : row.Field <string>("sort2"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }