Ejemplo n.º 1
0
        public Int32 Insert(OEChooseQuestion item, out ErrorEntity ErrInfo)
        {
            //Error Judge Define

            NameValueCollection parameters = new NameValueCollection();
            parameters.Add("FPaperId", item.FPaperId.ToString());
            parameters.Add("FDetailId", item.FDetailId.ToString());
            parameters.Add("FQuestionId", item.FQuestionId.ToString());
            return Insert(parameters, out ErrInfo);
        }
Ejemplo n.º 2
0
 public void SaveChooseQ()
 {
     string _idlist = Parameters["pidlist"];
     string _paperid = Parameters["ppaperid"];
     string _detailid = Parameters["pdetailid"];
     OEChooseQuestionBiz biz = new OEChooseQuestionBiz();
     OEChooseQuestion item = new OEChooseQuestion();
     ErrorEntity ErrInfo = new ErrorEntity();
     item.FPaperId = Convert.ToInt64(_paperid);
     item.FDetailId = Convert.ToInt32(_detailid);
     string[] qidarray;
     qidarray = _idlist.Split(',');
     for (int i = 0; i < qidarray.Length; i++)
     {
         if(!string.IsNullOrEmpty(qidarray[i]))
         {
             item.FQuestionId = Convert.ToInt32(qidarray[i]);
             int result = biz.Insert(item, out ErrInfo);
             if (result <= 0)
             {
                 Response.Write(ErrInfo.ToJson());
                 return;
             }
         }
     }
     Response.Write(ErrInfo.ToJson());
 }