public Assignment()
 {
     try
     {
         DBConnectionClass obj = new DBConnectionClass();
         sqlCon = obj.GetConnection();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error connecting" + ex, "Login", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
     InitializeComponent();
 }
Esempio n. 2
0
 public Register()
 {
     try
     {
         DBConnectionClass obj = new DBConnectionClass();
         sqlCon = obj.GetConnection();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error connecting" + ex, "Customer Form", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
     InitializeComponent();
 }