protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Nombre"] != null)
        {
        }
        else
        {
            Response.Redirect("FrmLoginEn.aspx");
        }

        if (Page.PreviousPage != null)
        {
            if (!lblID.Visible)
            {
                string   id = PreviousPage.getID();
                Empleado em = JsonConvert.DeserializeObject <Empleado>(servicio.Buscar(Convert.ToInt32(id)));
                Label1.Visible     = true;
                lblID.Text         = Convert.ToString(em.Id);
                txtNombre.Value    = em.Nombre;
                txtApellido.Value  = em.Apellidos;
                txtUsuario.Value   = em.Usuario;
                txtPuesto.Value    = em.Puesto;
                txtCorreo.Value    = em.Email;
                txtDireccion.Value = em.Direccion;
                txtTelefono.Value  = em.Telefono;
                bntRegistrar.Text  = "Actualizar";
                lblID.Visible      = true;
            }
        }
    }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Nombre"] != null)
     {
     }
     else
     {
         Response.Redirect("FrmLoginEn.aspx");
     }
     if (Page.PreviousPage != null)
     {
         if (!Label2.Visible)
         {
             string id = PreviousPage.getID();
             Label2.Text    = id;
             Label1.Visible = true;
             Label2.Visible = true;
             Proveedor p = dao.Buscar(Convert.ToInt32(id));
             txtNombre.Text    = p.Nombre_proveedor;
             txtTelefono.Text  = p.Telefono_proveedor;
             txtEmail.Text     = p.Email_proveedor;
             txtDireccion.Text = p.Direccion_proveedor;
             txtCiudad.Text    = p.Ciudad_proveedor;
             Button1.Text      = "Actualizar";
         }
     }
 }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Nombre"] != null)
        {
        }
        else
        {
            Response.Redirect("FrmLoginEn.aspx");
        }
        llenarCombos();
        if (Page.PreviousPage != null)
        {
            if (!Label2.Visible)
            {
                string id = PreviousPage.getID();
                Label2.Text    = id;
                Label1.Visible = true;
                Label2.Visible = true;
                Producto p = daoProducto.Buscar(Convert.ToInt32(id));
                txtNombre.Text       = p.Nombre;
                txtModelo.Text       = p.Modelo;
                txtCantidad.Text     = Convert.ToString(p.Cantidad);
                txtPrecioC.Text      = Convert.ToString(p.Precio_compra);
                txtPrecioV.Text      = Convert.ToString(p.Precio_venta);
                txtDescripcion.Value = p.Descripcion;

                btnAceptar.Text = "Actualizar";
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     //if (Session["Nombre"] != null)
     //{
     //}
     //else
     //{
     //    Response.Redirect("FrmLoginEn.aspx");
     //}
     if (Page.PreviousPage != null)
     {
         if (!Label2.Visible)
         {
             string     id = PreviousPage.getID();
             Mensajeria m  = dao.Buscar(Convert.ToInt32(id));
             txtNombre.Text   = m.Nombre_mensajeria;
             txtTelefono.Text = m.Telefono_mensajeria;
             txtEmail.Text    = m.Email_mensajeria;
             Label1.Visible   = true;
             Label2.Text      = id;
             Label2.Visible   = true;
             Button1.Text     = "Actualizar";
         }
     }
 }