Ejemplo n.º 1
0
        void btnCreateDB_Click(object sender, EventArgs e)
        {
            DBRepository dbr    = new DBRepository();
            var          result = dbr.CreateDB();

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

            Toast.MakeText(this, result, ToastLength.Short).Show();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 6
0
        void cc(List <string[]> parseddata)
        {
            DBRepository dbr = new DBRepository();

            foreach (string[] row in parseddata)
            {
                dbr.InsertRecord(row);
            }
        }
Ejemplo n.º 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();
        }