Search in sources :

Example 11 with DBManager

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();
}
Also used : DBManager(com.kiminonawa.mydiary.db.DBManager)

Example 12 with DBManager

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();
}
Also used : DBManager(com.kiminonawa.mydiary.db.DBManager)

Example 13 with DBManager

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();
    }
}
Also used : DBManager(com.kiminonawa.mydiary.db.DBManager) IOException(java.io.IOException) FileManager(com.kiminonawa.mydiary.shared.FileManager)

Aggregations

DBManager (com.kiminonawa.mydiary.db.DBManager)13 Cursor (android.database.Cursor)3 FileManager (com.kiminonawa.mydiary.shared.FileManager)2 IOException (java.io.IOException)2 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 EntriesEntity (com.kiminonawa.mydiary.entries.entries.EntriesEntity)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1