Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext dc          = new DataClasses1DataContext(connection);
            BankProduct             bankProduct = new BankProduct();

            bankProduct.Name = textBox5.Text;

            dc.BankProducts.InsertOnSubmit(bankProduct);
            dc.SubmitChanges();
        }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext dc = new DataClasses1DataContext(connection);


            BankProduct bankProduct = dc.BankProducts.FirstOrDefault(bp => bp.Name.Equals(listBox2.SelectedValue));

            dc.BankProducts.DeleteOnSubmit(bankProduct);

            dc.SubmitChanges();
        }
Exemple #3
0
 partial void DeleteBankProduct(BankProduct instance);
Exemple #4
0
 partial void UpdateBankProduct(BankProduct instance);
Exemple #5
0
 partial void InsertBankProduct(BankProduct instance);
Exemple #6
0
 private void detach_BankProducts(BankProduct entity)
 {
     this.SendPropertyChanging();
     entity.Account = null;
 }