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>
<entry key="app">
<State>
<targetSelectedWithDropDown>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\Hp\.android\avd\Pixel_3a_API_34.avd" />
<type value="SERIAL_NUMBER" />
<value value="DVR0219131001092" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-05-10T04:34:58.235157600Z" />
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-05-10T07:24:34.105307800Z" />
</State>
</entry>
</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.close()
}
fun getCursor() : Cursor?{
val db = writableDatabase
val cursor = db.rawQuery("SELECT * FROM $TABLE_NAME", null)
return cursor
fun crearTablaReceta(){
val db=writableDatabase
val creatTabla="CREATE TABLE $TABLE_NAME ($COLUMN_NOMBRE_PACIENTE VARCHAR(30), $COLUMN_EDAD_PACIENTE INT, $COLUMN_PESO_PACIENTE INT, $COLUMN_FECHA VARCHAR(30), " +
"$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)
dbPaciente = DoctorDataBaseHelper(this@RecetaActivity)
setContentView(view)
//db.crearTablaReceta()
cargarSpinnerPacientes()
binding.spNombrePaciente.onItemSelectedListener=this
binding.btnAgregarReceta.setOnClickListener {