//Insert category to tabCategory public int InsertCategoryTabCategory(string Category) { try { return(_tabCategoryTableAdaptater.InsertCategory(Category)); } catch (Exception ex) { throw ex; } }
/// <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; } }