Beispiel #1
0
    protected void btn_eliminar_click(object sender, EventArgs e)
    {
        TractoBC t = new TractoBC();

        if (t.Eliminar(int.Parse(hf_id.Value)))
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "mensaje", "alert('Tracto eliminado exitosamente');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "mensaje", "alert('Ocurrió un error al eliminar Tracto');", true);
        }
        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cerrar", "cerrarModal('modalConfirmar');", true);
        ObtenerTracto(true);
    }
Beispiel #2
0
 protected void btn_confEliminar_Click(object sender, EventArgs e)
 {
     try
     {
         TractoBC t = new TractoBC();
         if (t.Eliminar(Convert.ToInt32(hf_id.Value)))
         {
             utils.ShowMessage2(this, "eliminar", "success");
             utils.CerrarModal(this, "modalConf");
         }
         else
         {
             utils.ShowMessage2(this, "eliminar", "error");
         }
     }
     catch (Exception ex)
     {
         utils.ShowMessage(this, ex.Message, "error", false);
     }
     finally
     {
         ObtenerTracto(true);
     }
 }