Esempio n. 1
0
        private Question CreateDateQuestion(XElement questionIterator, Category parent)
        {
            DateOperations operationsOnDate = new DateOperations();
            DateQuestion   dateQuestion     = new DateQuestion(parent);

            if (questionIterator.Attribute("max").Value != "")
            {
                dateQuestion.MaxDate = operationsOnDate.ParseDate(questionIterator.Attribute("max").Value);
            }
            if (questionIterator.Attribute("min").Value != "")
            {
                dateQuestion.MinDate = operationsOnDate.ParseDate(questionIterator.Attribute("min").Value);
            }
            dateQuestion.Answer = DateTime.Now.ToLongDateString();
            return(dateQuestion);
        }
Esempio n. 2
0
 private Question CreateDateQuestion(XElement questionIterator, Category parent)
 {
     DateOperations operationsOnDate = new DateOperations();
     DateQuestion dateQuestion = new DateQuestion(parent);
     if (questionIterator.Attribute("max").Value != "")
     {
         dateQuestion.MaxDate = operationsOnDate.ParseDate(questionIterator.Attribute("max").Value);
     }
     if (questionIterator.Attribute("min").Value != "")
     {
         dateQuestion.MinDate = operationsOnDate.ParseDate(questionIterator.Attribute("min").Value);
     }
     dateQuestion.Answer = DateTime.Now.ToLongDateString();
     return dateQuestion;
 }