コード例 #1
0
 //Insert category to tabCategory
 public int InsertCategoryTabCategory(string Category)
 {
     try
     {
         return(_tabCategoryTableAdaptater.InsertCategory(Category));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 /// <summary>
 /// Insert register into TabCategory.
 /// </summary>
 /// <param name="categoryName">string categoryName</param>
 /// <returns>int rowsAffected</returns>
 /// <exception cref="ex">Exception</exception>
 public int InsertCategory(string categoryName)
 {
     try
     {
         return((int)_tabCategoryTableAdapter.InsertCategory(categoryName));
     }
     catch (Exception ex)
     {
         //Error log simulate
         Console.WriteLine(ex.ToString());
         Console.WriteLine(ex.GetBaseException().ToString());
         throw;
     }
 }