Professional Documents
Culture Documents
New Text Document
New Text Document
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace CarShowRoom
{
public partial class regCar : Form
{
public regCar()
{
InitializeComponent();
}
if (txtId.Text == "")
{
MessageBox.Show("This Field Cann't be Empty");
return;
}
try
{
con.Open();
}
catch (Exception ex)
{
MessageBox.Show("error while inseting your data" + ex.ToString());
}
finally
{
con.Close();
}
}
}
}