private void button2_Click(object sender, EventArgs e) { this.Hide(); calendar f1 = new calendar(); f1.ShowDialog(); }
private void cancelButton_Click(object sender, EventArgs e) { this.Hide(); calendar f2 = new calendar(); f2.ShowDialog(); }
private void deleteButton_Click(object sender, EventArgs e) { { string constring = "datasource=localhost;port=3306;username=root;password=3a1w"; string Query = "delete from sample_table.event where name = '" + this.comboBox1.Text + "' ;"; MySqlConnection conDatabase = new MySqlConnection(constring); //MySqlCommand cmdDatabase = new MySqlCommand("SELECT ID, firstname, lastname, email, warningSuspension AS 'Warning Suspension', suspended FROM sample_table.personal_info_table ;", conDatabase); MySqlCommand cmdDatabase = new MySqlCommand(Query, conDatabase); MySqlDataReader myReader; try { conDatabase.Open(); myReader = cmdDatabase.ExecuteReader(); while (myReader.Read()) { string sName = myReader.GetString("name"); comboBox1.Items.Add(sName); } MessageBox.Show("Event deleted"); this.Hide(); calendar f3 = new calendar(); f3.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void CalendarButton_Click(object sender, EventArgs e) { this.Hide(); calendar f9 = new calendar(); f9.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { DBConnect c = new DBConnect(); c.AddEvent(this.date.Text, this.name.Text, this.memo.Text); //c.PaperlessWaiver(this.PrintName_txt.Text, this.SignName_txt.Text, this.MemType_txt.Text, this.Gender_txt.Text, this.dateWaiver.Text, this.TimeArr_txt.Text, this.TimeLeft_txt.Text); MessageBox.Show("Event saved"); this.Hide(); calendar f3 = new calendar(); f3.ShowDialog(); // this.Hide(); // Form1 f1 = new Form1(); //f1.ShowDialog(); }