public ItemsInformationcs() { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedDialog; MaximizeBox = false; StartPosition = FormStartPosition.CenterScreen; try { SQLItemsControl = new SQLDataControl(); } catch (MySqlException) { MessageBox.Show("Database connection problem"); } foreach (string productitem in SQLItemsControl.GetBuyProducts()) { cbProducts.Items.Add(productitem).ToString(); } foreach (string productitem in SQLItemsControl.GetLoanProducts()) { cbLoanProducts.Items.Add(productitem).ToString(); } ItemTimer.Start(); }
public Form1() { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedDialog; // Set the MaximizeBox to false to remove the maximize box. MaximizeBox = false; // Set the MinimizeBox to false to remove the minimize box. //MinimizeBox = false; // Set the start position of the form to the center of the screen. StartPosition = FormStartPosition.CenterScreen; try { sqlControl = new SQLDataControl(); MessageBox.Show("Connection successful"); } catch (MySqlException ex) { MessageBox.Show(ex.Message); } GeneralTimer.Start(); }
public AddProducts() { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedDialog; // Set the MaximizeBox to false to remove the maximize box. MaximizeBox = false; // Set the MinimizeBox to false to remove the minimize box. //MinimizeBox = false; // Set the start position of the form to the center of the screen. StartPosition = FormStartPosition.CenterScreen; try { SqlAddProduct = new SQLDataControl(); } catch (MySqlException) { MessageBox.Show("Database connection problem"); } foreach (string productType in SqlAddProduct.GetBuyProducts()) { cBProductName.Items.Add(productType).ToString(); } tBPrice.Enabled = false; }
public CampingInformation() { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedDialog; // Set the MaximizeBox to false to remove the maximize box. MaximizeBox = false; // Set the MinimizeBox to false to remove the minimize box. //MinimizeBox = false; // Set the start position of the form to the center of the screen. StartPosition = FormStartPosition.CenterScreen; try { sqlControl = new SQLDataControl(); } catch (MySqlException) { MessageBox.Show("Database connection problem"); } TimerCamping.Start(); }