예제 #1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         db.SubmitChanges();
     }
     catch (Exception)
     {
         MessageBox.Show("Co van de");
     }
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         db.SubmitChanges();
         this.DialogResult = DialogResult.OK;
     }
     catch (Exception)
     {
         MessageBox.Show("Co loi!");
     }
 }