Example #1
0
        protected void EliminarButton_Click(object sender, EventArgs e)
        {
            if (PaisIdTextBox.Text.Length > 0)
            {
                if (Seguridad.ValidarEntero(PaisIdTextBox.Text) > 0)
                {
                    Pais.PaisId = Seguridad.ValidarEntero(PaisIdTextBox.Text);

                    if (Pais.Eliminar())
                    {
                        Mensajes.ShowToastr(this.Page, "Se Guardo", "Informacion", "Success");
                        Limpiar();
                    }
                    else
                    {
                        Mensajes.ShowToastr(this.Page, "No Se Elimino", "Error", "Error");
                    }
                }
                else
                {
                    Mensajes.ShowToastr(this.Page, "No hay Registro", "Error", "Error");
                    Limpiar();
                }
            }
            else
            {
                Mensajes.ShowToastr(this.Page, "Ingrese un Id valido primero", "Error", "Error");
            }
        }