public sppQuestionstruct SHFQuesitonTosppQuestion(btSHFQuestion shfQ) { //SWF.MessageBox.Show("StartReceive: " + strUC); string s = shfQ.Question; sppQuestionstruct q = new sppQuestionstruct(); try { //检查 s 的有效性 if (s.Length > 1 && s.IndexOf("|") > 0) { //数据 5 项 q.aq = System.Convert.ToString(s.Substring(0, s.IndexOf("|"))); s = s.Remove(0, s.IndexOf("|") + 1);//r.UsrIDI =0; q.bq = s.Substring(0, s.IndexOf("|")); s = s.Remove(0, s.IndexOf("|") + 1); q.cq = s.Substring(0, s.IndexOf("|")); System.Convert.ToString(s); s = s.Remove(0, s.IndexOf("|") + 1); q.dq = System.Convert.ToString(s); } } catch (Exception ex) { throw new System.ApplicationException("sppQuestionstruct " + ex.ToString()); } return(q); }//sppQuestionToSHFQuestion
public sppQuestionstruct SHFQuesitonTosppQuestion(btSHFQuestion shfQ) { //SWF.MessageBox.Show("StartReceive: " + strUC); string s = shfQ.Question; sppQuestionstruct q = new sppQuestionstruct(); try { //检查 s 的有效性 if (s.Length > 1 && s.IndexOf("|") > 0) { //数据 5 项 q.aq = System.Convert.ToString(s.Substring(0, s.IndexOf("|"))); s = s.Remove(0, s.IndexOf("|") + 1);//r.UsrIDI =0; q.bq = s.Substring(0, s.IndexOf("|")); s = s.Remove(0, s.IndexOf("|") + 1); q.cq = s.Substring(0, s.IndexOf("|")); System.Convert.ToString(s); s = s.Remove(0, s.IndexOf("|") + 1); q.dq = System.Convert.ToString(s); } } catch (Exception ex) { throw new System.ApplicationException("sppQuestionstruct " + ex.ToString()); } return q; }
public ArrayList GetAllQA() { myQAAL.Clear(); for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); myQAAL.Add(q.QuestionAnswer); } return(myQAAL); }
public ArrayList GetAllQN() { myQNAL.Clear(); for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); myQNAL.Add(q.QuestionNote); } return(myQNAL); }
public ArrayList GetAllQS() { myQSAL.Clear(); for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); myQSAL.Add(q.QuestionSubject); } return(myQSAL); }
public ArrayList GetAllQN() { myQNAL.Clear(); for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); myQNAL.Add(q.QuestionNote); } return myQNAL; }
public ArrayList GetAllQA() { myQAAL.Clear(); for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); myQAAL.Add(q.QuestionAnswer); } return myQAAL; }
public int NewQuestion(btSHFQuestion q) { int i, id = -1; btSHFQuestions myItems = new btSHFQuestions(); i = myItems.CheckOne(q.QuestionSubject); if (i == 0) { id = myItems.AddOne(q); } return(id); }
public string[,] GetAllOptions() { string[,] table = new string[m_MaxID, 5]; for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); spp = qq.SHFQuesitonTosppQuestion(q); table[i - 1, 0] = i.ToString(); table[i - 1, 1] = spp.aq; table[i - 1, 2] = spp.bq; table[i - 1, 3] = spp.cq; table[i - 1, 4] = spp.dq; } return(table); }
public string[,] GetAllOptions() { string[,] table = new string[m_MaxID, 5]; for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); spp = qq.SHFQuesitonTosppQuestion(q); table[i - 1, 0] = i.ToString(); table[i - 1, 1] = spp.aq; table[i - 1, 2] = spp.bq; table[i - 1, 3] = spp.cq; table[i - 1, 4] = spp.dq; } return table; }
private bool GetQuestion(btEGLPABCQuestion.sppQuestionstruct spp, btSHFQuestion q) { if (txtQuestionAnswer.Text != "" && txtQuestionSubject.Text != "" && textBoxA.Text != "" && textBoxB.Text != "" && textBoxC.Text != "" && textBoxD.Text != "") { q.QuestionSubject = txtQuestionSubject.Text; spp.aq = textBoxA.Text; spp.bq = textBoxB.Text; spp.cq = textBoxC.Text; spp.dq = textBoxD.Text; if (txtQuestionAnswer.Text == "A" || txtQuestionAnswer.Text == "B" || txtQuestionAnswer.Text == "C" || txtQuestionAnswer.Text == "D" || txtQuestionAnswer.Text == "a" || txtQuestionAnswer.Text == "b" || txtQuestionAnswer.Text == "c" || txtQuestionAnswer.Text == "d") { q.QuestionAnswer = txtQuestionAnswer.Text.ToUpper(); q.Question = spp.aq + "|" + spp.bq + "|" + spp.cq + "|" + spp.dq; return(true); //return q; } else { MessageBox.Show("正确答案填写错误!只能填写选项对应的标识:A(a),B(b),C(c),D(d)", "正确答案填写信息!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return(false); } } else { MessageBox.Show("所填题干、选项和答案不能有空项, 请重新填写!", "题目生成信息", MessageBoxButtons.OK, MessageBoxIcon.Warning); return(false); } }
private bool GetQuestion(btEGLPABCQuestion.sppQuestionstruct spp, btSHFQuestion q) { if (txtQuestionAnswer.Text != "" && txtQuestionSubject.Text != "" && textBoxA.Text != "" && textBoxB.Text != "" && textBoxC.Text != "" && textBoxD.Text != "") { q.QuestionSubject = txtQuestionSubject.Text; spp.aq = textBoxA.Text; spp.bq = textBoxB.Text; spp.cq = textBoxC.Text; spp.dq = textBoxD.Text; if (txtQuestionAnswer.Text == "A" || txtQuestionAnswer.Text == "B" || txtQuestionAnswer.Text == "C" || txtQuestionAnswer.Text == "D" || txtQuestionAnswer.Text == "a" || txtQuestionAnswer.Text == "b" || txtQuestionAnswer.Text == "c" || txtQuestionAnswer.Text == "d") { q.QuestionAnswer = txtQuestionAnswer.Text.ToUpper(); q.Question = spp.aq + "|" + spp.bq + "|" + spp.cq + "|" + spp.dq; return true; //return q; } else { MessageBox.Show("正确答案填写错误!只能填写选项对应的标识:A(a),B(b),C(c),D(d)", "正确答案填写信息!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; } } else { MessageBox.Show("所填题干、选项和答案不能有空项, 请重新填写!", "题目生成信息", MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; } }
public ArrayList GetAllQS() { myQSAL.Clear(); for (int i = 1; i <= m_MaxID; i++) { q = qs.GetByID(i); myQSAL.Add(q.QuestionSubject); } return myQSAL; }
public int NewQuestion(btSHFQuestion q) { int i, id = -1; btSHFQuestions myItems = new btSHFQuestions(); i = myItems.CheckOne(q.QuestionSubject); if (i == 0) { id = myItems.AddOne(q); } return id; }