private void BtnClean_Click(object sender, EventArgs e) { using (var db = new AndroidDb(dbPath)) { int count = db.DeleteAll <StockModel>(); int detail = db.DeleteAll <DetailModel>(); var stock = db.Stock.ToList(); this.dataGridView1.DataSource = stock; } }
private void BtnDel_Click(object sender, EventArgs e) { using (var db = new AndroidDb(dbPath)) { int count = db.DeleteAll <GoodsModel>(); var goods = db.Goods.ToList(); //var goods = db.Query<GoodsModel>("select code, name, barcode, unit, content, price from GoodsModel"); this.dataGridView1.DataSource = goods; } }