Descargar PDF en prueba3.0

This commit is contained in:
sebastiancc27 2024-05-10 01:39:16 -06:00
parent cbe7bc5caa
commit 60134f3c66
3 changed files with 12 additions and 10 deletions

View File

@ -4,18 +4,18 @@
<value> <value>
<entry key="app"> <entry key="app">
<State> <State>
<targetSelectedWithDropDown> <runningDeviceTargetSelectedWithDropDown>
<Target> <Target>
<type value="QUICK_BOOT_TARGET" /> <type value="RUNNING_DEVICE_TARGET" />
<deviceKey> <deviceKey>
<Key> <Key>
<type value="VIRTUAL_DEVICE_PATH" /> <type value="SERIAL_NUMBER" />
<value value="C:\Users\Hp\.android\avd\Pixel_3a_API_34.avd" /> <value value="DVR0219131001092" />
</Key> </Key>
</deviceKey> </deviceKey>
</Target> </Target>
</targetSelectedWithDropDown> </runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-05-10T04:34:58.235157600Z" /> <timeTargetWasSelectedWithDropDown value="2024-05-10T07:24:34.105307800Z" />
</State> </State>
</entry> </entry>
</value> </value>

View File

@ -97,9 +97,10 @@ class RecetaDataBaseHelper(context: Context) : SQLiteOpenHelper(context, DATABAE
db.delete(TABLE_NAME, "$COLUMN_NOMBRE_PACIENTE = ? AND $COLUMN_FECHA = ?", arrayOf(receta.NombrePaciente, receta.fecha)) db.delete(TABLE_NAME, "$COLUMN_NOMBRE_PACIENTE = ? AND $COLUMN_FECHA = ?", arrayOf(receta.NombrePaciente, receta.fecha))
db.close() db.close()
} }
fun getCursor() : Cursor?{ fun crearTablaReceta(){
val db=writableDatabase val db=writableDatabase
val cursor = db.rawQuery("SELECT * FROM $TABLE_NAME", null) val creatTabla="CREATE TABLE $TABLE_NAME ($COLUMN_NOMBRE_PACIENTE VARCHAR(30), $COLUMN_EDAD_PACIENTE INT, $COLUMN_PESO_PACIENTE INT, $COLUMN_FECHA VARCHAR(30), " +
return cursor "$COLUMN_MEDICAMENTO VARCHAR(30), $DURACION_MEDICAMENTO VARCHAR(20), $COLUMN_DOSIS_PACIENTE VARCHAR(30))"
db?.execSQL(creatTabla)
} }
} }

View File

@ -27,6 +27,7 @@ class RecetaActivity : AppCompatActivity(), OnItemSelectedListener {
db= RecetaDataBaseHelper(this@RecetaActivity) db= RecetaDataBaseHelper(this@RecetaActivity)
dbPaciente = DoctorDataBaseHelper(this@RecetaActivity) dbPaciente = DoctorDataBaseHelper(this@RecetaActivity)
setContentView(view) setContentView(view)
//db.crearTablaReceta()
cargarSpinnerPacientes() cargarSpinnerPacientes()
binding.spNombrePaciente.onItemSelectedListener=this binding.spNombrePaciente.onItemSelectedListener=this
binding.btnAgregarReceta.setOnClickListener { binding.btnAgregarReceta.setOnClickListener {