// Method to add the team public static int AddTeam(CompanyModel.Team ObjTeam) { int intResult = 0; using (DALHelper dalHelper = new DALHelper()) { dalHelper.OpenConnectionWithTransaction(); intResult = dalHelper.GetDAL_CompanyDetails(true).AddTeam(ObjTeam); dalHelper.EndConnectionAndCommitTransaction(); } return(intResult); }
// Method to update the teams public static int UpdateTeambyTeamID(CompanyModel.Team ObjUpTeam) { int intResult = 0; using (DALHelper dalHelper = new DALHelper()) { try { dalHelper.OpenConnectionWithTransaction(); intResult = dalHelper.GetDAL_CompanyDetails(true).UpdateTeambyTeamID(ObjUpTeam); dalHelper.EndConnectionAndCommitTransaction(); } catch (Exception) { dalHelper.EndConnectionAndRollBackTransaction(); throw; } } return(intResult); }