protected void grvConvenios_RowCommand(object sender, GridViewCommandEventArgs e) { try { int index; GridViewRow row; if (e.CommandName == "Eliminar_Click") { index = int.Parse(e.CommandArgument.ToString()); row = grvConvenios.Rows[(index)]; string resDelPag = ""; resDelPag = AdministrarPagadurias.EliminarConvenios(Int32.Parse(row.Cells[1].Text)); //MensajeForm(resDelPag, "DetallePagaduria.aspx#irConvenios"); MensajeForm(resDelPag, "" + host + "/gestion/pagadurias/detalle?tab=tab-4"); } else if (e.CommandName == "Consultar_Click") { index = int.Parse(e.CommandArgument.ToString()); row = grvConvenios.Rows[(index)]; Session["idConvPaga"] = row.Cells[1].Text; //Response.Redirect("ConsultarConveniosPagaduria.aspx", false); Response.RedirectToRoute("consultarConveniosPagaduria"); } } catch (Exception ex) { MensajeForm("Ha Ocurrido un Problema con su petición", null); } }
protected void btnEliminar_Click(object sender, EventArgs e) { try { if (Session["idConvPaga"] != null) { string resDelPag = ""; resDelPag = AdministrarPagadurias.EliminarConvenios(Int32.Parse(Session["idConvPaga"].ToString())); MensajeForm(resDelPag, "~/gestion/pagadurias/detalle#irConvenios"); } else { MensajeForm("No se ha podido identificar la pagaduria", "~/gestion/pagadurias/detalle#irConvenios"); } } catch (Exception ex) { MensajeForm("Ha ocurrido un problema con su petición", null); } }
protected void btnEliminar_Click(object sender, EventArgs e) { try { if (Session["idConvPaga"] != null) { string resDelPag = ""; resDelPag = AdministrarPagadurias.EliminarConvenios(Int32.Parse(Session["idConvPaga"].ToString())); //MensajeForm(resDelPag, "~/gestion/pagadurias/detalle#irConvenios"); ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('Convenio eliminado correctamente.');window.location.replace('" + host + "/gestion/pagadurias/detalle?tab=tab-4')", true); } else { MensajeForm("No se ha podido identificar la pagaduria", "/gestion/pagadurias/convenios"); } } catch (Exception ex) { MensajeForm("Ha ocurrido un problema con su petición", null); } }
protected void grvConvenios_RowCommand(object sender, GridViewCommandEventArgs e) { try { int index; if (e.CommandName == "Eliminar_Click") { index = int.Parse(e.CommandArgument.ToString()); GridViewRow row = grvConvenios.Rows[(index)]; string resDelPag = ""; resDelPag = AdministrarPagadurias.EliminarConvenios(Int32.Parse(row.Cells[1].Text)); //MensajeForm(resDelPag, "DetallePagaduria.aspx#irConvenios"); MensajeForm(resDelPag, "~/gestion/pagadurias/detalle#irConvenios"); } } catch (Exception ex) { MensajeForm("Ha Ocurrido un Problema con su petición", null); } }