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);
            }
        }
        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);
            }
        }