Esempio n. 1
0
    public static string GetStanding(int teamID, int eventID)
    {
        string standing    = "";
        int    scoringType = 0;

        using (PortalDataContext pdc = new PortalDataContext())
        {
            scoringType = (from ev in pdc.Events
                           where ev.EventID == eventID
                           select ev.ScoringTypeID).SingleOrDefault();
        }
        if (scoringType == 1)
        {
            standing = "(" + DALPortal.CountTotalWon(teamID, eventID).ToString() + "-" + DALPortal.CountTotalDraw(teamID, eventID).ToString() + "-" + DALPortal.CountTotalLost(teamID, eventID).ToString() + ")";
        }
        else if (scoringType == 2)
        {
            standing = "(" + DALPortal.GetScore(teamID, eventID).ToString() + ")";
        }
        return(standing);
    }