Exemplo n.º 1
0
        public override void ReadJSON(JObject JObject, Dictionary <Int32, Int32> NodeMap, Dictionary <Int32, Int32> NodeTypeMap)
        {
            if (DateAnswered == DateTime.MinValue)
            {
                CswDateTime CswDateAnswered = new CswDateTime(_CswNbtResources);
                CswDateAnswered.FromClientDateTimeJObject((JObject)JObject[_DateAnsweredSubField.ToXmlNodeName(true)]);
                DateAnswered = CswDateAnswered.ToDateTime();
            }
            if (DateCorrected == DateTime.MinValue)
            {
                CswDateTime CswDateCorrected = new CswDateTime(_CswNbtResources);
                CswDateCorrected.FromClientDateTimeJObject((JObject)JObject[_DateCorrectedSubField.ToXmlNodeName(true)]);
                DateCorrected = CswDateCorrected.ToDateTime();
            }

            if (null != JObject[_AnswerSubField.ToXmlNodeName(true)] && IsAnswerEditable)
            {
                Answer = JObject[_AnswerSubField.ToXmlNodeName(true)].ToString();
            }
            if (null != JObject[_CommentsSubField.ToXmlNodeName(true)])
            {
                Comments = JObject[_CommentsSubField.ToXmlNodeName(true)].ToString();
            }
            if (null != JObject[_CorrectiveActionSubField.ToXmlNodeName(true)])
            {
                CorrectiveAction = JObject[_CorrectiveActionSubField.ToXmlNodeName(true)].ToString();
            }
        }
Exemplo n.º 2
0
        public override void ReadJSON(JObject JObject, Dictionary <Int32, Int32> NodeMap, Dictionary <Int32, Int32> NodeTypeMap)
        {
            if (null != JObject[_DateValueSubField.ToXmlNodeName(true)])
            {
                //DateValue = CswConvert.ToDateTime( JObject.Property( _DateValueSubField.ToXmlNodeName(true) ).Value );
                //DateValue = CswConvert.ToDateTime( JObject.Property( _DateValueSubField.ToXmlNodeName( true ) ).Value );

                CswDateTime CswDate = new CswDateTime(_CswNbtResources);
                CswDate.FromClientDateTimeJObject((JObject)JObject[_DateValueSubField.ToXmlNodeName(true)]);
                DateTimeValue = CswDate.ToDateTime();
            }
        }
Exemplo n.º 3
0
 public override void ReadJSON(JObject JObject, Dictionary <Int32, Int32> NodeMap, Dictionary <Int32, Int32> NodeTypeMap)
 {
     if (null != JObject[_StartDateTimeSubField.ToXmlNodeName(true)])
     {
         //StartDateTime = CswConvert.ToDateTime( JObject.Property( _StartDateTimeSubField.ToXmlNodeName( true ) ).Value );
         CswDateTime CswDate = new CswDateTime(_CswNbtResources);
         CswDate.FromClientDateTimeJObject((JObject)JObject[_StartDateTimeSubField.ToXmlNodeName(true)]);
         StartDateTime = CswDate.ToDateTime();
     }
     if (null != JObject[_UnitsSubField.ToXmlNodeName(true)])
     {
         Units = JObject[_UnitsSubField.ToXmlNodeName(true)].ToString();
     }
     //PendingUpdate = true;
     RefreshCachedValue();
 }