Esempio n. 1
0
        public void Modify(PruebaEN prueba)
        {
            try
            {
                SessionInitializeTransaction();
                PruebaEN pruebaEN = (PruebaEN)session.Load(typeof(PruebaEN), prueba.IdPrueba);

                pruebaEN.Nombre = prueba.Nombre;


                pruebaEN.Descripcion = prueba.Descripcion;


                pruebaEN.Resultado = prueba.Resultado;

                session.Update(pruebaEN);
                SessionCommit();
            }

            catch (Exception ex) {
                SessionRollBack();
                if (ex is SanurGenNHibernate.Exceptions.ModelException)
                {
                    throw ex;
                }
                throw new SanurGenNHibernate.Exceptions.DataLayerException("Error in PruebaCAD.", ex);
            }


            finally
            {
                SessionClose();
            }
        }
Esempio n. 2
0
        public string New_(PruebaEN prueba)
        {
            try
            {
                SessionInitializeTransaction();

                session.Save(prueba);
                SessionCommit();
            }

            catch (Exception ex) {
                SessionRollBack();
                if (ex is SanurGenNHibernate.Exceptions.ModelException)
                {
                    throw ex;
                }
                throw new SanurGenNHibernate.Exceptions.DataLayerException("Error in PruebaCAD.", ex);
            }


            finally
            {
                SessionClose();
            }

            return(prueba.IdPrueba);
        }
Esempio n. 3
0
        public PruebaEN ReadOIDDefault(string idPrueba)
        {
            PruebaEN pruebaEN = null;

            try
            {
                SessionInitializeTransaction();
                pruebaEN = (PruebaEN)session.Get(typeof(PruebaEN), idPrueba);
                SessionCommit();
            }

            catch (Exception ex) {
                SessionRollBack();
                if (ex is SanurGenNHibernate.Exceptions.ModelException)
                {
                    throw ex;
                }
                throw new SanurGenNHibernate.Exceptions.DataLayerException("Error in PruebaCAD.", ex);
            }


            finally
            {
                SessionClose();
            }

            return(pruebaEN);
        }
Esempio n. 4
0
        public PruebaEN ReadOID(string idPrueba)
        {
            PruebaEN pruebaEN = null;

            pruebaEN = _IPruebaCAD.ReadOID(idPrueba);
            return(pruebaEN);
        }
Esempio n. 5
0
        public void Modify(string p_Prueba_OID, string p_nombre, string p_descripcion, string p_resultado)
        {
            PruebaEN pruebaEN = null;

            //Initialized PruebaEN
            pruebaEN             = new PruebaEN();
            pruebaEN.IdPrueba    = p_Prueba_OID;
            pruebaEN.Nombre      = p_nombre;
            pruebaEN.Descripcion = p_descripcion;
            pruebaEN.Resultado   = p_resultado;
            //Call to PruebaCAD

            _IPruebaCAD.Modify(pruebaEN);
        }
Esempio n. 6
0
        public string New_(string p_idPrueba, string p_nombre, string p_descripcion, string p_resultado)
        {
            PruebaEN pruebaEN = null;
            string   oid;

            //Initialized PruebaEN
            pruebaEN          = new PruebaEN();
            pruebaEN.IdPrueba = p_idPrueba;

            pruebaEN.Nombre = p_nombre;

            pruebaEN.Descripcion = p_descripcion;

            pruebaEN.Resultado = p_resultado;

            //Call to PruebaCAD

            oid = _IPruebaCAD.New_(pruebaEN);
            return(oid);
        }