Esempio n. 1
0
        public PasajeroInstance Create_instanceServ(PasajeroAeronaveOid p_agrPasajeroAeronaveArg, ONInt p_atrid_PasajeroArg, ONText p_atrNombreArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {

                // Call Executive
                PasajeroExecutive lExecutive = new PasajeroExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                Instance = lExecutive.Create_instanceServ(p_agrPasajeroAeronaveArg, p_atrid_PasajeroArg, p_atrNombreArg);

            }

            return Instance;
        }
Esempio n. 2
0
        public void Delete_instanceServ(PasajeroOid p_thisPasajeroArg)
        {
            // Create new context
            using (ONServiceContext lOnContext = new ONServiceContext(OnContext))
            {
                // Change to Transactional OnContext
                Instance.OnContext = lOnContext;

                // Call Executive
                PasajeroExecutive lExecutive = new PasajeroExecutive();
                lExecutive.OnContext = lOnContext;
                lExecutive.Instance = Instance;
                lExecutive.Delete_instanceServ(p_thisPasajeroArg);

                // Change to Non-Transactional OnContext
                Instance.OnContext = OnContext;
            }
        }