예제 #1
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            TableWriter writer = new TableWriter();

            writer.WriterName = tbName.Text.Trim();
            db.TableWriters.InsertOnSubmit(writer);

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

            loadData();
        }
예제 #2
0
 partial void UpdateTableWriter(TableWriter instance);
예제 #3
0
 partial void DeleteTableWriter(TableWriter instance);
예제 #4
0
 partial void InsertTableWriter(TableWriter instance);