コード例 #1
0
        public int ReportarGymkana(int id_usuario, int id_gym, string motivo)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Reporte_ReportarGymkana) ENABLED START*/

            IReporteCAD reporteCAD = null;
            ReporteCEN  reporteCEN = null;

            int result = -1;


            try
            {
                SessionInitializeTransaction();
                reporteCAD = new ReporteCAD(session);
                reporteCEN = new  ReporteCEN(reporteCAD);



                // Write here your custom transaction ...

                int id = reporteCEN.New_(motivo, id_usuario);
                reporteCAD.RelationerReporteGymkana(id, id_gym);


                SessionCommit();
            }
            catch (Exception ex)
            {
                SessionRollBack();
                throw ex;
            }
            finally
            {
                SessionClose();
            }
            return(result);


            /*PROTECTED REGION END*/
        }