예제 #1
0
 public void importarInformacion()
 {
     JSPservice.GestionAplicacionClient servicio = new JSPservice.GestionAplicacionClient();
     JSPservice.servicio[] lista = servicio.getDatosServicios();
     for (int i = 0; i < lista.Length; i++)
     {
         JSPservice.servicio dato = lista[i];
         if (dato.idservicio == idInventario)
         {
             inventarioMes   = dato.precioMensual;
             inventarioAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idVentas)
         {
             ventasMes   = dato.precioMensual;
             ventasAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idcompras)
         {
             comprasMes   = dato.precioMensual;
             comprasAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idfactura)
         {
             facturaMes   = dato.precioMensual;
             facturaAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idrecluta)
         {
             reclutamientoMes   = dato.precioMensual;
             reclutamientoAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idflota)
         {
             flotasMes   = dato.precioMensual;
             flotasAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idblog)
         {
             blogMes   = dato.precioMensual;
             blogAnual = dato.precioAnual;
         }
         else if (dato.idservicio == ideventos)
         {
             eventosMes   = dato.precioMensual;
             eventosAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idCrm)
         {
             crmMes   = dato.precioMensual;
             crmAnual = dato.precioAnual;
         }
         else if (dato.idservicio == idusers)
         {
             usuarioMes   = dato.precioMensual;
             usuarioAnual = dato.precioAnual;
         }
     }
 }
예제 #2
0
        protected void btnIngresar_Click(object sender, EventArgs e)
        {
            JSPservice.GestionAplicacionClient servicio = new JSPservice.GestionAplicacionClient();
            JSPservice.cuenta usuario = servicio.Login(txtUser.Text.Trim(), txtClave.Text.Trim());

            if (usuario.idCuenta != 0)
            {
                Session["Login"] = usuario;
                if (usuario.tipo == AdminSistema)
                {
                }
                else if (usuario.tipo == AdminServicio)
                {
                    Response.Redirect("Tienda.aspx");
                }
                else if (usuario.tipo == CUsuario)
                {
                }
            }
        }
예제 #3
0
        protected void btnIngresar_Click(object sender, EventArgs e)
        {
            JSPservice.GestionAplicacionClient nuevo = new JSPservice.GestionAplicacionClient();

            if (txtClave.Text == txtClave2.Text && !hayCamposVacios())
            {
                if (!nuevo.ExisteUsuario(txtUsuario.Text.Trim()))
                {
                    bool respuesta = nuevo.Registrar(txtNombre.Text.Trim(), txtUsuario.Text.Trim(), txtCorreo.Text.Trim(), txtClave.Text);
                    if (respuesta == true)
                    {
                        Response.Write("<script>alert('REGISTRO CORRECTO, INGRESE SUS DATOS PARA INICIAR SESION.')</script>");
                        Response.Redirect("Login.aspx");
                    }
                    else
                    {
                        Response.Write("<script>alert('REGISTRO INCORRECTO.')</script>");
                    }
                }
                else
                {
                    Response.Write("<script>alert('El USUARIO YA EXISTE')</script>");
                }
            }
            else
            {
                if (txtClave.Text == txtClave2.Text)
                {
                    Response.Write("<script>alert('HAY CAMPOS VACIOS.')</script>");
                }
                else
                {
                    Response.Write("<script>alert('LAS CONTRASEÑAS SON DIFERENTES.')</script>");
                }
            }
        }