Esempio n. 1
0
        private void tenloaiclick(object sender, EventArgs e)
        {
            database db = new database();
            LoaiHoa  l  = new LoaiHoa {
                Tenloai = txttenloai.Text
            };

            if (db.Insertloai(l) == true)
            {
                DisplayAlert("Notify", "Success", "Ok");
            }
            else
            {
                DisplayAlert("Notify", "False", "Ok");
            }
        }
Esempio n. 2
0
 public bool Insertloai(LoaiHoa loai)
 {
     try
     {
         using (var connection = new
                                 SQLiteConnection(System.IO.Path.Combine(folder, "hoa.db")))
         {
             connection.Insert(loai);
             return(true);
         }
     }
     catch (SQLiteException ex)
     {
         return(false);
     }
 }
Esempio n. 3
0
 public void dshoaclick (object sender,SelectedItemChangedEventArgs e)
 {
     LoaiHoa lh = (LoaiHoa)e.SelectedItem;
     Navigation.PushAsync(new DSHoa(lh.Maloai));
 }