Ejemplo n.º 1
0
 protected void tablatipoproducto_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     ClientScript.RegisterStartupScript(GetType(), "alerta", "panel3();", true);
     try
     {
         if (e.CommandName.ToString() == "Eliminar")
         {
             string DeleteRowId = e.CommandArgument.ToString();
             tipopro.idtipoproducto = DeleteRowId;
             if (tipopro.EliminarTipoProducto(tipopro))
             {
                 CargarTabletipoProducto();
             }
             else
             {
                 textError.InnerHtml = "No se ha podido Eliminar el Tipo de producto, ya se encuentra socociado";
                 Alerta.CssClass     = "alert alert-error";
                 Alerta.Visible      = true;
             }
         }
     }
     catch (Exception ex)
     {
         textError.InnerHtml = ex.Message;
         Alerta.CssClass     = "alert alert-error";
         Alerta.Visible      = true;
     }
 }