protected void GuardarButton_Click(object sender, EventArgs e) { if (TipoUsuarioIdTextBox.Text.Length > 0) { if (LLenarDatos()) { TipoUsuario.TipoUsuarioId = Seguridad.ValidarEntero(TipoUsuarioIdTextBox.Text); if (TipoUsuario.Editar()) { Mensajes.ShowToastr(this.Page, "Se Modifico", "Informacion", "Success"); Limpiar(); } else { Mensajes.ShowToastr(this.Page, "No Se Modifico", "Error", "Error"); } } else { Mensajes.ShowToastr(this.Page, "Faltan Datos", "Error", "Error"); } } else { if (LLenarDatos()) { if (TipoUsuario.Insertar()) { Mensajes.ShowToastr(this.Page, "Se Registro", "Felicidades", "Success"); Limpiar(); } else { Mensajes.ShowToastr(this.Page, "No se pudo Registrar", "Error", "Error"); } } else { Mensajes.ShowToastr(this.Page, "Faltan Datos", "Error", "Error"); } } }