Exemplo n.º 1
0
 public void Update(acc element)
 {
     if (element.m_accevent.HasValue == true)
     {
         this.accevent = element.accevent;
     }
     if (element.m_devid.HasValue == true)
     {
         this.devid = element.devid;
     }
     if (element.m_iid != null)
     {
         this.iid = element.iid;
     }
     if (element.m_nodenr.HasValue == true)
     {
         this.nodenr = element.nodenr;
     }
     if (element.m_val1.HasValue == true)
     {
         this.val1 = element.val1;
     }
     if (element.m_val2.HasValue == true)
     {
         this.val2 = element.val2;
     }
     if (element.m_val3.HasValue == true)
     {
         this.val3 = element.val3;
     }
     if (element.m_val4.HasValue == true)
     {
         this.val4 = element.val4;
     }
 }
Exemplo n.º 2
0
        public static acc Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            acc _acc = new acc();

            _acc.m_rocrailClient = rocrailClient;
            _acc.m_accevent      = (bool?)xml.Attribute("accevent");
            _acc.m_devid         = (int?)xml.Attribute("devid");
            _acc.m_iid           = (string)xml.Attribute("iid");
            _acc.m_nodenr        = (int?)xml.Attribute("nodenr");
            _acc.m_val1          = (int?)xml.Attribute("val1");
            _acc.m_val2          = (int?)xml.Attribute("val2");
            _acc.m_val3          = (int?)xml.Attribute("val3");
            _acc.m_val4          = (int?)xml.Attribute("val4");
            return(_acc);
        }