public static Icamrupdselectmethodcriteria BuildIcamrupdselectmethodcriteriaFromRow(DataRow row) { Icamrupdselectmethodcriteria entity = new Icamrupdselectmethodcriteria(); entity.reportno = row.IsNull("reportno") ? 0 : row.Field <int>("reportno"); entity.usagectrl = row.IsNull("usagectrl") ? string.Empty : row.Field <string>("usagectrl"); entity.usagemonths = row.IsNull("usagemonths") ? 0 : row.Field <int>("usagemonths"); entity.updateallfl = row.Field <bool>("updateallfl"); entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcamrupdselectmethodcriteria(ref DataRow row, Icamrupdselectmethodcriteria entity) { row.SetField("reportno", entity.reportno); row.SetField("usagectrl", entity.usagectrl); row.SetField("usagemonths", entity.usagemonths); row.SetField("updateallfl", entity.updateallfl); row.SetField("customparam", entity.customparam); row.SetField("userfield", entity.userfield); }