protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache); L_ReporteAdmin logi = new L_ReporteAdmin(); String res = logi.page_load(Session["Sesion"], Session["sesion"]); //Seteando Idiomas L_Idioma idiot = new L_Idioma(); Object sesidioma = Session["idiomases"]; Int32 formulario = 30; Int32 idiom = Convert.ToInt32(sesidioma); Hashtable compIdioma = new Hashtable(); idiot.mostraridioma(formulario, idiom, compIdioma); try { this.pro_rep2.InnerHtml = compIdioma["pro_rep"].ToString() + "<small id='n_opt' runat='server'> " + compIdioma["n_opt"].ToString() + "</small>"; this.reporte.InnerText = compIdioma["reporte"].ToString(); this.pro_rep.InnerText = compIdioma["pro_rep"].ToString(); //this.sol.InnerText = compIdioma["sol"].ToString(); //this.respo.InnerText } catch (Exception ex) { } Page.ClientScript.RegisterStartupScript(this.GetType(), "scr", "redireccionar('" + res + "');", true); }
protected void TablaImagenes_ItemCommand(object source, RepeaterCommandEventArgs e) { DataTable Fotos = new DataTable(); L_ReporteAdmin logi = new L_ReporteAdmin(); //IADProducto IAD_Producto = new IADProducto(); Fotos = logi.images(int.Parse(idProducto.Text)); String ruta = Fotos.Rows[e.Item.ItemIndex]["rutaArchivo"].ToString(); ruta = (Server.MapPath("~\\Archivos\\FotosProductos") + "\\" + ruta); String name = ((DataTable)Session["sesion"]).Rows[0]["nomUsuario"].ToString(); logi.Delete_image(int.Parse(e.CommandArgument.ToString()), name); try { System.IO.File.Delete(ruta); } catch (Exception ex) { throw ex; } Response.Redirect(Request.Url.AbsoluteUri); }