Пример #1
0
        public void RelationerReporteGymkana(int p_Reporte_OID, int p_gymkana_OID)
        {
            WhateverGenNHibernate.EN.Whatever.ReporteEN reporteEN = null;
            try
            {
                SessionInitializeTransaction();
                reporteEN         = (ReporteEN)session.Load(typeof(ReporteEN), p_Reporte_OID);
                reporteEN.Gymkana = (WhateverGenNHibernate.EN.Whatever.GymkanaEN)session.Load(typeof(WhateverGenNHibernate.EN.Whatever.GymkanaEN), p_gymkana_OID);

                reporteEN.Gymkana.Reporte.Add(reporteEN);



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

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


            finally
            {
                SessionClose();
            }
        }
        public void ModificarReporte(WhateverGenNHibernate.EN.Whatever.ReporteEN reporte)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Reporte_ModificarReporte) ENABLED START*/

            // Write here your custom code...

            ReporteCAD repor = new ReporteCAD();

            repor.

            /*PROTECTED REGION END*/
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            ReporteEN t = obj as ReporteEN;

            if (t == null)
            {
                return(false);
            }
            if (ID.Equals(t.ID))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #4
0
        public void UnrelationerReporteGymkana(int p_Reporte_OID, int p_gymkana_OID)
        {
            try
            {
                SessionInitializeTransaction();
                WhateverGenNHibernate.EN.Whatever.ReporteEN reporteEN = null;
                reporteEN = (ReporteEN)session.Load(typeof(ReporteEN), p_Reporte_OID);

                if (reporteEN.Gymkana.ID == p_gymkana_OID)
                {
                    reporteEN.Gymkana = null;
                }
                else
                {
                    throw new ModelException("The identifier " + p_gymkana_OID + " in p_gymkana_OID you are trying to unrelationer, doesn't exist in ReporteEN");
                }

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

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


            finally
            {
                SessionClose();
            }
        }
Пример #5
0
 public ReporteEN(ReporteEN reporte)
 {
     this.init(ID, reporte.Motivo, reporte.Usuario, reporte.Reto, reporte.Evento, reporte.Gymkana);
 }