private void AddHistory() { history crtHistory = new history(); DateTime crtDate = DateTime.Now; crtHistory.currency_name = this.SelectedCoin; crtHistory.price = this.currentPrice; crtHistory.search_date = crtDate; User userByUsername = CryptoLinq.Users.First(u => u.username.Equals(Username)); crtHistory.user_id = userByUsername.Id; CryptoLinq.histories.InsertOnSubmit(crtHistory); CryptoLinq.SubmitChanges(); this.HistoryGrid.Items.Add(crtHistory); }
partial void Deletehistory(history instance);
partial void Updatehistory(history instance);
partial void Inserthistory(history instance);
private void detach_histories(history entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_histories(history entity) { this.SendPropertyChanging(); entity.User = this; }