public void llenarGridTipoPago(object obj) { TipoPago = null; GrTipo.DataSource = servicio.BuscarTipoPagoDAO(obj); GrTipo.DataBind(); Session["Resultado"] = servicio.BuscarTipoPagoDAO(obj); }
protected void grResultado_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "SELECT") { indice = Convert.ToInt32(e.CommandArgument); Session["Id"] = Convert.ToInt32(GrTipo.Rows[indice].Cells[0].Text); txtNombre.Text = GrTipo.Rows[indice].Cells[1].Text; } if (e.CommandName == "BORRA") { indice = Convert.ToInt32(e.CommandArgument); Session["Id"] = Convert.ToInt32(GrTipo.Rows[indice].Cells[0].Text); TipoPago.IdTipoPago = Convert.ToInt32(GrTipo.Rows[indice].Cells[0].Text); servicio.EliminarTipoPagoDAO(TipoPago); //indice = 0; TipoPago = new localhost.TipoPagoBO(); llenarGridTipoPago(TipoPago); } }
public void limpiar() { TipoPago = new localhost.TipoPagoBO(); txtNombre.Text = ""; llenarGridTipoPago(TipoPago); }