private void bttnAdminSend_Click(object sender, EventArgs e) { if (adminNoticeSubtxt.Text != "") { if (bttnAdminSend.Text == "Update") { string sub = adminNoticeSubtxt.Text; adminDataAccess.DeleteNotice(sub); bttnAdminSend.Text = "Send"; } DateTime thisDay = DateTime.Today; string dateOnly = thisDay.ToString("g"); string noticeSub = adminNoticeSubtxt.Text; string NoticeDescription = txtAdminDescription.Text; string sendTo = comboBox1.SelectedItem.ToString(); adminDataAccess.SetAdminNotice("Admin", sendTo, dateOnly, "Admin", noticeSub, NoticeDescription); dataGridView1.DataSource = adminDataAccess.getNoticeList(); } else { MessageBox.Show("Fill Rquired Box"); } }