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"); } }
private void Themhoaclick(object sender, EventArgs e) { database db = new database(); Hoa h = new Hoa { Tenhoa = txttenhoa.Text, Image = txthinh.Text, Ghichu = txtmota.Text, }; if (db.InsertHoa(h) == true) { DisplayAlert("Notify", "Success", "Ok"); } else { DisplayAlert("Notify", "False", "Ok"); } }