Beispiel #1
0
 protected void dgv_tipo_productos_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "modificar")
     {
         TipoProducto tp = new TipoProducto();
         tp.id          = Convert.ToDecimal(e.CommandArgument);
         tp             = tp.getById();
         txtId.Text     = tp.id.ToString();
         txtNombre.Text = tp.nombre;
     }
     if (e.CommandName == "eliminar")
     {
         decimal      id = Convert.ToDecimal(e.CommandArgument);
         TipoProducto tp = new TipoProducto();
         tp.id = id;
         tp.delete();
         cargarGrilla();
     }
 }