private void Cmdghi_Clicked(object sender, EventArgs e)
        {
            database db = new database();
            Loaihoa  l  = new Loaihoa {
                Tenloai = txttenloai.Text
            };

            if (db.InsertLoaihoa(l) == true)
            {
                DisplayAlert("Thông Báo", "Thêm loại hoa thành công", "OK");
            }
            else
            {
                DisplayAlert("Thông Báo", "Thêm loại hoa Lỗi", "OK");
            }
        }
 public bool InsertLoaihoa(Loaihoa loai)
 {
     try
     {
         using (var connection = new
                                 SQLiteConnection(System.IO.Path.Combine(folder, "qlhoa.db")))
         {
             connection.Insert(loai);
             return(true);
         }
     }
     catch (SQLiteException ex)
     {
         //   Log.Info("SQLiteEx", ex.Message);
         return(false);
     }
 }