예제 #1
0
        // 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);
        }
예제 #2
0
        // 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);
        }