コード例 #1
0
    public void KFspFinalizeEvent(string eventid)
    {
        databaseCon.ExecuteStoredProc("KFspFinalizeEvent", "@eventid", eventid);
        hasError = databaseCon.HasError;
        error    = databaseCon.Error;

        databaseCon.ExecuteStoredProc("spViewEventJudges", "@_eventid", eventid);

        foreach (DataRowView judges in databaseCon.Data.DefaultView)
        {
            int       ctr   = 1;
            dbConnect condb = new dbConnect();
            condb.ExecuteStoredProc("KFspViewEventContestants", "@_eventid", eventid);
            foreach (DataRowView cons in condb.Data.DefaultView)
            {
                dbConnect addconnum = new dbConnect();
                addconnum.ExecuteStoredProc("KFspAddConNum",
                                            "@fname", cons[0].ToString(),
                                            "@lname", cons[1].ToString(),
                                            "@_eventid", eventid,
                                            "@connum", ctr);

                ctr++;

                dbConnect critdb = new dbConnect();
                critdb.ExecuteStoredProc("[spViewEventCriteria]", "@_eventid", eventid);
                foreach (DataRowView crits in critdb.Data.DefaultView)
                {
                    dbConnect addscore = new dbConnect();
                    addscore.ExecuteStoredProc("[KFspPopulateScores]",
                                               "@confname", cons[0].ToString(),
                                               "@conlname", cons[1].ToString(),
                                               "@judgefname", judges[0].ToString(),
                                               "@judgelname", judges[1].ToString(),
                                               "@judgeuname", judges[2].ToString(),
                                               "@judgepass", judges[3].ToString(),
                                               "@eventid", eventid,
                                               "@critname", crits[0].ToString()
                                               );
                }
            }
        }
    }
コード例 #2
0
 public void KFspAddConNum(string fname, string lname, int eventID, int connum)
 {
     databaseCon.ExecuteStoredProc("KFspAddConNum", "@fname", fname, "@lname", lname, "@_eventid", eventID, "@connum", connum);
     hasError = databaseCon.HasError;
     error    = databaseCon.Error;
 }