Revision: 49676
Updated Code
at July 28, 2011 03:17 by indra
Updated Code
Me.DialogResult = Windows.Forms.DialogResult.None 'sample usage Try mybindingsource.EndEdit() en.SaveChanges() MessageBox.Show("Data successfully saved", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex As Exception If ex.InnerException.ToString.Contains("PRIMARY KEY") Then MessageBox.Show("Duplicate record", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.DialogResult = Windows.Forms.DialogResult.None End If End Try
Revision: 49675
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 28, 2011 03:03 by indra
Initial Code
Me.DialogResult = Windows.Forms.DialogResult.None 'sample usage Try mybindingsource.EndEdit() en.SaveChanges() MessageBox.Show("Data successfully saved", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex As Exception If ex.InnerException.ToString.Contains("PRIMARY KEY") Then MessageBox.Show("Duplicate record", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.DialogResult = Windows.Forms.DialogResult.None End If End Try
Initial URL
Initial Description
Initial Title
Cancel dialog result from closing form
Initial Tags
validation
Initial Language
VB.NET