/// <summary> /// load the form and the data that are useful for the good use of the form (video game's types) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmVideoGame_Load(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.FixedSingle; //We assume that the videogame release will not be announced before two years. dtpDateOutput.MaxDate = DateTime.Today.AddYears(2); //We assume no video game existed before 01.01.1950 dtpDateOutput.MinDate = DateTime.Parse("01.01.1950"); try { connection = new ConnectionBD(); List <string> lstTypeVG = connection.GetTypeVG(); foreach (string typeVG in lstTypeVG) { cboTypeVG.Items.Add(typeVG); } } catch (Exception vgex) { MessageBox.Show(vgex.Message); } cmdDeletePlatform.Enabled = false; cmdDeleteDev.Enabled = false; cmdDeleteEditor.Enabled = false; }
/// <summary> /// load the form and the data that are useful for the good use of the form (video game's types) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmVideoGame_Load(object sender, EventArgs e) { connection = new ConnectionBD(); try { List <string> lstTypeVG = connection.GetTypeVG(); foreach (string typeVG in lstTypeVG) { cboTypeVG.Items.Add(typeVG); } } catch (VgSQLException vgex) { MessageBox.Show(vgex.Message); } cmdDeletePlatform.Enabled = false; cmdDeleteDev.Enabled = false; cmdDeleteEditor.Enabled = false; }