public PageDShoaloai() { InitializeComponent(); db = new database(); dsh = db.selecthoa(); lstdshoaloai.ItemsSource = dsh; }
public PageThemHoa() { InitializeComponent(); db = new database(); dsl = db.selectLoaihoa(); txtmaloai.ItemsSource = dsl; }
public App() { InitializeComponent(); database db = new database(); db.createDatabase(); MainPage = new NavigationPage(new MainPage()); }
public PageDSloaihoa() { InitializeComponent(); db = new database(); dsl = db.selectLoaihoa(); lstdsloai.ItemsSource = dsl; }
private void Cmdxoahoa_Clicked(object sender, EventArgs e) { database db = new database(); Hoa l = new Hoa { Maloai = txtmaloai.AutomationId, Mahoa = txttenhoa.Text, Tenhoa = txttenhoa.Text, Hinh = txthinh.Text, Gia = txtgiaban.Text, Mota = txtmota.Text }; if (db.DELETE(l) == true) { DisplayAlert("Thông Báo", "Xóa hoa thành công", "OK"); } else { DisplayAlert("Thông Báo", "Xóa hoa Lỗi", "OK"); } }
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"); } }