private void btm_Exit_Click(object sender, EventArgs e) { wnDm wdm = new wnDm(); if (!txt_Title.Text.ToString().Equals("") && !txt_Contents.Text.ToString().Equals("")) { title = txt_Title.Text.ToString(); contents = txt_Contents.Text.ToString(); int rsNum = wdm.insert_Schedule(date.ToString(), title, contents); if (rsNum == 0) { this.Close(); } } else if (!txt_Title.Text.ToString().Equals("") && txt_Contents.Text.ToString().Equals("")) { title = txt_Title.Text.ToString(); contents = txt_Contents.Text.ToString(); int rsNum = wdm.insert_Schedule(date.ToString(), title, contents); if (rsNum == 0) { this.Close(); } } else if (txt_Title.Text.ToString().Equals("") && !txt_Contents.Text.ToString().Equals("")) { MessageBox.Show("TITLE를 적어주세요"); return; } else { wdm.deleteSchdule(date); this.Close(); } }