diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index be5d478..b9a0973 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -12,6 +12,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.MedicalHealth"
tools:targetApi="31">
+
diff --git a/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt b/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt
index ba1d83f..60ce44a 100644
--- a/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt
+++ b/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt
@@ -37,6 +37,10 @@ class MainActivity : AppCompatActivity() {
val intent = Intent(this@MainActivity, ConsultarPacientesActivity::class.java)
startActivity(intent)
}
+ binding.tvRegistrarme.setOnClickListener{
+ val intent = Intent(this@MainActivity, RegistrarDActivity::class.java)
+ startActivity(intent)
+ }
}
@SuppressLint("SuspiciousIndentation")
private fun cargarDatos(){
diff --git a/app/src/main/java/com/terratenientes/medicalhealth/RegistrarDActivity.kt b/app/src/main/java/com/terratenientes/medicalhealth/RegistrarDActivity.kt
new file mode 100644
index 0000000..2e0c2e0
--- /dev/null
+++ b/app/src/main/java/com/terratenientes/medicalhealth/RegistrarDActivity.kt
@@ -0,0 +1,35 @@
+package com.terratenientes.medicalhealth
+
+import android.os.Bundle
+import android.widget.Toast
+import androidx.activity.enableEdgeToEdge
+import androidx.appcompat.app.AppCompatActivity
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+import com.terratenientes.medicalhealth.databinding.ActivityRegistrarDactivityBinding
+
+class RegistrarDActivity : AppCompatActivity() {
+ private lateinit var binding : ActivityRegistrarDactivityBinding
+ private lateinit var db : DoctorDataBaseHelper
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityRegistrarDactivityBinding.inflate(layoutInflater)
+ val view = binding.root
+ setContentView(view)
+ db= DoctorDataBaseHelper(this@RegistrarDActivity)
+ binding.btnRegistrar.setOnClickListener {
+ registrarUsuario()
+ }
+ }
+ private fun registrarUsuario(){
+ val cedula=binding.etCedelaRegistro.text.toString()
+ val nombre=binding.etNombreRegistro.text.toString()
+ val apellido=binding.etApellidoRegistro.text.toString()
+ val telefono=binding.etTelefonoRegisto.text.toString()
+ val domicilio = binding.etDomicilio.text.toString()
+ val contrasena= binding.etContrasenaRegistro.text.toString()
+ val usuario=Doctor(cedula,nombre,apellido,telefono,domicilio.toInt())
+ db.agregarDoctores(usuario,contrasena)
+ Toast.makeText(this@RegistrarDActivity,"USUARIO AGREGADO",Toast.LENGTH_LONG).show()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_registrar_dactivity.xml b/app/src/main/res/layout/activity_registrar_dactivity.xml
new file mode 100644
index 0000000..346913b
--- /dev/null
+++ b/app/src/main/res/layout/activity_registrar_dactivity.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 589a010..4120d57 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -24,5 +24,14 @@
Pacientes
+
+ Registrar
+ Nombre
+ Apellido
+ Cédula Profesional
+ Telefono
+ Consultorio
+ Contraseña
+ Registrar
\ No newline at end of file