public void Init() { detalleMatricula = (ComandoConsultarDetallarMatricula)FabricaComandos.ObtenerComandoConsultarDetallarMatricula(); idMatricula = (MatriculaM7)FabricaEntidades.ObtenerMatriculaM7(); idPersona = (PersonaM7)FabricaEntidades.ObtenerPersonaM7(); idMatricula.Id = 2; idPersona.Id = 6; detalleMatricula.LaEntidad = idMatricula; detalleMatricula.IdPersona = idPersona; }
public void Clean() { detalleMatricula = null; idMatricula = null; }
/// <summary> /// Método que se ejecuta al cargar la página Listar Matriculas pagas /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { ((SKD)Page.Master).IdModulo = M7_Recursos.NumeroModulo; String detalleStringMatricula = Request.QueryString[M7_Recursos.MatriculaDetalle]; try { String rolUsuario = Session[RecursosInterfazMaster.sessionRol].ToString(); Boolean permitido = false; List<String> rolesPermitidos = new List<string> (new string[] { M7_Recursos.RolSistema, M7_Recursos.RolAtleta, M7_Recursos.RolRepresentante, M7_Recursos.RolAtletaMenor }); foreach (String rol in rolesPermitidos) { if (rol == rolUsuario) permitido = true; } if (permitido) { if (!IsPostBack) // verificar si la pagina se muestra por primera vez { try { idMatricula = (MatriculaM7)FabricaEntidades.ObtenerMatriculaM7(); idPersona = (PersonaM7)FabricaEntidades.ObtenerPersonaM7(); idPersona.Id = int.Parse(Session[RecursosInterfazMaster.sessionUsuarioID].ToString()); idMatricula.Id = int.Parse(detalleStringMatricula); presentador.CargarDatos(idMatricula,idPersona); } catch (ObjetoNuloException) { Logger.EscribirInfo(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, M7_Recursos.MensajeObjetoNuloLogger, System.Reflection.MethodBase.GetCurrentMethod().Name); } catch (NumeroEnteroInvalidoException) { Logger.EscribirInfo(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, M7_Recursos.Mensaje_Numero_Parametro_invalido, System.Reflection.MethodBase.GetCurrentMethod().Name); } catch (Exception ex) { Logger.EscribirInfo(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, ex.Message, System.Reflection.MethodBase.GetCurrentMethod().Name); } } } else { Response.Redirect(RecursosInterfazMaster.direccionMaster_Inicio); } } catch (NullReferenceException ex) { Logger.EscribirInfo(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, ex.Message, System.Reflection.MethodBase.GetCurrentMethod().Name); } }