public TaskIconViewModel() { settingsLogic = new SettingsLogic(); historyLogic = new HistoryLogic(); wordLogic = new WordLogic(); InitLearner(); InitDynamic(); LoadCommands(); }
public void changeItemDeletedById(int id, bool deleted) { var item = connection.Item.Where(x => x.id_item == id).FirstOrDefault(); Item itemOld = (Item)item.Clone(); item.deleted = deleted; item.modify_date = DateTime.Now; connection.SubmitChanges(); var hisotry = new HistoryLogic(); hisotry.addItem(item, itemOld); hisotry.save(); }
public string GetHistory(string identifier) { var obj = new HistoryLogic(_context); var header = obj.SelectSchemaHeaderSync(); var data = obj.SelectSpecificdata(identifier); Task.WaitAll(data); var result = new TableFormatter { Header = header, Body = data.Result }; return(Tools.ConvertToJSON(result)); }
public UsersController(SupplyChainContext context, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, RoleManager <ApplicationRole> roleManager, ILogger <UsersController> logger) : base(context) { _userManager = userManager; _signInManager = signInManager; _rolesManager = roleManager; _logger = logger; _setting = new SettingLogic(context); _history = new HistoryLogic(context); }
private void LoadLogic() { settingsLogic = new SettingsLogic(); wordLogic = new WordLogic(); WordList = wordLogic.WordList; historyLogic = new HistoryLogic(); history = historyLogic.LoadHistory<string>(); Word word; if (history.Count > 0) word = wordLogic.Search(history.Current); else word = wordLogic.Search(WordList.FirstOrDefault()); if (word != null) ShowDefinition(word); NotifyHistoryChange(); }