// 印刷ボタン押下時の処理 private void btnPrintBatch_Click(object sender, EventArgs e) { string batchNo = txtBatchNo.Text; string modelNo = cmbModelNo.Text; string modelName = txtModelName.Text; string subAssyNo = cmbSubAssyNo.Text; string subAssyName = txtSubAssyName.Text; DateTime batchDate = dtpBatchDate.Value; string shift = cmbShift.Text; string line = cmbLine.Text; string leader = txtLeaderId.Text; string leaderName = txtLeaderName.Text; string input = txtInputQty.Text; string output = txtOutputQty.Text; DateTime inputTime = dtpInputTime.Value; DateTime outputTime = dtpOutputTime.Value; string remark = txtRemark.Text; ExcelClass xl = new ExcelClass(); // 共有プリンター用CSV出力 xl.ExportBatchToCsvForPrint(directory + batchNo + ".csv", "SUB ASSY", subAssyNo, subAssyName, outputTime, output, batchNo, line); // エクセルへ出力 xl.ExportBatchDetailToExcel(batchNo, modelNo, modelName, subAssyNo, subAssyName, batchDate, shift, line, leader, leaderName, input, output, inputTime, outputTime, remark, dtOperator, dtParts, dtSubMaterial); }
// 印刷ボタン押下時の処理 private void btnExcelExport_Click(object sender, EventArgs e) { string batchNo = txtBatchNo.Text; string modelNo = cmbModelNo.Text; string modelName = txtModelName.Text; DateTime batchDate = dtpBatchDate.Value; ExcelClass xl = new ExcelClass(); // エクセルへ出力 xl.ExportBatchDetailToExcel(batchNo, modelNo, modelName, batchDate, dtParts); }