|
- using BPASmartClient.MorkCL.Model.DB;
- using BPASmartClient.MorkCL.Server;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.MorkCL.ViewModel
- {
- public class testViewModel : NotifyBase
- {
- public testViewModel()
- {
- testCommand = new BPARelayCommand(() =>
- {
- SqliteHelper.GetInstance.Init();
-
- for (int i = 0; i < 10; i++)
- {
- SqliteHelper.GetInstance.AddAccessories(new Model.DB.AccessoriesTB()
- {
- Description = "AccessoriesTB",
- Loc = 1,
- Name = $"AccessoriesTB{i}"
- });
-
- SqliteHelper.GetInstance.AddIngredients(new Model.DB.IngredientsTB()
- {
- Description = "IngredientsTB",
- Loc = 1,
- Name = $"IngredientsTB{i}"
- });
-
- SqliteHelper.GetInstance.AddSeasoning(new Model.DB.SeasoningTB()
- {
- Description = "SeasoningTB",
- Loc = 1,
- Name = $"SeasoningTB{i}"
- });
- }
-
- var Accessories = SqliteHelper.GetInstance.GetAccessories();
- var Ingredients = SqliteHelper.GetInstance.GetIngredients();
- var Seasoning = SqliteHelper.GetInstance.GetSeasoning();
-
- Accessories?.ForEach(x =>
- {
- SqliteHelper.GetInstance.EditAccessories(new Model.DB.AccessoriesTB()
- {
- Description = "AccessoriesTB1111",
- Loc = x.Loc,
- Name = x.Name,
- Id = x.Id
- });
- });
-
- Ingredients?.ForEach(x =>
- {
- SqliteHelper.GetInstance.EditIngredients(new Model.DB.IngredientsTB()
- {
- Description = "IngredientsTB1111",
- Loc = x.Loc,
- Name = x.Name,
- Id = x.Id
- });
- });
-
- Seasoning?.ForEach(x =>
- {
- SqliteHelper.GetInstance.EditSeasoning(new Model.DB.SeasoningTB()
- {
- Description = "SeasoningTB1111",
- Loc = x.Loc,
- Name = x.Name,
- Id = x.Id
- });
- });
-
- var Accessories1 = SqliteHelper.GetInstance.GetAccessories();
- var Ingredients1 = SqliteHelper.GetInstance.GetIngredients();
- var Seasoning1 = SqliteHelper.GetInstance.GetSeasoning();
-
-
- });
- }
-
- public BPARelayCommand testCommand { get; set; }
- }
- }
|