コード例 #1
0
        /// <summary>
        /// Returns the absolute value of the specified argument
        /// </summary>				
        public static ONNat absInt(ONInt value)
        {
            if (value == null)
                return ONNat.Null;

            return new ONNat(Math.Abs(value.TypedValue));
        }
コード例 #2
0
        public override int CompareTo(object obj)
        {
            ONInt lVal = obj as ONInt;

            if (lVal == null)
            {
                return(1);
            }

            if (Value == null && lVal.Value == null)
            {
                return(0);
            }

            if (Value == null)
            {
                return(-1);
            }

            if (lVal.Value == null)
            {
                return(1);
            }

            return(TypedValue.CompareTo(lVal.TypedValue));
        }
コード例 #3
0
ファイル: ONInt.cs プロジェクト: sgon1853/UPM_MDD_Thesis
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="val">Value for this type</param>
 public ONInt(ONInt val)
 {
     if (val == null)
         Value = null;
     else
         Value = val.Value;
 }
コード例 #4
0
        public static ONReal Exp(ONInt obj1)
        {
            if (((object)obj1 == null) || (obj1.Value == null))
            {
                throw new ONNullException(null);
            }

            return(new ONReal(Convert.ToDecimal(Math.Exp(obj1.TypedValue))));
        }
コード例 #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="val">Value for this type</param>
 public ONInt(ONInt val)
 {
     if (val == null)
     {
         Value = null;
     }
     else
     {
         Value = val.Value;
     }
 }
コード例 #6
0
 public PasajeroOid(PasajeroOid oid)
     : base("Pasajero")
 {
     if (oid != null)
     {
         Id_PasajeroAttr = new ONInt(oid.Id_PasajeroAttr);
     }
     else
     {
         Id_PasajeroAttr = ONInt.Null;
     }
 }
コード例 #7
0
 public AdministradorOid(AdministradorOid oid)
     : base("Administrador")
 {
     if (oid != null)
     {
         Id_AdministradorAttr = new ONInt(oid.Id_AdministradorAttr);
     }
     else
     {
         Id_AdministradorAttr = ONInt.Null;
     }
 }
コード例 #8
0
 public RevisionOid(RevisionOid oid)
     : base("Revision")
 {
     if (oid != null)
     {
         Id_RevisarAeronaveAttr = new ONInt(oid.Id_RevisarAeronaveAttr);
     }
     else
     {
         Id_RevisarAeronaveAttr = ONInt.Null;
     }
 }
コード例 #9
0
 public NaveNodrizaOid(NaveNodrizaOid oid)
     : base("NaveNodriza")
 {
     if (oid != null)
     {
         Id_NaveNodrizaAttr = new ONInt(oid.Id_NaveNodrizaAttr);
     }
     else
     {
         Id_NaveNodrizaAttr = ONInt.Null;
     }
 }
コード例 #10
0
 public RevisionPasajeroOid(RevisionPasajeroOid oid)
     : base("RevisionPasajero")
 {
     if (oid != null)
     {
         Id_RevisionPasajeroAttr = new ONInt(oid.Id_RevisionPasajeroAttr);
     }
     else
     {
         Id_RevisionPasajeroAttr = ONInt.Null;
     }
 }
コード例 #11
0
 public AeronaveOid(AeronaveOid oid)
     : base("Aeronave")
 {
     if (oid != null)
     {
         Id_AeronaveAttr = new ONInt(oid.Id_AeronaveAttr);
     }
     else
     {
         Id_AeronaveAttr = ONInt.Null;
     }
 }
コード例 #12
0
        public static ONReal Pow(ONReal obj1, ONInt obj2)
        {
            if (((object)obj1 == null) || ((object)obj2 == null))
            {
                throw new ONNullException(null);
            }

            if ((obj1.Value == null) || (obj2.Value == null))
            {
                return(ONReal.Null);
            }

            return(new ONReal(Convert.ToDecimal(Math.Pow(Convert.ToDouble(obj1.TypedValue), Convert.ToDouble(obj2.TypedValue)))));
        }
コード例 #13
0
        public static ONReal Min(ONReal obj1, ONInt obj2)
        {
            if (((object)obj1 == null) || ((object)obj2 == null))
            {
                throw new ONNullException(null);
            }

            if ((obj1.Value == null) || (obj2.Value == null))
            {
                return(ONReal.Null);
            }

            return(new ONReal(Math.Min(obj1.TypedValue, obj2.TypedValue)));
        }
コード例 #14
0
        public PasajeroAeronaveInstance Create_instanceServ(AeronaveOid p_agrAeronaveArg, PasajeroOid p_agrPasajeroArg, ONInt p_atrid_PasajeroAeronaveArg, ONString p_atrNombreAeronaveArg, ONString p_atrNombrePasajeroArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {

                // Call Executive
                PasajeroAeronaveExecutive lExecutive = new PasajeroAeronaveExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                Instance = lExecutive.Create_instanceServ(p_agrAeronaveArg, p_agrPasajeroArg, p_atrid_PasajeroAeronaveArg, p_atrNombreAeronaveArg, p_atrNombrePasajeroArg);

            }

            return Instance;
        }
コード例 #15
0
        public AdministradorInstance Create_instanceServ(ONInt p_atrid_AdministradorArg, ONString p_passwordArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {

                // Call Executive
                AdministradorExecutive lExecutive = new AdministradorExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                Instance = lExecutive.Create_instanceServ(p_atrid_AdministradorArg, p_passwordArg);

            }

            return Instance;
        }
コード例 #16
0
        public RevisionInstance Create_instanceServ(ONInt p_atrid_RevisarAeronaveArg, ONDate p_atrFechaRevisionArg, ONString p_atrNombreRevisorArg, ONString p_atrId_AeronaveArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {

                // Call Executive
                RevisionExecutive lExecutive = new RevisionExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                Instance = lExecutive.Create_instanceServ(p_atrid_RevisarAeronaveArg, p_atrFechaRevisionArg, p_atrNombreRevisorArg, p_atrId_AeronaveArg);

            }

            return Instance;
        }
コード例 #17
0
        public AeronaveInstance Create_instanceServ(PasajeroAeronaveOid p_agrPasajeroAeronaveArg, ONInt p_atrid_AeronaveArg, ONText p_atrNombreArg, ONInt p_atrMaximoPasajerosArg, ONText p_atrOrigenArg, ONText p_atrDestinoArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {

                // Call Executive
                AeronaveExecutive lExecutive = new AeronaveExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                Instance = lExecutive.Create_instanceServ(p_agrPasajeroAeronaveArg, p_atrid_AeronaveArg, p_atrNombreArg, p_atrMaximoPasajerosArg, p_atrOrigenArg, p_atrDestinoArg);

            }

            return Instance;
        }
コード例 #18
0
        public NaveNodrizaInstance Create_instanceServ(ONInt p_atrid_NaveNodrizaArg, ONString p_atrNombre_NaveNodrizaArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {

                // Call Executive
                NaveNodrizaExecutive lExecutive = new NaveNodrizaExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                Instance = lExecutive.Create_instanceServ(p_atrid_NaveNodrizaArg, p_atrNombre_NaveNodrizaArg);

            }

            return Instance;
        }
コード例 #19
0
        public RevisionPasajeroInstance Create_instanceServ(PasajeroAeronaveOid p_agrPasajeroAeronaveArg, RevisionOid p_agrRevisionArg, ONInt p_atrid_RevisionPasajeroArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {

                // Call Executive
                RevisionPasajeroExecutive lExecutive = new RevisionPasajeroExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                Instance = lExecutive.Create_instanceServ(p_agrPasajeroAeronaveArg, p_agrRevisionArg, p_atrid_RevisionPasajeroArg);

            }

            return Instance;
        }
コード例 #20
0
        internal RevisionPasajeroInstance Create_instanceServ(PasajeroAeronaveOid p_agrPasajeroAeronaveArg, RevisionOid p_agrRevisionArg, ONInt p_atrid_RevisionPasajeroArg)
        {
            if (Instance != null)
            {
                ONFilterList onfilt = new ONFilterList();
                onfilt.Add("QueryByOid", new QueryByOidFilter(Instance.Oid));
                Instance.Find(onfilt);
            }
            // Execute service
            RevisionPasajeroAction lAction = new RevisionPasajeroAction(OnContext);
            lAction.Instance = new RevisionPasajeroInstance(OnContext);
            Instance = lAction.Create_instanceServ(p_agrPasajeroAeronaveArg, p_agrRevisionArg, p_atrid_RevisionPasajeroArg);

            OnContext.OperationStack.Pop();
            OnContext.OperationStack.Push(Instance);

            return Instance;
        }
コード例 #21
0
        internal AeronaveInstance Create_instanceServ(PasajeroAeronaveOid p_agrPasajeroAeronaveArg, ONInt p_atrid_AeronaveArg, ONText p_atrNombreArg, ONInt p_atrMaximoPasajerosArg, ONText p_atrOrigenArg, ONText p_atrDestinoArg)
        {
            if (Instance != null)
            {
                ONFilterList onfilt = new ONFilterList();
                onfilt.Add("QueryByOid", new QueryByOidFilter(Instance.Oid));
                Instance.Find(onfilt);
            }
            // Execute service
            AeronaveAction lAction = new AeronaveAction(OnContext);
            lAction.Instance = new AeronaveInstance(OnContext);
            Instance = lAction.Create_instanceServ(p_agrPasajeroAeronaveArg, p_atrid_AeronaveArg, p_atrNombreArg, p_atrMaximoPasajerosArg, p_atrOrigenArg, p_atrDestinoArg);

            OnContext.OperationStack.Pop();
            OnContext.OperationStack.Push(Instance);

            return Instance;
        }
コード例 #22
0
        internal RevisionInstance Create_instanceServ(ONInt p_atrid_RevisarAeronaveArg, ONDate p_atrFechaRevisionArg, ONString p_atrNombreRevisorArg, ONString p_atrId_AeronaveArg)
        {
            if (Instance != null)
            {
                ONFilterList onfilt = new ONFilterList();
                onfilt.Add("QueryByOid", new QueryByOidFilter(Instance.Oid));
                Instance.Find(onfilt);
            }
            // Execute service
            RevisionAction lAction = new RevisionAction(OnContext);
            lAction.Instance = new RevisionInstance(OnContext);
            Instance = lAction.Create_instanceServ(p_atrid_RevisarAeronaveArg, p_atrFechaRevisionArg, p_atrNombreRevisorArg, p_atrId_AeronaveArg);

            OnContext.OperationStack.Pop();
            OnContext.OperationStack.Push(Instance);

            return Instance;
        }
コード例 #23
0
        internal AdministradorInstance Create_instanceServ(ONInt p_atrid_AdministradorArg, ONString p_passwordArg)
        {
            if (Instance != null)
            {
                ONFilterList onfilt = new ONFilterList();
                onfilt.Add("QueryByOid", new QueryByOidFilter(Instance.Oid));
                Instance.Find(onfilt);
            }
            // Execute service
            AdministradorAction lAction = new AdministradorAction(OnContext);
            lAction.Instance = new AdministradorInstance(OnContext);
            Instance = lAction.Create_instanceServ(p_atrid_AdministradorArg, p_passwordArg);

            OnContext.OperationStack.Pop();
            OnContext.OperationStack.Push(Instance);

            return Instance;
        }
コード例 #24
0
        internal PasajeroAeronaveInstance Create_instanceServ(AeronaveOid p_agrAeronaveArg, PasajeroOid p_agrPasajeroArg, ONInt p_atrid_PasajeroAeronaveArg, ONString p_atrNombreAeronaveArg, ONString p_atrNombrePasajeroArg)
        {
            if (Instance != null)
            {
                ONFilterList onfilt = new ONFilterList();
                onfilt.Add("QueryByOid", new QueryByOidFilter(Instance.Oid));
                Instance.Find(onfilt);
            }
            // Execute service
            PasajeroAeronaveAction lAction = new PasajeroAeronaveAction(OnContext);
            lAction.Instance = new PasajeroAeronaveInstance(OnContext);
            Instance = lAction.Create_instanceServ(p_agrAeronaveArg, p_agrPasajeroArg, p_atrid_PasajeroAeronaveArg, p_atrNombreAeronaveArg, p_atrNombrePasajeroArg);

            OnContext.OperationStack.Pop();
            OnContext.OperationStack.Push(Instance);

            return Instance;
        }
コード例 #25
0
        internal NaveNodrizaInstance Create_instanceServ(ONInt p_atrid_NaveNodrizaArg, ONString p_atrNombre_NaveNodrizaArg)
        {
            if (Instance != null)
            {
                ONFilterList onfilt = new ONFilterList();
                onfilt.Add("QueryByOid", new QueryByOidFilter(Instance.Oid));
                Instance.Find(onfilt);
            }
            // Execute service
            NaveNodrizaAction lAction = new NaveNodrizaAction(OnContext);
            lAction.Instance = new NaveNodrizaInstance(OnContext);
            Instance = lAction.Create_instanceServ(p_atrid_NaveNodrizaArg, p_atrNombre_NaveNodrizaArg);

            OnContext.OperationStack.Pop();
            OnContext.OperationStack.Push(Instance);

            return Instance;
        }
コード例 #26
0
        /// <summary>
        /// Creates XML elements from the data of the system.
        /// </summary>
        /// <param name="xmlWriter">Object with the XML message to add new information and return to client side</param>
        /// <param name="val">Value to be puted inside the XML message</param>
        /// <param name="dtdVersion">Version of the DTD that follows the XML message</param>
        /// <param name="xmlElement">Element of the XML that is checked</param>
        public static void ON2XML(XmlWriter xmlWriter, ONInt val, double dtdVersion, string xmlElement)
        {
            if (val == null)
            {
                if (xmlElement == ONXml.XMLTAG_V)
                    xmlWriter.WriteElementString(xmlElement, "");
                else
                    xmlWriter.WriteElementString(ONXml.XMLTAG_NULL, null);
            }
            else
            {
                xmlWriter.WriteStartElement(xmlElement);
                if (xmlElement == ONXml.XMLTAG_OIDFIELD && dtdVersion > 2.0)
                    xmlWriter.WriteAttributeString("Type", "autonumeric");

                xmlWriter.WriteString(val.TypedValue.ToString());
                xmlWriter.WriteEndElement();
            }
        }
コード例 #27
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public RevisionOid()
     : base("Revision")
 {
     Id_RevisarAeronaveAttr = ONInt.Null;
 }
コード例 #28
0
ファイル: ONInt.cs プロジェクト: sgon1853/UPM_MDD_Thesis
        public static ONReal Pow(ONInt obj1, ONReal obj2)
        {
            if (((object) obj1 == null) || ((object) obj2 == null))
                throw new ONNullException(null);

            if ((obj1.Value == null) || (obj2.Value == null))
                return ONReal.Null;

            return new ONReal(Convert.ToDecimal(Math.Pow(obj1.TypedValue, Convert.ToDouble(obj2.TypedValue))));
        }
コード例 #29
0
ファイル: ONInt.cs プロジェクト: sgon1853/UPM_MDD_Thesis
        public static ONReal Min(ONInt obj1, ONReal obj2)
        {
            if (((object) obj1 == null) || ((object) obj2 == null))
                throw new ONNullException(null);

            if ((obj1.Value == null) || (obj2.Value == null))
                return ONReal.Null;

            return new ONReal(Math.Min(obj1.TypedValue, obj2.TypedValue));
        }
コード例 #30
0
ファイル: ONInt.cs プロジェクト: sgon1853/UPM_MDD_Thesis
        public static ONReal Exp(ONInt obj1)
        {
            if (((object) obj1 == null) || (obj1.Value == null))
                throw new ONNullException(null);

            return new ONReal(Convert.ToDecimal(Math.Exp(obj1.TypedValue)));
        }
コード例 #31
0
        public override void Copy(object oid)
        {
            PasajeroOid lOid = oid as PasajeroOid;

            if (lOid != null)
            {
                Id_PasajeroAttr = new ONInt(lOid.Id_PasajeroAttr);
            }
            base.Copy(oid);
        }
コード例 #32
0
        public override void Copy(object oid)
        {
            RevisionOid lOid = oid as RevisionOid;

            if (lOid != null)
            {
                Id_RevisarAeronaveAttr = new ONInt(lOid.Id_RevisarAeronaveAttr);
            }
            base.Copy(oid);
        }
コード例 #33
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="val">Value for this type</param>
 public ONReal(ONInt val)
 {
     TypedValue = (decimal)val.TypedValue;
 }
コード例 #34
0
ファイル: ONReal.cs プロジェクト: sgon1853/UPM_MDD_Thesis
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="val">Value for this type</param>
 public ONReal(ONInt val)
 {
     TypedValue = (decimal) val.TypedValue;
 }
コード例 #35
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public AeronaveOid()
     : base("Aeronave")
 {
     Id_AeronaveAttr = ONInt.Null;
 }
コード例 #36
0
        public override void Copy(object oid)
        {
            AeronaveOid lOid = oid as AeronaveOid;

            if (lOid != null)
            {
                Id_AeronaveAttr = new ONInt(lOid.Id_AeronaveAttr);
            }
            base.Copy(oid);
        }