Пример #1
0
 private void ModBttn_Click(object sender, EventArgs e)
 {
     try
     {
         InitValues();
     }
     catch (Exception exc)
     {
         MessageBox.Show("Registration of member has failed. Please check your inputs and try again.\n\nError Code: " + exc.Message);
         return;
     }
     SqlCommand command = new Member(this).UpdateIntoSQL();
     command.Connection = con;
     Console.WriteLine(con.ConnectionString);
     con.Open();
     try
     {
         Console.WriteLine(command.ExecuteNonQuery());
     }
     catch(Exception exc)
     {
         MessageBox.Show("It broke.\n\nMessage:" + exc.Message);
         return;
     }
     con.Close();
     MessageBox.Show("Update Successful.");
     parent.PullData();
     Close();
 }