1
I have a table named profit model:どのようにデータベース内の行を1つに制限できますか?
私は別の利益モデルを有効にしたいと考えており、テーブルのデータが更新されます。
今、私はUpdateAsyncを使用していますが、動作しません。どのようにすればいいですか?
async void Active_Clicked(object sender, System.EventArgs e)
{
var profitmodel = (sender as Button).CommandParameter as ProfitModel;
await conn.CreateTableAsync<ProfitModelInUsed>();
//System.Diagnostics.Debug.WriteLine(product.ProductName);
var profitmodelInUsed = new ProfitModelInUsed
{
ProfitModel_ID = profitmodel.ProfitModel_ID,
ProfitModel_Name = profitmodel.ProfitModel_Name,
ExchangeRate = profitmodel.ExchangeRate,
Profit = profitmodel.Profit
};
await conn.UpdateAsync(profitmodelInUsed);
await DisplayAlert("This ProfitModel is Applied", profitmodelInUsed.ProfitModel_Name, "OK");
}
この表には複数の行がありません。
感謝Bro !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!あなたの助言は役に立つ!!!!!!!!!! –