Ejemplo n.º 1
0
 /// <summary>
 /// Updates the category's details in the database
 /// </summary>
 /// <param name="portfolioCategory">PortfolioCategory object being updated in the database</param>
 public static void UpdatePortfolioCategory(Business.PortfolioCategory portfolioCategory)
 {
     try
     {
         Control.ExecuteNonQuery("UpdatePortfolioCategory", portfolioCategory.GetParametersForStoredProcedure(true));
     }
     catch (System.Exception e)
     {
         throw new Exception.UpdateDbObjectException("Could not update category in the database", e);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds the category's details to the database
 /// </summary>
 /// <param name="portfolioCategory">PortfolioCategory object being added to the database</param>
 /// <returns>New unique identifier for the PortfolioCategory, generated by the database</returns>
 public static Int16 AddPortfolioCategory(Business.PortfolioCategory portfolioCategory)
 {
     try
     {
         return((Int16)Control.ExecuteScalar("AddPortfolioCategory", portfolioCategory.GetParametersForStoredProcedure(false)));
     }
     catch (System.Exception e)
     {
         throw new Exception.AddDbObjectException("Could not add category to database", e);
     }
 }