private void button3_Click(object sender, EventArgs e) { String todaysDate = dateTimePicker1.Text.ToString(); dictionary = createCheckDailyReortExistsDictionary(todaysDate); dc = new DatabaseConnector(); dtReport = checkDailyReportExists(dictionary); if (int.Parse(dtReport.Rows[0][0].ToString()) > 0) { dictionary = createDailyReportDictionary(todaysDate); dc = new DatabaseConnector(); dtReport = createDailyReport(dictionary); DailyPatientReports dailyReport = new DailyPatientReports(); dailyReport.MdiParent = this.MdiParent; dailyReport.myDate = todaysDate; dailyReport.Show(); } else { MessageBox.Show("No Patient was treated on " + todaysDate + "\n Report do not exist!"); } }
private void button3_Click(object sender, EventArgs e) { String todaysDate = dateTimePicker1.Text.ToString(); dictionary = createCheckDailyReportExistsDictionary(todaysDate); dc = new DatabaseConnector(); dtReport = checkDailyReportExists(dictionary); if (int.Parse(dtReport.Rows[0][0].ToString()) > 0) { dictionary = createDailyReportDictionary(todaysDate); dc = new DatabaseConnector(); dtReport = createDailyReport(dictionary); DailyPatientReports dailyReport = new DailyPatientReports(); dailyReport.myDate = todaysDate; dailyReport.MdiParent = this.MdiParent; dailyReport.Show(); } else { MessageBox.Show("No Patient was treated on " + todaysDate + "\n Report do not exist!"); } }