Example #1
0
        protected void btnSubir_Click(object sender, EventArgs e)
        {
            if (fuploadImagen.HasFile)
            {
                //opteniendo la extension
                string ext = System.IO.Path.GetExtension(fuploadImagen.FileName);
                ext = ext.ToLower();
                //optener nombre archivo
                string nom = fuploadImagen.FileName;
                //configurando el tamaño en bytes
                //int tam = fuploadImagen.PostedFile.ContentLength;
                //Response.Write(ext + ", " + tam);
                //guardamos en el servidor
                fuploadImagen.SaveAs(Server.MapPath("~/PublicacionesImagenes/" + fuploadImagen.FileName));

                ServicioW.ServicioSoapClient mi = new ServicioW.ServicioSoapClient();


                mi.mtdRegistrarFoto(nom, int.Parse(lblId.Text));
            }
            else
            {
                Response.Write("Cargue Imagen...");
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ServicioW.ServicioSoapClient mi = new ServicioW.ServicioSoapClient();
            int ultimaPublicacion           = mi.mtdUltimaPublicacion();

            lblId.Text = ultimaPublicacion.ToString();
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string usu = Request.Form["txtusuarioo"];
            string con = Request.Form["txtcontrasena"];

            ServicioW.ServicioSoapClient mi = new ServicioW.ServicioSoapClient();
            int res = mi.Login(usu, con);

            if (res > 0)
            {
                Session["Usuario"]       = usu;
                Session["Contrasena"]    = con;
                Application["IdUsuario"] = res;
                Response.Redirect("indexRegistrado.aspx");
            }
            else
            {
                Console.WriteLine("Usuario o Contraseña incorrectos");
                Response.Redirect("Login.aspx");
                //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "alert('Correo y/o Contraseña Incorrecta')", true);
            }
        }