示例#1
0
        private static PollAnswerCollection DBMapping(DBPollAnswerCollection dbCollection)
        {
            if (dbCollection == null)
                return null;

            PollAnswerCollection collection = new PollAnswerCollection();
            foreach (DBPollAnswer dbItem in dbCollection)
            {
                PollAnswer item = DBMapping(dbItem);
                collection.Add(item);
            }

            return collection;
        }
示例#2
0
        private static PollAnswerCollection DBMapping(DBPollAnswerCollection dbCollection)
        {
            if (dbCollection == null)
            {
                return(null);
            }

            PollAnswerCollection collection = new PollAnswerCollection();

            foreach (DBPollAnswer dbItem in dbCollection)
            {
                PollAnswer item = DBMapping(dbItem);
                collection.Add(item);
            }

            return(collection);
        }
示例#3
0
 private PollAnswerCollection buildAnswers(XmlNodeList data)
 {
     if (data != null && data.Count > 0)
     {
         PollAnswerCollection pac = new PollAnswerCollection();
         foreach (XmlNode n in data)
         {
             XmlUtils.UseNode(n);
             PollAnswer pa = new PollAnswer();
             pa.Id    = XmlUtils.Int("id");
             pa.Rate  = XmlUtils.Float("rate");
             pa.Text  = XmlUtils.String("text");
             pa.Votes = XmlUtils.Int("votes");
             pac.Add(pa);
         }
         return(pac);
     }
     return(null);
 }
示例#4
0
 private PollAnswerCollection buildAnswers(XmlNodeList data)
 {
     if (data != null && data.Count > 0)
     {
         PollAnswerCollection pac = new PollAnswerCollection();
         foreach (XmlNode n in data)
         {
             XmlUtils.UseNode(n);
             PollAnswer pa = new PollAnswer();
             pa.Id = XmlUtils.Int("id");
             pa.Rate = XmlUtils.Float("rate");
             pa.Text = XmlUtils.String("text");
             pa.Votes = XmlUtils.Int("votes");
             pac.Add(pa);
         }
         return pac;
     }
     return null;
 }