use of com.kiminonawa.mydiary.db.DBManager in project MyDiary by erttyy8821.
the class ContactsDetailDialogFragment method addContacts.
private void addContacts() {
DBManager dbManager = new DBManager(getActivity());
dbManager.opeDB();
dbManager.insertContacts(EDT_contacts_detail_name.getText().toString(), EDT_contacts_detail_phone_number.getText().toString(), "", topicId);
dbManager.closeDB();
}
use of com.kiminonawa.mydiary.db.DBManager in project MyDiary by erttyy8821.
the class ContactsDetailDialogFragment method updateContacts.
private void updateContacts() {
DBManager dbManager = new DBManager(getActivity());
dbManager.opeDB();
dbManager.updateContacts(contactsId, EDT_contacts_detail_name.getText().toString(), EDT_contacts_detail_phone_number.getText().toString(), "");
dbManager.closeDB();
}
use of com.kiminonawa.mydiary.db.DBManager in project MyDiary by erttyy8821.
the class DiaryDeleteDialogFragment method deleteDiary.
private void deleteDiary() {
//Delete the db
DBManager dbManager = new DBManager(getActivity());
dbManager.opeDB();
dbManager.delDiary(diaryId);
dbManager.closeDB();
//Delete photo data
try {
deleteDirectory(new FileManager(getActivity(), topicId, diaryId).getDir());
} catch (IOException e) {
//just do nothing
e.printStackTrace();
}
}
Aggregations