示例#1
0
        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);
        }
示例#2
0
 partial void Deletehistory(history instance);
示例#3
0
 partial void Updatehistory(history instance);
示例#4
0
 partial void Inserthistory(history instance);
示例#5
0
 private void detach_histories(history entity)
 {
     this.SendPropertyChanging();
     entity.User = null;
 }
示例#6
0
 private void attach_histories(history entity)
 {
     this.SendPropertyChanging();
     entity.User = this;
 }