/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcamrcalcmethodcriteria(ref DataRow row, Icamrcalcmethodcriteria entity) { row.SetField("reportno", entity.reportno); row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("secure", entity.secure); row.SetField("customparam", entity.customparam); row.SetField("userfield", entity.userfield); }
public static Icamrcalcmethodcriteria BuildIcamrcalcmethodcriteriaFromRow(DataRow row) { Icamrcalcmethodcriteria entity = new Icamrcalcmethodcriteria(); entity.reportno = row.IsNull("reportno") ? 0 : row.Field <int>("reportno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.secure = row.IsNull("secure") ? 0 : row.Field <int>("secure"); entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }