public DataSet getClassesForJudge()
 {
     String moduleSettings = ModuleConfig.GetSettings();
     Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
     return j.getClassesForJudge(_id);
 }
 public static Boolean isJudgeAtShow(int UserID, int ShowID)
 {
     String moduleSettings = ModuleConfig.GetSettings();
     Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
     DataSet ds = j.SearchFor(UserID, ShowID);
     return (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0);
 }
 public static void UpdateJudge(int JudgeID, int ShowDetailsID)
 {
     String moduleSettings = ModuleConfig.GetSettings();
     Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
     j.UpdateJudgeToShowDay(JudgeID, ShowDetailsID);
 }
        public static List<Judge> GetJudgesListForShowDay(int ShowDetailsID)
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
            DataSet ds = j.GetJudgesForShowDay(ShowDetailsID);
            List<Judge> judgeList = new List<Judge>();

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                judgeList.Add(new Judge(row));
            }

            return judgeList;
        }
        public static List<Judge> getJudgesForRingList(int RingID)
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
            DataSet ds = j.getJudgeForRing(RingID);
            List<Judge> judgeList = new List<Judge>();

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                judgeList.Add(new Judge(row));
            }
            return judgeList;
        }
        public static String getJudgeForClass(int ClassID)
        {
            var tmp = "";

            String moduleSettings = ModuleConfig.GetSettings();
            Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
            DataSet ds = j.getJudgeForClass(ClassID);
            if (ds.Tables[0].Rows.Count > 0) {
                int JudgeID = Convert.ToInt32(ds.Tables[0].Rows[0]["JudgeID"]);
                Judge judge = new Judge(JudgeID);
                if (judge.ID > -1)
                {
                    tmp = judge.Name;
                }
            }

            return tmp;
        }
        public static String GetAllJudgesForShow(int ShowID)
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
            DataSet ds = j.GetAllJudgesForShow(ShowID);
            List<Judge> judgeList = new List<Judge>();

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                judgeList.Add(new Judge(row));
            }

            return fastJSON.JSON.Instance.ToJSON(judgeList);
        }
        // add a news
        public static int Add(int ShowID, int ShowDetailsID, int UserID, String Notes, int Status, int Allocated)
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Data.Judge j = new Fpp.WebModules.Data.Judge(moduleSettings);
            int id = j.Add(UserID, Notes, Status, Allocated);
            j.AddJudgeToShow(ShowID, ShowDetailsID, id);

            return id;
        }