コード例 #1
0
ファイル: AdjuntoCAD.cs プロジェクト: shn2/sanur
        public void Modify(AdjuntoEN adjunto)
        {
            try
            {
                SessionInitializeTransaction();
                AdjuntoEN adjuntoEN = (AdjuntoEN)session.Load(typeof(AdjuntoEN), adjunto.IdAdjunto);

                adjuntoEN.Url = adjunto.Url;


                adjuntoEN.Tipo = adjunto.Tipo;

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

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


            finally
            {
                SessionClose();
            }
        }
コード例 #2
0
ファイル: AdjuntoCEN.cs プロジェクト: shn2/sanur
        public AdjuntoEN ReadOID(int idAdjunto)
        {
            AdjuntoEN adjuntoEN = null;

            adjuntoEN = _IAdjuntoCAD.ReadOID(idAdjunto);
            return(adjuntoEN);
        }
コード例 #3
0
ファイル: AdjuntoCAD.cs プロジェクト: shn2/sanur
        public int New_(AdjuntoEN adjunto)
        {
            try
            {
                SessionInitializeTransaction();

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

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


            finally
            {
                SessionClose();
            }

            return(adjunto.IdAdjunto);
        }
コード例 #4
0
ファイル: AdjuntoCAD.cs プロジェクト: shn2/sanur
        public AdjuntoEN ReadOIDDefault(int idAdjunto)
        {
            AdjuntoEN adjuntoEN = null;

            try
            {
                SessionInitializeTransaction();
                adjuntoEN = (AdjuntoEN)session.Get(typeof(AdjuntoEN), idAdjunto);
                SessionCommit();
            }

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


            finally
            {
                SessionClose();
            }

            return(adjuntoEN);
        }
コード例 #5
0
ファイル: AdjuntoCAD.cs プロジェクト: shn2/sanur
        public void Destroy(int idAdjunto)
        {
            try
            {
                SessionInitializeTransaction();
                AdjuntoEN adjuntoEN = (AdjuntoEN)session.Load(typeof(AdjuntoEN), idAdjunto);
                session.Delete(adjuntoEN);
                SessionCommit();
            }

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


            finally
            {
                SessionClose();
            }
        }
コード例 #6
0
ファイル: AdjuntoCEN.cs プロジェクト: shn2/sanur
        public void Modify(int p_Adjunto_OID, string p_url, string p_tipo)
        {
            AdjuntoEN adjuntoEN = null;

            //Initialized AdjuntoEN
            adjuntoEN           = new AdjuntoEN();
            adjuntoEN.IdAdjunto = p_Adjunto_OID;
            adjuntoEN.Url       = p_url;
            adjuntoEN.Tipo      = p_tipo;
            //Call to AdjuntoCAD

            _IAdjuntoCAD.Modify(adjuntoEN);
        }
コード例 #7
0
ファイル: AdjuntoCEN.cs プロジェクト: shn2/sanur
        public int New_(string p_url, string p_tipo)
        {
            AdjuntoEN adjuntoEN = null;
            int       oid;

            //Initialized AdjuntoEN
            adjuntoEN     = new AdjuntoEN();
            adjuntoEN.Url = p_url;

            adjuntoEN.Tipo = p_tipo;

            //Call to AdjuntoCAD

            oid = _IAdjuntoCAD.New_(adjuntoEN);
            return(oid);
        }