Пример #1
0
 /// <summary>
 /// Updates a Prefecence Rank record to database
 /// </summary>
 /// <param name="requirementId"></param>
 /// <param name="tnx"></param>
 public void Update(int requirementId, IDbTransaction tnx)
 {
     try
     {
         PreferenceRankDataService dataService = new PreferenceRankDataService(tnx);
         dataService.Update(requirementId, _preference.PreferenceId, _rank);
     }
     catch
     {
         throw;
     }
 }
Пример #2
0
        /// <summary>
        /// Load a Student Prefernce option Ranks from the Database
        /// </summary>
        /// <param name="requirementId"> Internship Requirement Id, primary key </param>
        /// <returns> A populated Collection of Prefernce Ranks </returns>
        public static PreferenceRankCollection Load(int requirementId)
        {
            try
            {
                //Create the Data Service Object
                PreferenceRankDataService dataService = new PreferenceRankDataService();

                //Excute the Get All method
                DataSet ds = dataService.GetAll(requirementId);

                //Craete the Prefernce Rank Collection Object
                PreferenceRankCollection obj = new PreferenceRankCollection();

                // Create Preference Rank Objects from the Data Set and Add to Collection
                obj.MapObjects(ds);

                //return the Collection
                return(obj);
            } catch
            {
                throw;
            }
        }