void btnCreateDB_Click(object sender, EventArgs e) { DBRepository dbr = new DBRepository(); var result = dbr.CreateDB(); Toast.MakeText(this, result, ToastLength.Short).Show(); }
void btnGetAll_Click(object sender, EventArgs e) { DBRepository dbr = new DBRepository(); var result = dbr.GetAllRecords(); Toast.MakeText(this, result, ToastLength.Short).Show(); }
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(); }
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(); }
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)); }
void cc(List <string[]> parseddata) { DBRepository dbr = new DBRepository(); foreach (string[] row in parseddata) { dbr.InsertRecord(row); } }
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(); }