Jay Vashi had always heard rumors of the Yuri, the Mad Ukrainian. During his tenure, Yuri wielded enough power to make big architectural decisions on their projects. Some might say that, in retrospect, this was not the wisest of decisions, as Yuri had the habit of re-implementing framework functionality; array sizing was one of his favorites to do, redo, and redo again. He also had some fairly unique design habits, such as today's example of checking a constant variable in the code against a version listed in the database. It happens to be one of the few pieces of source code that Yuri had not deleted when he left the company ...
try //try to connect to Sequel Server { if(!service.ConnectToSQL(LoginInfo.GetConnectingStringArrayToSQL())) { Close(); return; } } catch(ArgumentOutOfRangeException) { MessageBox.Show( "New version of the TPS Manager program is required.\n" + "Please contact the administrator of TPS Manager and ask for the updated version."); if(Environment.UserName == "yuri") { if(MessageBox.Show( "Would you like to update the SQL server with the current version?" ,"Update",MessageBoxButtons.YesNo) == DialogResult.Yes) { service.SetProgramVersionOnSQL(); } } Close(); return; } catch(Exception ex1) //connection to SQL server failed { MessageBox.Show(ex1.Message); Close(); return; }