示例#1
0
    protected void grvArchivosSoporte_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            string rutaArchivo = Server.MapPath(grvArchivosSoporte.SelectedRow.Cells[2].Text);
            string msjDel      = "";

            if (File.Exists(rutaArchivo))
            {
                File.Delete(rutaArchivo);
            }
            else
            {
                //MensajeForm("El archivo no existe", "DetallePagaduria.aspx");
                msjDel = "Archivo no Encontrado.";
            }

            string resDel = AdministrarPagadurias.EliminarArchivoSoportePagaduria(Convert.ToInt32(grvArchivosSoporte.SelectedValue));
            MensajeForm(msjDel + " " + resDel, "~/gestion/pagadurias/detalle#archSopPag");
        }
        catch (Exception ex)
        {
            //Response.Write(ex.ToString());
            MensajeForm("Ha Ocurrido un Problema con su petición", null);
        }
    }
示例#2
0
    protected void grvArchivosSoporte_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            string rutaArchivo = Server.MapPath(grvArchivosSoporte.SelectedRow.Cells[2].Text);
            string msjDel      = "";

            if (File.Exists(rutaArchivo))
            {
                File.Delete(rutaArchivo);
            }
            else
            {
                //MensajeForm("El archivo no existe", "DetallePagaduria.aspx");
                msjDel = "Archivo no Encontrado.";
            }

            string resDel = AdministrarPagadurias.EliminarArchivoSoportePagaduria(Convert.ToInt32(grvArchivosSoporte.SelectedValue));
            //MensajeForm(msjDel + " " + resDel, "DetallePagaduria.aspx#archSopPag");
            //MensajeForm(msjDel + " " + resDel, "~/gestion/pagadurias/detalle#archSopPag");
            ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('Archivo eliminado.');window.location.replace('" + host + "/gestion/pagadurias/detalle?tab=tab-3')", true);
        }
        catch (Exception ex)
        {
            //Response.Write(ex.ToString());
            MensajeForm("Ha Ocurrido un Problema con su petición", null);
        }
    }