Ejemplo n.º 1
0
 /// <summary>
 /// Removes a given reference question list from the current list.
 /// </summary>
 /// <param name="referenceQuestionLst">list to be removed.</param>
 public virtual void RemoveReferenceQuestionList(ReferenceQuestionList referenceQuestionLst)
 {
     ReferenceQuestionLists.Remove (referenceQuestionLst);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new reference question for a given financial institution
        /// </summary>
        /// <param name="financialInstitution">Financial institution</param>
        /// <param name="userName">User name</param>
        /// <param name="reference">reference</param>
        public void CreateNewReferenceQuestion(string financialInstitution,
            string userName,
            ReferenceQuestionList reference)
        {
            try
            {
                IFinancialInstitutionDAO financialInstitutionDAO = _daoFactory.GetFinancialInstitutionDAO ();

                /* Get the financial institution */
                FinancialInstitution finInstitution
                = financialInstitutionDAO.GetFinancialInstitutionByName (financialInstitution);

                finInstitution.AddReferenceQuestionList (reference);
            }
            /* If the exception was thrown here, just pass it up */
            catch (ZiblerBusinessComponentsException ex)
            {
                throw;
            }
            /* Catch any Data Layer or other exception and throw an unkown exception */
            catch (Exception ex)
            {
                ZiblerBusinessComponentsUnknownException exc
                = new ZiblerBusinessComponentsUnknownException (ex);

                /* Throw the new exception */
                throw exc;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds a new Reference Question List to the financial institution.
 /// </summary>
 /// <param name="referenceQuestionLst">Reference Question List to be added</param>
 public virtual void AddReferenceQuestionList(ReferenceQuestionList referenceQuestionLst)
 {
     referenceQuestionLst.FinancialInstitution = this;
     ReferenceQuestionLists.Add (referenceQuestionLst);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Updates a reference question list in the DB
        /// </summary>
        /// <param name="refQuestionToUpdate">refQuestionToUpdate</param>
        public void UpdateReferenceQuestionList(ReferenceQuestionList refQuestionToUpdate)
        {
            try
            {
                /* No checks, just update */
                IReferenceQuestionListDAO referenceQuestionListDAO = _daoFactory.GetReferenceQuestionListDAO ();
                referenceQuestionListDAO.MakePersistent (refQuestionToUpdate);
            }
            /* If the exception was thrown here, just pass it up */
            catch (ZiblerBusinessComponentsException ex)
            {
                throw;
            }
            /* Catch any Data Layer or other exception and throw an unkown exception */
            catch (Exception ex)
            {
                ZiblerBusinessComponentsUnknownException exc
                = new ZiblerBusinessComponentsUnknownException (ex);

                /* Throw the new exception */
                throw exc;
            }
        }