Exemplo n.º 1
0
 public PerfilVO()
 {
     perfilid    = 0;
     nombre      = "";
     estatus     = 0;
     fechaAlta   = new DateTime();
     fechaCambio = new DateTime();
     operacion   = 0;
     listaFuncVO = new FuncionesPerfilVO();
     resultado   = 0;
 }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int               perfilid   = 0;
        PerfilVO          VO         = new PerfilVO();
        PerfilBL          BL         = new PerfilBL();
        FuncionesPerfilVO FuncTempVO = new FuncionesPerfilVO();

        if (Request["perfilid"] != null)
        {
            Button1.Text         = "Procesar Cambio";
            Label1.Text          = "Cambio de Informacion del Perfil";
            perfilid             = Int32.Parse(Request["perfilid"]);
            FuncTempVO.Funciones = getValoresCheckbox();

            VO.Nombre      = txtNombreP.Text;
            VO.Estatus     = Int32.Parse(listEstatus.SelectedValue);
            VO.Perfilid    = perfilid;
            VO.ListaFuncVO = FuncTempVO;
            VO.Operacion   = PerfilVO.ACTUALIZAR;

            VO = (PerfilVO)BL.execute(VO);
            if (VO.Resultado == 0)
            {
                Mensaje01.Text = "Los datos se actualizaron correctamente";
            }
            else
            {
                Mensaje01.Text = "Los datos NO se actualizaron correctamente";
            }
        }
        else
        {
            FuncTempVO.Funciones = getValoresCheckbox();
            VO.Nombre            = txtNombreP.Text;
            VO.Estatus           = Int32.Parse(listEstatus.SelectedValue);
            VO.Perfilid          = perfilid;
            VO.ListaFuncVO       = FuncTempVO;
            VO.Operacion         = PerfilVO.INSERTAR;

            VO = (PerfilVO)BL.execute(VO);
            if (VO.Resultado > 0)
            {
                perfilid       = (int)VO.Resultado;
                Mensaje01.Text = "Los datos se insertaron correctamente";
            }
            else
            {
                Mensaje01.Text = "Los datos NO se insertaron";
            }
        }
    }
Exemplo n.º 3
0
 public LoginVO()
 {
     funcionPerfil = new FuncionesPerfilVO();
 }