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; }
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); }
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); }
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; }