Skkn ứng dụng hệ thống tài khoản kế toán trên điện thoại di động

13 415 0
Skkn ứng dụng hệ thống tài khoản kế toán trên điện thoại di động

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

TRƯỜNG CĐ KT-KT KIÊN GIANG KHOA CÔNG NGHỆ THÔNG TIN CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM ĐỘC LẬP - TỰ DO - HẠNH PHÚC GIẢI PHÁP ỨNG DỤNG HỆ THỐNG TÀI KHOẢN KẾ TOÁN TRÊN ĐIỆN THOẠI DI ĐỘNG I Báo cáo tóm tắt nội dung sáng kiến Tên đề tài: Ứng dụng hệ thống tài khoản kế toán điện thoại di động Ứng dụng giải pháp hoàn toàn mới, viết đưa lên “google play” giúp sinh viên tra cứu thông tin tài khoản kế toán thuận tiện nhanh chóng xác theo Thông tư số 200/2014/TT-BTC ngày 22 tháng 12 năm 2014, Bộ Tài Chính ký ban hành chế độ kế toán doanh nghiệp Sáng kiến áp dụng vài phận đơn vị II Nội dung 2.1 Dẫn nhập Sinh viên học có áp dụng vào công việc mà sinh viên làm trường ? Trong trình dạy nghiên cứu nâng cao trình độ khai thác kiến thức tiếp cận công nghệ phục vụ cho việc giảng dạy thực tế với môi trường làm việc sau sinh viên trường điều phổ biến sống hàng ngày ứng dụng hệ điều hành thiết bị điện thoại mà sử dụng hàng ngày Khai thác sử dụng đòi hỏi phải có phương pháp Trong việc viết ứng dụng hệ thống tài khoản kế toán cài đặt điện thoại di động điều cần thiết sinh viên chuyên ngành giúp it cho sinh viên kinh tế Xuất phát từ nhu cầu thực tế nghiên cứu viết phần mềm “ứng dụng tài khoản kế toán điện thoại di động” 2.2 Những khó khăn Hiện việc ứng dụng công nghệ vấn đề khó sinh viên Bên cạnh giáo viên lơ công việc nghiên cứu công nghệ mới, thực tế để áp dụng giảng dạy cho sinh viên nên dẫn đến sinh viên khó tiếp cận công việc kiến thức hữu trường 2.3 Giải pháp khắc phục khó khăn a Mục tiêu chương trình: Tạo đưa lên “google play” chương trình danh mục hệ thống tài khoản kế toán doanh nghiệp ban hành theo thông tư 200 - cập nhật áp dụng cho năm 2015, áp dụng doanh nghiệp thuộc lĩnh vực, thành phần kinh tế Các doanh nghiệp vừa nhỏ thực kế toán theo chế độ kế toán áp dụng cho doanh nghiệp vừa nhỏ vận dụng quy định Thông tư Trang b Các giải pháp giúp sinh viên tra cứu thông tin tài khoản kế toán thuận tiện nhanh chóng xác: Trang chủ Tra cứu thông tin tài sản Tra cứu thông tin tài nợ phải trả Tra cứu thông tin vốn chủ sở hữu Trang Tra cứu thông tin doanh thu Tra cứu thông tin chi phí sản xuất kinh doanh Tra cứu thông tin thu nhập khác Tra cứu thông tin chi phí khác Trang Tra cứu thông tin xác định kết kinh doanh c Cài đặt ứng dụng Bước 1: Trang Bước 2: d Một số Code chương trình Class: activity_main.xml Class: Database package model; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import controller.*; Trang import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class Database extends SQLiteOpenHelper { private static String DB_PATH "/data/data/nguyenquankhanh.hethongtaikhoanketoan/databases/"; private static String DB_NAME = "hethongtaikhoanketoan.sqlite"; private static final int DB_VERSION = 1; = private SQLiteDatabase sqliteDatabase; private final Context context; public Database(Context context) { super(context, DB_NAME, null, DB_VERSION); this.context = context; } public void openDatabase() throws SQLException { String Path = DB_PATH + DB_NAME; sqliteDatabase = SQLiteDatabase.openDatabase(Path, null, SQLiteDatabase.OPEN_READONLY); } public synchronized void closeDatabase() { if (sqliteDatabase != null) sqliteDatabase.close(); super.close(); } private boolean checkDatabase() { SQLiteDatabase checkDB = null; try { String Path = DB_PATH + DB_NAME; checkDB = SQLiteDatabase.openDatabase(Path, null, SQLiteDatabase.OPEN_READONLY); } catch (SQLException e) { } if (checkDB != null) checkDB.close(); return checkDB != null ? true : false; } private void copyDatabase() throws IOException { // doc database InputStream input = this.context.getAssets().open(DB_NAME); Trang String outFileName = DB_PATH + DB_NAME;// // ghi database OutputStream output = new FileOutputStream(outFileName); byte[] buffer = new byte[1024]; int length; while ((length = input.read(buffer)) > 0) { output.write(buffer, 0, length); } output.flush(); output.close(); input.close(); } public void createDatabase() throws IOException { boolean dbExist = checkDatabase(); if (dbExist) { } else { this.getReadableDatabase(); try { copyDatabase(); } catch (IOException e) { throw new Error("Error copy database"); } } } // lay danh sach loai public ArrayList dsLoai() { ArrayList ds = new ArrayList(); SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery("select * from loai", null); if (cursor.moveToFirst()) { { Loai l = new Loai(); l.setMaLoai(Integer.parseInt(cursor.getString(0))); l.setTenLoai(cursor.getString(1)); ds.add(l); } while (cursor.moveToNext()); } cursor.close(); db.close(); return ds; } // lay danh sach tai khoan theo ma tra ve loai public Loai dsTaiKhoan(int ma) { SQLiteDatabase db = this.getReadableDatabase(); Loai loaiTK = new Loai(); //troi oi luu y can thay cau lenh query!!! Cursor cursor = db.rawQuery( Trang "select l.*,tk.* from loai as l join taikhoan as tk on l.maloai = tk.loai" + " where l.maloai = " + ma + " order by tk.stt;", null); if (cursor.moveToFirst()) { int m = 0; { int maLoai = Integer.parseInt(cursor.getString(0)); String tenLoai = cursor.getString(1); int stt = Integer.parseInt(cursor.getString(2)); int soHieu = Integer.parseInt(cursor.getString(3)); String tenTaiKhoan = cursor.getString(4); int cap = Integer.parseInt(cursor.getString(5)); int loai = Integer.parseInt(cursor.getString(6)); // chi khoi tao lan doi tuong loai if (maLoai != m) { loaiTK = new Loai(maLoai, tenLoai); m = maLoai; } // add tai khoan vao loai luu tru arraylist if (soHieu != 0) { TaiKhoan tk = new TaiKhoan(stt, soHieu, tenTaiKhoan, cap, loai); loaiTK.getDsTaiKhoan().add(tk); } } while (cursor.moveToNext()); } cursor.close(); db.close(); return loaiTK; } // lay danh sach tai khoan theo ma tra ve arraylist tai khoan public ArrayList dsTaiKhoan1(int ma) { ArrayList ds = new ArrayList(); SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery( "select l.*,tk.* from loai as l join taikhoan as tk on l.maloai = tk.loai" + "where l.maloai = " + ma + "order by tk.stt;", null); if (cursor.moveToFirst()) { { int stt = Integer.parseInt(cursor.getString(2)); int soHieu = Integer.parseInt(cursor.getString(3)); String tenTaiKhoan = cursor.getString(4); int cap = Integer.parseInt(cursor.getString(5)); int loai = Integer.parseInt(cursor.getString(6)); TaiKhoan tk = new TaiKhoan(stt, soHieu, tenTaiKhoan, cap, loai); ds.add(tk); } while (cursor.moveToNext()); } cursor.close(); Trang db.close(); return ds; } @Override public void onCreate(SQLiteDatabase db) { // TODO Auto-generated method stub } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // TODO Auto-generated method stub } } Class: MainActivity.java package controller; import java.io.IOException; import java.util.ArrayList; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdView; import model.*; import nguyenquankhanh.hethongtaikhoanketoan.R; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.AdapterView.OnItemClickListener; public class MainActivity extends Activity { AdView adView; ListView lvLoai; ArrayAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Trang 10 setContentView(R.layout.activity_main); adView = (AdView) findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder().build(); adView.loadAd(adRequest); Database dao = new Database(this); try { dao.createDatabase(); } catch (IOException e) { e.printStackTrace(); } // lay database ArrayList dsLoai = dao.dsLoai(); lvLoai = (ListView) findViewById(R.id.listViewLoai); // chi lay ten loai add vao arraylist string ArrayList dsTenLoai = new ArrayList(); for (Loai loai : dsLoai) if (!dsTenLoai.contains(loai)) dsTenLoai.add(loai.getTenLoai()); // su dung listview co san (simple_list_item_1) de hien thi adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, dsTenLoai); lvLoai.setAdapter(adapter); // xu ly click len tung loai tai khoan lvLoai.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { int itemPosition = position; View viewItem = lvLoai.getChildAt(itemPosition); TextView textView = (TextView) viewItem; String itemValue = (String) textView.getText(); Intent myIntent = new Intent(MainActivity.this, TaiKhoanActivity.class); // hang dau tien = int mLoai = (itemPosition + 1); if (mLoai == 9) { alert(); } else { myIntent.putExtra("maLoai", String.valueOf(mLoai)); myIntent.putExtra("tenLoai", itemValue); Trang 11 startActivity(myIntent); } } }); } public AlertDialog.Builder alert() { AlertDialog.Builder aDialog = new AlertDialog.Builder(this); aDialog.setTitle("NAUKE"); aDialog.setMessage("nguyennauke@gmail.com"); aDialog.setPositiveButton("Trở Về", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); aDialog.create().show(); return aDialog; } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } } Trang 12 2.4 Kết thực Sau cài đặt xong có giao diện tương tác làm việc nêu điện thoại 2.5 Kết luận Trên sáng kiến dễ áp dụng Với lòng yêu nghề xem việc giáo dục sinh viên mối quan tâm hàng đầu, nghĩ sáng kiến giúp cho phần tìm giải pháp hợp lý tiếp cận với việc ứng dụng hệ thống tài khoản kế toán điện thoại di động Tôi không khẳng định với phương pháp nêu hoàn toàn hay hợp lý Nhưng với phương pháp này, thân nhận thấy giải pháp nêu thực mang lại nhiều lợi ích cho sinh viên Đây ý tưởng mới, áp dụng thuận lợi hiệu Điều tùy thuộc vào cách áp dụng khả người Qua đây, mong nhận nhiều ý kiến đóng góp, ý tưởng từ đồng nghiệp, từ hội đồng khoa học để tiếp tục hoàn thiện Xin chân thành cảm ơn Trang 13 ... đầu, nghĩ sáng kiến giúp cho phần tìm giải pháp hợp lý tiếp cận với việc ứng dụng hệ thống tài khoản kế toán điện thoại di động Tôi không khẳng định với phương pháp nêu hoàn toàn hay hợp lý Nhưng... super.onOptionsItemSelected(item); } } Trang 12 2.4 Kết thực Sau cài đặt xong có giao di n tương tác làm việc nêu điện thoại 2.5 Kết luận Trên sáng kiến dễ áp dụng Với lòng yêu nghề xem việc giáo dục sinh... }); } public AlertDialog.Builder alert() { AlertDialog.Builder aDialog = new AlertDialog.Builder(this); aDialog.setTitle("NAUKE"); aDialog.setMessage("nguyennauke@gmail.com"); aDialog.setPositiveButton("Trở

Ngày đăng: 22/04/2017, 22:12

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan