public bool ExportReportProductionFromToNewForm(DateTime from, DateTime To, string Pathsave)
        {
            try
            {
                DefectRateReport defectRateReport = new DefectRateReport();

                List <DefectRateData> defectRateDatas = new List <DefectRateData>();
                defectRateDatas = defectRateReport.GetListDefectRateReportFromTo("B01", "0010", from, To);

                if (defectRateDatas.Count == 0)
                {
                    return(false);
                }
                List <string> listHeaderRW25 = GetListStringHeaderReworkTop25();
                MQCExportData mQCExportData  = new MQCExportData();

                mQCExportData.ExportToTemplateMQCDefectDaily(pathDailyNew, Pathsave, listHeaderRW25, defectRateDatas, from, To);
                return(true);
            }
            catch (Exception ex)
            {
                SystemLog.Output(SystemLog.MSG_TYPE.Err, "ExportReportProductionDaiLy()", ex.Message);
                return(false);
            }
        }
Beispiel #2
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);
        }
Beispiel #3
0
        private void Lb_Lot_Click(object sender, EventArgs e)
        {
            DefectRateReport defectRateReport = new DefectRateReport();
            DateTime         date_from        = DateTime.Now;
            DateTime         date_to          = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 30, 0, 0, 0);
            DefectRateData   defectRateData   = new DefectRateData();

            defectRateData = defectRateReport.GetDefectRateReportByLot(date_from, date_to, "B01", "0010", mQCItem1.PO);

            Class.ToolSupport exportExcel = new Class.ToolSupport();
            exportExcel.ExportToTemplateMQCDefectTop16(MQCForm, @"C:\ERP_Temp\MQC_" + mQCItem1.PO + "-" + DateTime.Now.ToString("yyyyMMdd hhmmss") + ".xlsx", defectRateData);
        }
Beispiel #4
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);
        }
        public bool ExportReportProductionDaiLy(PeriodProduction period, string Pathsave)
        {
            try
            {
                DefectRateReport defectRateReport = new DefectRateReport();

                List <DefectRateData> defectRateDatas = new List <DefectRateData>();
                defectRateDatas = defectRateReport.GetListDefectRateReportAmountOfTimeDaily("B01", "0010", period);

                if (defectRateDatas.Count == 0)
                {
                    return(false);
                }
                Class.ToolSupport exportExcel = new Class.ToolSupport();
                return(true);
            }
            catch (Exception ex)
            {
                SystemLog.Output(SystemLog.MSG_TYPE.Err, "ExportReportProductionDaiLy()", ex.Message);
                return(false);
            }
        }
        public bool ExportReportProductionFromTo(DateTime from, DateTime To, string Pathsave)
        {
            try
            {
                DefectRateReport defectRateReport = new DefectRateReport();

                List <DefectRateData> defectRateDatas = new List <DefectRateData>();
                defectRateDatas = defectRateReport.GetListDefectRateReportFromTo("B01", "0010", from, To);

                if (defectRateDatas.Count == 0)
                {
                    return(false);
                }
                Class.ToolSupport exportExcel = new Class.ToolSupport();
                exportExcel.ExportToTemplateMQCDefectDaily(pathDaily, Pathsave, defectRateDatas, from, To);
                return(true);
            }
            catch (Exception ex)
            {
                SystemLog.Output(SystemLog.MSG_TYPE.Err, "ExportReportProductionDaiLy()", ex.Message);
                return(false);
            }
        }