private DataTable LoadDataInfo()
        {
            #region 加载数据信息

            //DataTable dt = UserGroups.GroupParticipateScore(DNTRequest.GetInt("groupid", 0));
            //if (dt.Rows.Count <= 0)
            //    return null;

            //if (dt.Rows[0][0].ToString().Trim() == "")
            //    return RemoveEmptyRows(NewParticipateScore());

            //return RemoveEmptyRows(GroupParticipateScore(dt.Rows[0][0].ToString().Trim()));
            templateDT = UserGroups.GroupParticipateScore(DNTRequest.GetInt("groupid", 0));
            DataRow scoresetname = Scoresets.GetScoreSet().Rows[0];
            string  validrow     = "";

            for (int count = 0; count < 8; count++)
            {
                if ((scoresetname[count + 2].ToString().Trim() != "") && (scoresetname[count + 2].ToString().Trim() != "0"))
                {
                    templateDT.Rows[count]["ScoreName"] = scoresetname[count + 2].ToString().Trim();
                    validrow = validrow + "," + count;
                }

                if (IsValidScoreName(count + 1))
                {
                    validrow = validrow + "," + count;
                }
            }
            ViewState["validrow"] = validrow + ",";
            return(templateDT);

            #endregion
        }
Example #2
0
        private DataTable LoadDataInfo()
        {
            this.templateDT = UserGroups.GroupParticipateScore(DNTRequest.GetInt("groupid", 0));
            DataRow dataRow = Scoresets.GetScoreSet().Rows[0];
            string  text    = "";

            for (int i = 0; i < 8; i++)
            {
                if (!dataRow[i + 2].ToString().IsNullOrEmpty() && dataRow[i + 2].ToString().Trim() != "0")
                {
                    this.templateDT.Rows[i]["ScoreName"] = dataRow[i + 2].ToString().Trim();
                    text = text + "," + i;
                }
                if (this.IsValidScoreName(i + 1))
                {
                    text = text + "," + i;
                }
            }
            this.ViewState["validrow"] = text + ",";
            return(this.templateDT);
        }