Exemple #1
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            TableBDetail detail = new TableBDetail();

            detail.WriterID = DBHelper.getWriterId(cbWriter.Text);
            detail.BookID   = DBHelper.getBookId(cbBook.Text);
            db.TableBDetails.InsertOnSubmit(detail);

            try
            {
                db.SubmitChanges();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                db.TableBDetails.DeleteOnSubmit(detail);
            }

            loadData();
        }
Exemple #2
0
 private void detach_TableBDetails(TableBDetail entity)
 {
     this.SendPropertyChanging();
     entity.TableWriter = null;
 }
Exemple #3
0
 private void attach_TableBDetails(TableBDetail entity)
 {
     this.SendPropertyChanging();
     entity.TableBook = this;
 }
Exemple #4
0
 partial void DeleteTableBDetail(TableBDetail instance);
Exemple #5
0
 partial void UpdateTableBDetail(TableBDetail instance);
Exemple #6
0
 partial void InsertTableBDetail(TableBDetail instance);