private void MenuItemDailyReportEdit_Click(object sender, EventArgs e)
 {
     string[] reportDates = SQL.Read1DArray_SQL_Data("date", "dailyreport", "project_no ='" + g_ProjectNo + "' ORDER BY date DESC");
     if (reportDates.Length == 0)//表示這個工程目前並沒有輸入任何日報表
     {
         MessageBox.Show("此工程目前並沒有任何已存在的日報表,\r\n請重新選擇工程或建立日報表", "無法編輯", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         DailyReportEditForm reportEditForm = new DailyReportEditForm(g_ProjectNo);
         reportEditForm.ShowDialog();
     }
 }
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DateTime dateClick = DTStartDate.AddDays(e.RowIndex);
            string morningWeather = SQL.Read_SQL_data("morning_weather", "dailyreport", "project_no = '" + g_ProjectNo + "' AND date = '" + Functions.TransferDateTimeToSQL(dateClick) + "'");
            if (morningWeather == string.Empty)//表示這天沒有日報表
            {
                DailyReportIncreaseForm reportBuildForm = new DailyReportIncreaseForm(false);
                reportBuildForm.LoadProjectInfo(g_ProjectNo);
                reportBuildForm.SetDateTodayValue(dateClick);
                reportBuildForm.ShowDialog();
                LoadProjectInfo(g_ProjectNo);
            }
            else//表示這天已經有日報表
            {
                DailyReportEditForm reportEditForm = new DailyReportEditForm(g_ProjectNo);
                reportEditForm.LoadProjectInfo(g_ProjectNo);
                reportEditForm.SetDateTodayValue(dateClick);
                reportEditForm.ShowDialog();
                LoadProjectInfo(g_ProjectNo);
            }

        }