Beispiel #1
0
        /// <summary>
        /// 提交答案
        /// </summary>
        /// <param name="Type">类型(单选/多选/不定项选/判断)</param>
        /// <param name="PapersID">试卷ID</param>
        /// <param name="gv">GridView</param>
        private void Submit(string Type, int PapersID, GridView gv, string Time)
        {
            BLL.PapersTitleList bll = new BLL.PapersTitleList();
            if (bll.nGetList(Type, PapersID))
            {
                for (int i = 0; i < gv.Rows.Count; i++)
                {
                    Label  lb          = (Label)gv.Rows[i].FindControl("lb_ID");
                    int    TitleListID = int.Parse(lb.Text);
                    string Str_radio   = Request.Form["radio" + TitleListID];

                    //Response.Write(Type + "题目:" + TitleListID + "  答案:" + Str_radio + "<br/>");

                    BLL.Results   bll1  = new BLL.Results();
                    Model.Results model = new Model.Results();
                    model.UserID      = int.Parse(lb_U.Text);
                    model.PapersID    = PapersID;
                    model.TitleListID = TitleListID;
                    model.Answer      = Str_radio;
                    model.Time        = Time;

                    //Common.Function.Alert(model.UserID.ToString());
                    //bll1.Add(model);
                }
            }
            else
            {
            }
        }
 /// <summary>
 /// 设置编号(一、二、三、...)
 /// </summary>
 /// <param name="Type">类型(单选/多选/不定项选/判断)</param>
 /// <param name="PapersID">试卷ID</param>
 /// <returns></returns>
 private string SetNum(string Type, int PapersID)
 {
     BLL.PapersTitleList bll = new BLL.PapersTitleList();
     if (bll.nGetList(Type, PapersID))
     {
         int j = Num;
         Num = Num + 1;
         return(Exchange(j));
     }
     else
     {
         return("");
     }
 }
 /// <summary>
 /// 提交答案
 /// </summary>
 /// <param name="Type">类型(单选/多选/不定项选/判断)</param>
 /// <param name="PapersID">试卷ID</param>
 /// <param name="gv">GridView</param>
 private void Submit(string Type, int PapersID, GridView gv)
 {
     BLL.PapersTitleList bll = new BLL.PapersTitleList();
     if (bll.nGetList(Type, PapersID))
     {
         for (int i = 0; i < gv.Rows.Count; i++)
         {
             Label  lb          = (Label)gv.Rows[i].FindControl("lb_ID");
             int    TitleListID = int.Parse(lb.Text);
             string Str_radio   = Request.Form["radio" + TitleListID];
             Response.Write(Type + "题目:" + TitleListID + "  答案:" + Str_radio + "<br/>");
         }
     }
     else
     {
     }
 }