コード例 #1
0
 private bool CheckQuestions(List <MG_Question> list, MG_Question item)
 {
     for (int i = 0; i < list.Count; i++)
     {
         if (list[i].IdQuestion == item.IdQuestion)
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #2
0
        private string ParseStringProject(MG_Question p)
        {
            if (p == null)
            {
                return("{}");
            }

            string body = "{\nidQuestion:" + p.IdQuestion.ToString()
                          + ", \ntype:" + p.Type.ToString()
                          + ", \nsource:'" + p.Source.Trim()
                          + "', \ntextQuestion:'" + p.TextQuestion.Trim()
                          + "', \ndescription:'" + p.Description.Trim()
                          + "', \na:'" + p.A.Trim()
                          + "', \nb:'" + p.B.Trim()
                          + "', \nc:'" + p.C.Trim()
                          + "', \nd:'" + p.D.Trim()
                          + "', \nanswer:'" + p.Answer.Trim()
                          + "', \ngenre:'" + p.Genre.Trim()
                          + "'\n}";

            return(body);
        }