/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApshipfromlookupcriteria(ref DataRow row, Apshipfromlookupcriteria entity) { row.SetField("vendno", entity.vendno); row.SetField("shipfmno", entity.shipfmno); row.SetField("phoneno", entity.phoneno); row.SetField("city", entity.city); row.SetField("state", entity.state); row.SetField("zipcd", entity.zipcd); row.SetField("firstnm", entity.firstnm); row.SetField("lastnm", entity.lastnm); row.SetField("allowpofl", entity.allowpofl); row.SetField("includeallshipfroms", entity.includeallshipfroms); row.SetField("recordcountlimit", entity.recordcountlimit); }
public static Apshipfromlookupcriteria BuildApshipfromlookupcriteriaFromRow(DataRow row) { Apshipfromlookupcriteria entity = new Apshipfromlookupcriteria(); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.phoneno = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno"); entity.city = row.IsNull("city") ? string.Empty : row.Field <string>("city"); entity.state = row.IsNull("state") ? string.Empty : row.Field <string>("state"); entity.zipcd = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd"); entity.firstnm = row.IsNull("firstnm") ? string.Empty : row.Field <string>("firstnm"); entity.lastnm = row.IsNull("lastnm") ? string.Empty : row.Field <string>("lastnm"); entity.allowpofl = row.Field <bool>("allowpofl"); entity.includeallshipfroms = row.Field <bool>("includeallshipfroms"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); return(entity); }