/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromArcustomerlookupcriteria(ref DataRow row, Arcustomerlookupcriteria entity) { row.SetField("custno", entity.custno); row.SetField("lookupnm", entity.lookupnm); row.SetField("name", entity.name); row.SetField("phoneno", entity.phoneno); row.SetField("city", entity.city); row.SetField("state", entity.state); row.SetField("zipcd", entity.zipcd); row.SetField("groupid", entity.groupid); row.SetField("includeinactive", entity.includeinactive); row.SetField("firstnm", entity.firstnm); row.SetField("lastnm", entity.lastnm); row.SetField("keywords", entity.keywords); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Arcustomerlookupcriteria BuildArcustomerlookupcriteriaFromRow(DataRow row) { Arcustomerlookupcriteria entity = new Arcustomerlookupcriteria(); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.lookupnm = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); 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.groupid = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid"); entity.includeinactive = row.Field <bool>("includeinactive"); entity.firstnm = row.IsNull("firstnm") ? string.Empty : row.Field <string>("firstnm"); entity.lastnm = row.IsNull("lastnm") ? string.Empty : row.Field <string>("lastnm"); entity.keywords = row.IsNull("keywords") ? string.Empty : row.Field <string>("keywords"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }