コード例 #1
0
    private int addCoach(int contID)
    {
        try
        {
            int coachID = 0;
            DataCommunicator.Coach coach = new DataCommunicator.Coach();

            coach.CertLevel = string.Empty;
            coach.ContactID = contID;
            coachID         = coach.addCoach();

            return(coachID);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
コード例 #2
0
    private int addTeam(int contID)
    {
        // I no longer have access to the DataCommunicator DAL code so I am kludging the coach one to work for this. Don't judge
        try
        {
            int teamId = 0;
            DataCommunicator.Coach coach = new DataCommunicator.Coach();

            coach.CertLevel = string.Concat(txtTeamName.Value, "^", txtMembers.Value);
            coach.ContactID = contID * -1; // - contactId is how the sproc knows it is for DemooTeanm
            teamId          = coach.addCoach();

            return(teamId);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }