コード例 #1
0
ファイル: Registrar.aspx.cs プロジェクト: nMoschen/NET_TP2
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            personaActual = new Negocio.Entidades.Persona();

            this.MapearADatos(personaActual);

            personaActual.Contraseña = GeneradorContraseñas.GenerarContraseña();

            try
            {
                logicaPersona = new LogicaPersona();
                logicaPersona.RegistrarPersona(personaActual);

                div_exito.Visible = true;
                div_error.Visible = false;
                lbl_mensaje_exito.Text = "La operación ha sido realizada satisfactoriamente";
                // AGREGAR CODIGO PARA ENVIAR UN EMAIL CON LA CONTRASEÑA AL EMPLEADO
            }
            catch (Exception ex)
            {
                div_error.Visible = true;
                div_exito.Visible = false;
                lbl_mensaje_error.Text = ex.Message;
            }
        }
コード例 #2
0
ファイル: Login.aspx.cs プロジェクト: nMoschen/NET_TP2
        protected void Page_Load(object sender, EventArgs e)
        {
            logicaPersona = new LogicaPersona();

            //No permite tocar el menu mientras se hace el logueo
            Menu menuPrincipal = (Menu)Page.Master.FindControl("MenuPrincipal");
            foreach (MenuItem m in menuPrincipal.Items)
            {
                m.Enabled = false;
            }
        }
コード例 #3
0
ファイル: Login.aspx.cs プロジェクト: nMoschen/NET_TP2
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["nroDoc"] != null)
            {
                Response.Redirect("/");
            }
            else
            {
                logicaPersona = new LogicaPersona();

                div_advertencia.Visible = false;
                div_error.Visible = false;
            }
        }
コード例 #4
0
ファイル: FormBasePersona.cs プロジェクト: nMoschen/NET_TP2
        public FormBasePersona(Persona.eRol rol):this()
        {
            logicaPersona = new LogicaPersona();
            PersonaActual = new Persona();

            Rol = rol;

            if (Rol == Persona.eRol.Cliente)
            {
                SetearFormCliente();
            }
            else
            {
                SetearFormEmpleado();
            }
        }
コード例 #5
0
        public FormRecuperarContraseña()
        {
            InitializeComponent();

            logicaPersona = new LogicaPersona();
        }
コード例 #6
0
ファイル: FormLogin.cs プロジェクト: nMoschen/NET_TP2
        public FormLogin()
        {
            InitializeComponent();

            logicaPersona = new LogicaPersona();
        }