/// <summary> /// Ariel Sigo /// Upated: /// 2017/04/29 /// </summary> /// <param name="charity"></param> /// <returns>int of rows affected if succesful</returns> public int AddCharity(Charity charity) { try { return(CharityAccessor.CreateCharityApplication(charity)); } catch { throw; } }
/// <summary> /// Christian Lopez /// Created /// 2017/03/08 /// /// Handles the logic of creating an application for a charity. /// </summary> /// <param name="charityInstance"></param> /// <returns>true if successful</returns> public bool AddCharityApplication(Charity charityInstance) { bool result = false; try { if (CharityAccessor.CreateCharityApplication(charityInstance) == 1) { result = true; } } catch (SqlException ex) { throw new ApplicationException("There was a database error.", ex); } catch (Exception ex) { throw new ApplicationException("There was an unknown error.", ex); } return(result); }