private void btn_csv_Click(object sender, EventArgs e)
 {
     if (dt_m.Rows.Count != 0)
     {
         string w_str_now      = DateTime.Now.Year.ToString("0000") + DateTime.Now.Month.ToString("00") + DateTime.Now.Day.ToString("00") + DateTime.Now.Hour.ToString("00") + DateTime.Now.Minute.ToString("00") + DateTime.Now.Second.ToString("00");
         string w_str_filename = "受注マスタ検索結果" + w_str_now + ".csv";
         if (tss.DataTableCSV(dt_m, true, w_str_filename, "\"", true))
         {
             MessageBox.Show("保存されました。");
         }
         else
         {
             //MessageBox.Show("キャンセルまたはエラー");
         }
     }
     else
     {
         MessageBox.Show("出力するデータがありません。");
     }
 }
예제 #2
0
        private void btn_csv_Click(object sender, EventArgs e)
        {
            //CSV出力
            if (dgv_table.Rows.Count <= 0)
            {
                return;
            }
            string w_str_now      = DateTime.Now.Year.ToString("0000") + DateTime.Now.Month.ToString("00") + DateTime.Now.Day.ToString("00") + DateTime.Now.Hour.ToString("00") + DateTime.Now.Minute.ToString("00") + DateTime.Now.Second.ToString("00");
            string w_str_filename = cb_table_name.Text.ToString() + "管理者メンテから出力" + w_str_now + ".csv";

            if (tss.DataTableCSV(dt, true, w_str_filename, "\"", true))
            {
                MessageBox.Show("保存しました。");
            }
            else
            {
                //MessageBox.Show("キャンセルまたはエラー");
            }
            return;
        }
예제 #3
0
 private void csv_export(DataTable in_dt)
 {
     if (in_dt.Rows.Count != 0)
     {
         string w_str_now      = DateTime.Now.Year.ToString("0000") + DateTime.Now.Month.ToString("00") + DateTime.Now.Day.ToString("00") + DateTime.Now.Hour.ToString("00") + DateTime.Now.Minute.ToString("00") + DateTime.Now.Second.ToString("00");
         string w_str_filename = nud_year.Value.ToString() + nud_month.Value.ToString("00") + "分 生産工数" + w_str_now + ".csv";
         if (tss.DataTableCSV(in_dt, true, w_str_filename, "\"", true))
         {
             MessageBox.Show("保存されました。");
         }
         else
         {
             //MessageBox.Show("キャンセルまたはエラー");
         }
     }
     else
     {
         MessageBox.Show("出力するデータがありません。");
     }
 }