示例#1
0
        void btnCreateDB_Click(object sender, EventArgs e)
        {
            DBRepository dbr    = new DBRepository();
            var          result = dbr.CreateDB();

            Toast.MakeText(this, result, ToastLength.Short).Show();
        }
示例#2
0
        void btnGetAll_Click(object sender, EventArgs e)
        {
            DBRepository dbr    = new DBRepository();
            var          result = dbr.GetAllRecords();

            Toast.MakeText(this, result, ToastLength.Short).Show();
        }
示例#3
0
        void btnSearch_Click(object sender, EventArgs e)
        {
            DBRepository dbr   = new DBRepository();
            EditText     txtId = FindViewById <EditText>(Resource.Id.txtTaskId);
            string       task  = dbr.GetTaskById(int.Parse(txtId.Text));

            Toast.MakeText(this, task, ToastLength.Short).Show();
        }
示例#4
0
        void btnRemove_Click(object sender, EventArgs e)
        {
            DBRepository dbr       = new DBRepository();
            EditText     txtTaskId = FindViewById <EditText>(Resource.Id.txtTaskID);
            string       result    = dbr.RemoveTask(int.Parse(txtTaskId.Text));

            Toast.MakeText(this, result, ToastLength.Short).Show();
        }
示例#5
0
        void btnSearch_Click(object sender, EventArgs e)
        {
            DBRepository dbr     = new DBRepository();
            EditText     txtId   = FindViewById <EditText>(Resource.Id.txtTaskId);
            EditText     txtTask = FindViewById <EditText>(Resource.Id.txtTask);

            txtTask.Text = dbr.GetTaskById(int.Parse(txtId.Text));
        }
示例#6
0
        void cc(List <string[]> parseddata)
        {
            DBRepository dbr = new DBRepository();

            foreach (string[] row in parseddata)
            {
                dbr.InsertRecord(row);
            }
        }
示例#7
0
        void btnUpdate_Click(object sender, EventArgs e)
        {
            EditText     txtId   = FindViewById <EditText>(Resource.Id.txtTaskId);
            EditText     txtTask = FindViewById <EditText>(Resource.Id.txtTask);
            DBRepository dbr     = new DBRepository();
            string       result  = dbr.updateRecord(int.Parse(txtId.Text), txtTask.Text);

            Toast.MakeText(this, result, ToastLength.Short).Show();
        }