Example #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            DefectRateReport defectRateReport = new DefectRateReport();
            DateTime         date_from        = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1, 0, 0, 0);
            DateTime         date_to          = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 30, 0, 0, 0);
            DefectRateData   defectRateData   = new DefectRateData();

            defectRateData = defectRateReport.GetDefectRateReport(date_from, date_to, "B01", "0010");
            Class.ToolSupport exportExcel = new Class.ToolSupport();
            exportExcel.ExportToTemplateMQCDefect(pathMonth, @"C:\ERP_Temp\Temp2" + "-" + DateTime.Now.ToString("yyyyMMdd hhmmss") + ".xlsx", defectRateData);
            //      exportExcel.ExportToTemplateMQCDefect(@"D:\AN\Report\Template\Testy.xlsx", @"C:\ERP_Temp\Temp2" + "-" + DateTime.Now.ToString("yyyyMMdd hhmmss") + ".xlsx", defectRateData);
        }
Example #2
0
        private void Btn_Summary_Click(object sender, EventArgs e)
        {
            //         LoadDataSummary loadDataSummary = new LoadDataSummary();

            //List<MQCItemSummary> itemSummaries = loadDataSummary.GetMQCItemSummaries(dateTimeFrom, dateTimeTo, dept, process);

            //         SummaryWindow summary = new SummaryWindow(itemSummaries);
            //         summary.Show();

            DefectRateReport defectRateReport = new DefectRateReport();
            DateTime         date_from        = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1, 0, 0, 0);
            DateTime         date_to          = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 30, 0, 0, 0);
            DefectRateData   defectRateData   = new DefectRateData();

            defectRateData = defectRateReport.GetDefectRateReport(date_from, date_to, "B01", "0010");
            Class.ToolSupport exportExcel = new Class.ToolSupport();
            exportExcel.ExportToTemplateMQCDefect(pathMonth, @"C:\ERP_Temp\MQC_Report" + "-" + DateTime.Now.ToString("yyyyMMdd hhmmss") + ".xlsx", defectRateData);
        }