private void buildJNPTemplateList() { if (this.UseJNPTemplates) { int seriesID = ControlUtility.GetDropdownValue(this.dropdownSeries); int highGradeID = ControlUtility.GetDropdownValue(this.dropdownHighestAdvertisedGrade); if (seriesID == -1 || highGradeID == -1) { printTopOptionOnly(this.dropdownJNPTemplates, JNPListTopOptionEmpty); } else { JNPackageCollection JNPList = JNPSearch.Search(seriesID, highGradeID); if (JNPList.Count == 0) { printTopOptionOnly(this.dropdownJNPTemplates, "[-- No Matching Job Announcement were found --]"); } else { ControlUtility.BindRadComboBoxControl(this.dropdownJNPTemplates, JNPList, null, "JNPTitle", "JNPID", "[-- Select Job Announcement --]"); } } } }
public static JNPackageCollection Search(int?seriesID = null, int?gradeID = null) { DbCommand commandWrapper = GetDbCommand("spr_SearchPublishedJNP"); JNPackageCollection searchResults = new JNPackageCollection(); try { const int defaultValue = -1; SetParameter <int>(commandWrapper, "@SeriesID", seriesID, defaultValue); SetParameter <int>(commandWrapper, "@HighGradeID", gradeID, defaultValue); searchResults = new JNPackageCollection(ExecuteDataTable(commandWrapper)); } catch (Exception ex) { HandleException(ex); } return(searchResults); }