public TEOpenTaskDlg() { InitializeComponent(); panel = superGridPanel.PrimaryGrid; //取得METEDownload_Upload.dat資料 sDownUpLoadDat = new CaxDownUpLoad.DownUpLoadDat(); status = CaxDownUpLoad.GetDownUpLoadDat(out sDownUpLoadDat); if (!status) { return; } //更新客戶資料 Local_CusPathAry = Directory.GetDirectories(CaxEnv.GetLocalTaskDir()); foreach (string item in Local_CusPathAry) { comboBoxCus.Items.Add(Path.GetFileNameWithoutExtension(item)); } //關閉下拉選單-料號&客戶版次&製程版次 comboBoxPartNo.Enabled = false; comboBoxCusVer.Enabled = false; comboBoxOpVer.Enabled = false; }
//public static string label001BilletPath = "";//001胚料檔路徑 //public static string labelWBilletPath = "";//W胚料檔路徑 //public static string label900BilletPath = "";//900胚料檔路徑 public MEOpenTaskDlg() { InitializeComponent(); //判斷是否有關閉所有檔案 panel = superGridPanel.PrimaryGrid; //取得METEDownload_Upload.dat資料 sDownUpLoadDat = new CaxDownUpLoad.DownUpLoadDat(); status = CaxDownUpLoad.GetDownUpLoadDat(out sDownUpLoadDat); if (!status) { return; } //status = CaxGetDatData.GetMETEDownload_Upload(out cMETE_Download_Upload_Path); //if (!status) //{ // MessageBox.Show("取得METEDownload_Upload.dat資料失敗"); // return; //} //取得客戶資料夾 Local_CusPathAry = Directory.GetDirectories(CaxEnv.GetLocalTaskDir()); foreach (string item in Local_CusPathAry) { comboBoxCus.Items.Add(Path.GetFileNameWithoutExtension(item)); } //關閉下拉選單-料號&客戶版次&製程版次 comboBoxPartNo.Enabled = false; comboBoxCusVer.Enabled = false; comboBoxOpVer.Enabled = false; }
public MEDownloadDlg() { InitializeComponent(); #region 客戶資料填入 string[] S_Task_CusName = Directory.GetDirectories(CaxEnv.GetGlobaltekTaskDir()); foreach (string item in S_Task_CusName) { comboBoxCusName.Items.Add(Path.GetFileNameWithoutExtension(item));//走訪每個元素只取得目錄名稱(不含路徑)並加入dirlist集合中 } PartNocomboBox.Enabled = false; CusRevcomboBox.Enabled = false; OpRevcomboBox.Enabled = false; Oper1comboBox.Enabled = false; #endregion /* * //取得METEDownloadData資料 * status = CaxGetDatData.GetMETEDownloadData(out cMETEDownloadData); * if (!status) * { * MessageBox.Show("取得METEDownloadData失敗"); * return; * } * * //存入下拉選單-客戶 * for (int i = 0; i < cMETEDownloadData.EntirePartAry.Count; i++) * { * comboBoxCusName.Items.Add(cMETEDownloadData.EntirePartAry[i].CusName); * } * PartNocomboBox.Enabled = false; * CusRevcomboBox.Enabled = false; * Oper1comboBox.Enabled = false; */ //取得METEDownload_Upload資料 sDownUpLoadDat = new CaxDownUpLoad.DownUpLoadDat(); status = CaxDownUpLoad.GetDownUpLoadDat(out sDownUpLoadDat); if (!status) { return; } //status = CaxGetDatData.GetMETEDownload_Upload(out cMETE_Download_Upload_Path); //if (!status) //{ // MessageBox.Show("取得METEDownload_Upload_New失敗"); // return; //} }
private void TEUploadDlg_Load(object sender, EventArgs e) { //取得METEDownload_Upload.dat sDownUpLoadDat = new CaxDownUpLoad.DownUpLoadDat(); status = CaxDownUpLoad.GetDownUpLoadDat(out sDownUpLoadDat); if (!status) { return; } //拆解出客戶、料號、客戶版次、製程版次、製程序 cCaxTEUpLoad = new CaxTEUpLoad(); status = cCaxTEUpLoad.SplitPartFullPath(displayPart.FullPath); if (!status) { return; } //取得料號 PartNoLabel.Text = cCaxTEUpLoad.PartName; OISLabel.Text = cCaxTEUpLoad.OpNum; //將Local_Folder_CAM先暫存起來,然後改變成Server路徑 //tempLocal_Folder_CAM = cMETE_Download_Upload_Path.Local_Folder_CAM; //取代正確路徑 status = CaxDownUpLoad.ReplaceDatPath(sDownUpLoadDat.Server_IP, sDownUpLoadDat.Local_IP, cCaxTEUpLoad.CusName, cCaxTEUpLoad.PartName, cCaxTEUpLoad.CusRev, cCaxTEUpLoad.OpRev, ref sDownUpLoadDat); if (!status) { return; } sDownUpLoadDat.Server_Folder_CAM = sDownUpLoadDat.Server_Folder_CAM.Replace("[Oper1]", cCaxTEUpLoad.OpNum); sDownUpLoadDat.Server_Folder_OIS = sDownUpLoadDat.Server_Folder_OIS.Replace("[Oper1]", cCaxTEUpLoad.OpNum); sDownUpLoadDat.Local_Folder_CAM = sDownUpLoadDat.Local_Folder_CAM.Replace("[Oper1]", cCaxTEUpLoad.OpNum); sDownUpLoadDat.Local_Folder_OIS = sDownUpLoadDat.Local_Folder_OIS.Replace("[Oper1]", cCaxTEUpLoad.OpNum); //拆零件路徑字串取得客戶名稱、料號、版本 //status = PartExcelNC.GetPartData(displayPart,out sPartInfo); //if (!status) //{ // MessageBox.Show("取得客戶名稱、料號、版本失敗,請聯繫開發工程師"); // this.Close(); //} #region (註解中)取代路徑字串 /* * cMETE_Download_Upload_Path.Server_ShareStr = cMETE_Download_Upload_Path.Server_ShareStr.Replace("[Server_IP]", cMETE_Download_Upload_Path.Server_IP); * cMETE_Download_Upload_Path.Server_ShareStr = cMETE_Download_Upload_Path.Server_ShareStr.Replace("[CusName]", sPartInfo.CusName); * cMETE_Download_Upload_Path.Server_ShareStr = cMETE_Download_Upload_Path.Server_ShareStr.Replace("[PartNo]", sPartInfo.PartNo); * cMETE_Download_Upload_Path.Server_ShareStr = cMETE_Download_Upload_Path.Server_ShareStr.Replace("[CusRev]", sPartInfo.CusRev); * Server_OP_Folder = string.Format(@"{0}\{1}", cMETE_Download_Upload_Path.Server_ShareStr, "OP" + sPartInfo.OpNum); * * //將Local_Folder_OIS先暫存起來,然後改變成Server路徑 * tempLocal_Folder_CAM = cMETE_Download_Upload_Path.Local_Folder_CAM; * cMETE_Download_Upload_Path.Local_ShareStr = cMETE_Download_Upload_Path.Local_ShareStr.Replace("[Local_IP]", cMETE_Download_Upload_Path.Local_IP); * cMETE_Download_Upload_Path.Local_ShareStr = cMETE_Download_Upload_Path.Local_ShareStr.Replace("[CusName]", sPartInfo.CusName); * cMETE_Download_Upload_Path.Local_ShareStr = cMETE_Download_Upload_Path.Local_ShareStr.Replace("[PartNo]", sPartInfo.PartNo); * cMETE_Download_Upload_Path.Local_ShareStr = cMETE_Download_Upload_Path.Local_ShareStr.Replace("[CusRev]", sPartInfo.CusRev); * cMETE_Download_Upload_Path.Local_Folder_CAM = cMETE_Download_Upload_Path.Local_Folder_CAM.Replace("[Local_ShareStr]", cMETE_Download_Upload_Path.Local_ShareStr); * cMETE_Download_Upload_Path.Local_Folder_CAM = cMETE_Download_Upload_Path.Local_Folder_CAM.Replace("[Oper1]", sPartInfo.OpNum); */ #endregion //處理Part的路徑 status = CaxUpLoad.GetComponentPath(displayPart, sDownUpLoadDat, ref DicPartDirData); if (!status) { return; } string[] keys = new string[DicPartDirData.Count]; DicPartDirData.Keys.CopyTo(keys, 0); listBox1.Items.AddRange(keys); //string Server_Folder_CAM = ""; //Server_Folder_CAM = tempLocal_Folder_CAM.Replace("[Local_ShareStr]", cMETE_Download_Upload_Path.Server_ShareStr); //Server_Folder_CAM = Server_Folder_CAM.Replace("[Oper1]", sPartInfo.OpNum); //整個CAM資料夾上傳 listBox1.Items.Add("資料夾:"); listBox1.Items.Add(sDownUpLoadDat.Local_Folder_CAM); #region (註解)處理Excel的路徑 /* * string[] FolderFile = System.IO.Directory.GetFileSystemEntries(cMETE_Download_Upload_Path.Local_Folder_CAM, "*.xls"); * long FileTime = new long(); * for (int i = 0; i < FolderFile.Length; i++) * { * System.IO.FileInfo ExcelInfo = new System.IO.FileInfo(FolderFile[i]); * if (ExcelInfo.LastAccessTime.ToFileTime() > FileTime) * { * FileTime = ExcelInfo.LastAccessTime.ToFileTime(); * sExcelDirData.ExcelShopDocLocalDir = FolderFile[i]; * sExcelDirData.ExcelShopDocServerDir = string.Format(@"{0}\{1}", Server_Folder_CAM, ExcelInfo.Name); * } * } * if (File.Exists(sExcelDirData.ExcelShopDocLocalDir)) * { * listView1.Items.Add(Path.GetFileName(sExcelDirData.ExcelShopDocLocalDir)); * } */ #endregion #region (註解)處理NC程式的路徑 /* * string Local_NC_Folder = string.Format(@"{0}\{1}", cMETE_Download_Upload_Path.Local_Folder_CAM, "NC"); * if (Directory.Exists(Local_NC_Folder)) * { * sNCProgramDirData.NCProgramLocalDir = Local_NC_Folder; * sNCProgramDirData.NCProgramServerDir = string.Format(@"{0}\{1}", Server_Folder_CAM, "NC"); * listView1.Items.Add("NC資料夾"); * } */ #endregion }
private void Oper1comboBox_SelectedIndexChanged(object sender, EventArgs e) { //清空ListView資訊 listBox1.Items.Clear(); //取得當前選取的製程序 //CurrentOper1 = Oper1comboBox.Text; status = CaxDownUpLoad.ReplaceDatPath(sDownUpLoadDat.Server_IP, sDownUpLoadDat.Local_IP, comboBoxCusName.Text, PartNocomboBox.Text, CusRevcomboBox.Text, OpRevcomboBox.Text, ref sDownUpLoadDat); if (!status) { return; } //建立Server路徑資料 //string Server_IP = cMETE_Download_Upload_Path.Server_IP; //string Server_ShareStr = cMETE_Download_Upload_Path.Server_ShareStr; //Server_Folder_MODEL = cMETE_Download_Upload_Path.Server_Folder_MODEL; //Server_MEDownloadPart = cMETE_Download_Upload_Path.Server_MEDownloadPart; //Server_IPQC = cMETE_Download_Upload_Path.Server_IPQC; //Server_SelfCheck = cMETE_Download_Upload_Path.Server_SelfCheck; //Server_IQC = cMETE_Download_Upload_Path.Server_IQC; //Server_FAI = cMETE_Download_Upload_Path.Server_FAI; //取代字串成正確路徑 //Server_ShareStr = Server_ShareStr.Replace("[Server_IP]", Server_IP); //Server_ShareStr = Server_ShareStr.Replace("[CusName]", CurrentCusName); //Server_ShareStr = Server_ShareStr.Replace("[PartNo]", CurrentPartNo); //Server_ShareStr = Server_ShareStr.Replace("[CusRev]", CurrentCusRev); //Server_ShareStr = Server_ShareStr.Replace("[OpRev]", CurrentOpRev); //Server_Folder_MODEL = Server_Folder_MODEL.Replace("[Server_ShareStr]", Server_ShareStr); //Server_MEDownloadPart = Server_MEDownloadPart.Replace("[Server_ShareStr]", Server_ShareStr); //Server_MEDownloadPart = Server_MEDownloadPart.Replace("[PartNo]", CurrentPartNo); //Server_IPQC = Server_IPQC.Replace("[Server_IP]", Server_IP); //Server_SelfCheck = Server_SelfCheck.Replace("[Server_IP]", Server_IP); //Server_IQC = Server_IQC.Replace("[Server_IP]", Server_IP); //Server_FAI = Server_FAI.Replace("[Server_IP]", Server_IP); #region (註解)判斷IPQC.xls是否存在 //if (!File.Exists(Server_IPQC)) //{ // listView.Items.Add("IPQC樣板(IPQC.xls)不存在,無法下載"); // return; //} //listView.Items.Add("IPQC樣板:" + Path.GetFileName(Server_IPQC)); #endregion #region (註解)判斷SelfCheck.xls是否存在 //if (!File.Exists(Server_SelfCheck)) //{ // listView.Items.Add("SelfCheck樣板(SelfCheck.xls)不存在,無法下載"); // return; //} //listView.Items.Add("SelfCheck樣板:" + Path.GetFileName(Server_SelfCheck)); #endregion #region (註解)判斷IQC.xls是否存在 //if (!File.Exists(Server_IQC)) //{ // listView.Items.Add("IQC樣板(IQC.xls)不存在,無法下載"); // return; //} //listView.Items.Add("IQC樣板:" + Path.GetFileName(Server_IQC)); #endregion #region (註解)判斷FAI.xls是否存在 //if (!File.Exists(Server_FAI)) //{ // listView.Items.Add("FAI樣板(FAI.xls)不存在,無法下載"); // return; //} //listView.Items.Add("FAI樣板:" + Path.GetFileName(Server_FAI)); #endregion #region (2016.12.29註解)判斷客戶檔案是否存在 //Server_Folder_MODEL = string.Format(@"{0}\{1}", Server_Folder_MODEL, CurrentPartNo + ".prt"); //if (!File.Exists(Server_Folder_MODEL)) //{ // listView.Items.Add("客戶檔案不存在,無法下載"); // buttonDownload.Enabled = false; // return; //} //listView.Items.Add("客戶檔案:" + Path.GetFileName(Server_Folder_MODEL)); #endregion //暫存一個Server_MEDownloadPart,目的要讓程式每次都能有[Oper1]可取代 //tempServer_MEDownloadPart = Server_MEDownloadPart; #region 將選取到的Oper1紀錄成DicSeleOper1(Key = 製程序,Value = ServerPartPath) DicSeleOper1 = new Dictionary <string, string>(); ListDownloadPartPath = new List <string>(); if (Oper1comboBox.Text != "全部下載") { string PartNameText_OISPath = string.Format(@"{0}\{1}\{2}", sDownUpLoadDat.Server_ShareStr, "OP" + Oper1comboBox.Text, "PartNameText_OIS.txt"); string[] PartNameText_OISData = System.IO.File.ReadAllLines(PartNameText_OISPath); foreach (string ii in PartNameText_OISData) { ListDownloadPartPath.Add(string.Format(@"{0}\{1}", sDownUpLoadDat.Server_ShareStr, ii)); } } else { foreach (string i in Oper1comboBox.Items) { if (i == "全部下載") { continue; } string PartNameText_OISPath = string.Format(@"{0}\{1}\{2}", sDownUpLoadDat.Server_ShareStr, "OP" + i, "PartNameText_OIS.txt"); string[] PartNameText_OISData = System.IO.File.ReadAllLines(PartNameText_OISPath); foreach (string ii in PartNameText_OISData) { ListDownloadPartPath.Add(string.Format(@"{0}\{1}", sDownUpLoadDat.Server_ShareStr, ii)); } } } /* * DicSeleOper1 = new Dictionary<string, string>(); * ListDownloadPartPath = new List<string>(); * * * if (Oper1comboBox.Text == "全部下載") * { * for (int i = 0; i < Oper1comboBox.Items.Count; i++) * { * if (Oper1comboBox.Items[i].ToString() == "全部下載") * { * continue; * } * //判斷OP資料夾內是否有PartNameText_OIS.txt,如果有,表示有上傳過,則讀取裡面檔案資料進行下載 * string PartNameText_OISPath = string.Format(@"{0}\{1}\{2}", sDownUpLoadDat.Server_ShareStr, "OP" + Oper1comboBox.Items[i].ToString(), "PartNameText_OIS.txt"); * if (File.Exists(PartNameText_OISPath)) * { * //取得已上傳過的檔案名稱 * string[] PartNameText_OISData = System.IO.File.ReadAllLines(PartNameText_OISPath); * //開始記錄每個零件的路徑 * foreach (string ii in PartNameText_OISData) * { * string Server_MEDownloadPart = string.Format(@"{0}\{1}", sDownUpLoadDat.Server_ShareStr, ii); * ListDownloadPartPath.Add(Server_MEDownloadPart); * } * } * else * { * string Server_MEDownloadPart = tempServer_MEDownloadPart; * Server_MEDownloadPart = Server_MEDownloadPart.Replace("[Oper1]", Oper1comboBox.Items[i].ToString()); * ListDownloadPartPath.Add(Server_MEDownloadPart); * } * } * } * else * { * //判斷OP資料夾內是否有PartNameText_OIS.txt,如果有,表示有上傳過,則讀取裡面檔案資料進行下載 * string PartNameText_OISPath = string.Format(@"{0}\{1}\{2}", sDownUpLoadDat.Server_ShareStr, "OP" + Oper1comboBox.Text, "PartNameText_OIS.txt"); * if (File.Exists(PartNameText_OISPath)) * { * //取得已上傳過的檔案名稱 * string[] PartNameText_OISData = System.IO.File.ReadAllLines(PartNameText_OISPath); * //開始記錄每個零件的路徑 * foreach (string i in PartNameText_OISData) * { * string Server_MEDownloadPart = string.Format(@"{0}\{1}", sDownUpLoadDat.Server_ShareStr, i); * ListDownloadPartPath.Add(Server_MEDownloadPart); * } * } * else * { * string Server_MEDownloadPart = tempServer_MEDownloadPart; * Server_MEDownloadPart = Server_MEDownloadPart.Replace("[Oper1]", Oper1comboBox.Text); * ListDownloadPartPath.Add(Server_MEDownloadPart); * } * } */ #endregion #region 判斷製程檔案是否存在 foreach (string i in ListDownloadPartPath) { //判斷Part檔案是否存在 if (!File.Exists(i)) { listBox1.Items.Add("Part:" + Path.GetFileName(i) + "不存在,請再次確認"); buttonDownload.Enabled = false; return; } listBox1.Items.Add("Part:" + Path.GetFileName(i)); //if (!File.Exists(i)) //{ // listView.Items.Add("Part檔案:"); // listView.Items.Add(Path.GetFileName(i) + "不存在,請再次確認"); // buttonDownload.Enabled = false; // return; //} //listView.Items.Add("Part檔案:" + Path.GetFileName(i)); } buttonDownload.Enabled = true; #endregion }
private void MEUploadDlg_Load(object sender, EventArgs e) { ExportPFD.Checked = true; //取得DownUpLoadDat資料 sDownUpLoadDat = new CaxDownUpLoad.DownUpLoadDat(); status = CaxDownUpLoad.GetDownUpLoadDat(out sDownUpLoadDat); if (!status) { return; } //CaxGetDatData.GetMETEDownload_Upload(out cMETE_Download_Upload_Path); //拆解出客戶、料號、客戶版次、製程版次、製程序 cCaxMEUpLoad = new CaxMEUpLoad(); status = cCaxMEUpLoad.SplitPartFullPath(displayPart.FullPath); if (!status) { return; } //取得料號 PartNoLabel.Text = cCaxMEUpLoad.PartName; OISLabel.Text = cCaxMEUpLoad.OpNum; //將Local_Folder_OIS先暫存起來,然後改變成Server路徑 //tempLocal_Folder_OIS = cMETE_Download_Upload_Path.Local_Folder_OIS; //取代正確路徑 status = CaxDownUpLoad.ReplaceDatPath(sDownUpLoadDat.Server_IP, sDownUpLoadDat.Local_IP, cCaxMEUpLoad.CusName, cCaxMEUpLoad.PartName, cCaxMEUpLoad.CusRev, cCaxMEUpLoad.OpRev, ref sDownUpLoadDat); if (!status) { return; } sDownUpLoadDat.Server_Folder_CAM = sDownUpLoadDat.Server_Folder_CAM.Replace("[Oper1]", cCaxMEUpLoad.OpNum); sDownUpLoadDat.Server_Folder_OIS = sDownUpLoadDat.Server_Folder_OIS.Replace("[Oper1]", cCaxMEUpLoad.OpNum); sDownUpLoadDat.Local_Folder_CAM = sDownUpLoadDat.Local_Folder_CAM.Replace("[Oper1]", cCaxMEUpLoad.OpNum); sDownUpLoadDat.Local_Folder_OIS = sDownUpLoadDat.Local_Folder_OIS.Replace("[Oper1]", cCaxMEUpLoad.OpNum); //status = CaxPublic.GetAllPath("ME", displayPart.FullPath, out sPartInfo, ref cMETE_Download_Upload_Path); //if (!status) //{ // MessageBox.Show("取得路徑或拆分路徑失敗"); // this.Close(); // return; //} //處理Part的路徑 status = CaxMEUpLoad.GetComponentPath(displayPart, sDownUpLoadDat, ref DicPartDirData); if (!status) { return; } string[] keys = new string[DicPartDirData.Count]; DicPartDirData.Keys.CopyTo(keys, 0); listBox1.Items.AddRange(keys); //status = Function.GetComponentPath(displayPart, cMETE_Download_Upload_Path, listView1, out TEDownloadText, ref DicPartDirData); //if (!status) //{ // MessageBox.Show("零件路徑取得失敗,無法上傳"); // this.Close(); // return; //} #region (註解)處理Excel的路徑 /* * string[] FolderFile = System.IO.Directory.GetFileSystemEntries(cMETE_Download_Upload_Path.Local_Folder_OIS, "*.xls"); * //篩選出IPQC、SelfCheck * List<string> List_ExcelIPQC = new List<string>(); * List<string> List_ExcelSelfCheck = new List<string>(); * List<string> List_ExcelIQC = new List<string>(); * List<string> List_ExcelFAI = new List<string>(); * List<string> List_ExcelFQC = new List<string>(); * foreach (string i in FolderFile) * { * if (i.Contains("IPQC")) * { * List_ExcelIPQC.Add(i); * } * if (i.Contains("SelfCheck")) * { * List_ExcelSelfCheck.Add(i); * } * if (i.Contains("IQC")) * { * List_ExcelIQC.Add(i); * } * if (i.Contains("FAI")) * { * List_ExcelFAI.Add(i); * } * if (i.Contains("FQC")) * { * List_ExcelFQC.Add(i); * } * } * * long ExcelIPQCFileTime = new long(); * long ExcelSelfCheckFileTime = new long(); * long ExcelIQCFileTime = new long(); * long ExcelFAIFileTime = new long(); * long ExcelFQCFileTime = new long(); * #region 處理IPQC * foreach (string i in List_ExcelIPQC) * { * System.IO.FileInfo ExcelInfo = new System.IO.FileInfo(i); * if (ExcelInfo.LastAccessTime.ToFileTime() > ExcelIPQCFileTime) * { * ExcelIPQCFileTime = ExcelInfo.LastAccessTime.ToFileTime(); * sExcelDirData.ExcelIPQCLocalDir = i; * string Server_Folder_OIS = ""; * Server_Folder_OIS = tempLocal_Folder_OIS.Replace("[Local_ShareStr]", cMETE_Download_Upload_Path.Server_ShareStr); * Server_Folder_OIS = Server_Folder_OIS.Replace("[Oper1]", PartInfo.OpNum); * sExcelDirData.ExcelIPQCServerDir = string.Format(@"{0}\{1}", Server_Folder_OIS, ExcelInfo.Name); * } * } * if (List_ExcelIPQC.Count != 0) * { * listView1.Items.Add(Path.GetFileName(sExcelDirData.ExcelIPQCLocalDir)); * } #endregion * #region 處理SelfCheck * foreach (string i in List_ExcelSelfCheck) * { * System.IO.FileInfo ExcelInfo = new System.IO.FileInfo(i); * if (ExcelInfo.LastAccessTime.ToFileTime() > ExcelSelfCheckFileTime) * { * ExcelSelfCheckFileTime = ExcelInfo.LastAccessTime.ToFileTime(); * sExcelDirData.ExcelSelfCheckLocalDir = i; * string Server_Folder_OIS = ""; * Server_Folder_OIS = tempLocal_Folder_OIS.Replace("[Local_ShareStr]", cMETE_Download_Upload_Path.Server_ShareStr); * Server_Folder_OIS = Server_Folder_OIS.Replace("[Oper1]", PartInfo.OpNum); * sExcelDirData.ExcelSelfCheckServerDir = string.Format(@"{0}\{1}", Server_Folder_OIS, ExcelInfo.Name); * } * } * if (List_ExcelSelfCheck.Count != 0) * { * listView1.Items.Add(Path.GetFileName(sExcelDirData.ExcelSelfCheckLocalDir)); * } #endregion * #region 處理IQC * foreach (string i in List_ExcelIQC) * { * System.IO.FileInfo ExcelInfo = new System.IO.FileInfo(i); * if (ExcelInfo.LastAccessTime.ToFileTime() > ExcelIQCFileTime) * { * ExcelIQCFileTime = ExcelInfo.LastAccessTime.ToFileTime(); * sExcelDirData.ExcelIQCLocalDir = i; * string Server_Folder_OIS = ""; * Server_Folder_OIS = tempLocal_Folder_OIS.Replace("[Local_ShareStr]", cMETE_Download_Upload_Path.Server_ShareStr); * Server_Folder_OIS = Server_Folder_OIS.Replace("[Oper1]", PartInfo.OpNum); * sExcelDirData.ExcelIQCServerDir = string.Format(@"{0}\{1}", Server_Folder_OIS, ExcelInfo.Name); * } * } * if (List_ExcelIQC.Count != 0) * { * listView1.Items.Add(Path.GetFileName(sExcelDirData.ExcelIQCLocalDir)); * } #endregion * #region 處理FAI * foreach (string i in List_ExcelFAI) * { * System.IO.FileInfo ExcelInfo = new System.IO.FileInfo(i); * if (ExcelInfo.LastAccessTime.ToFileTime() > ExcelFAIFileTime) * { * ExcelFAIFileTime = ExcelInfo.LastAccessTime.ToFileTime(); * sExcelDirData.ExcelFAILocalDir = i; * string Server_Folder_OIS = ""; * Server_Folder_OIS = tempLocal_Folder_OIS.Replace("[Local_ShareStr]", cMETE_Download_Upload_Path.Server_ShareStr); * Server_Folder_OIS = Server_Folder_OIS.Replace("[Oper1]", PartInfo.OpNum); * sExcelDirData.ExcelFAIServerDir = string.Format(@"{0}\{1}", Server_Folder_OIS, ExcelInfo.Name); * } * } * if (List_ExcelFAI.Count != 0) * { * listView1.Items.Add(Path.GetFileName(sExcelDirData.ExcelFAILocalDir)); * } #endregion * #region 處理FQC * foreach (string i in List_ExcelFQC) * { * System.IO.FileInfo ExcelInfo = new System.IO.FileInfo(i); * if (ExcelInfo.LastAccessTime.ToFileTime() > ExcelFQCFileTime) * { * ExcelFQCFileTime = ExcelInfo.LastAccessTime.ToFileTime(); * sExcelDirData.ExcelFQCLocalDir = i; * string Server_Folder_OIS = ""; * Server_Folder_OIS = tempLocal_Folder_OIS.Replace("[Local_ShareStr]", cMETE_Download_Upload_Path.Server_ShareStr); * Server_Folder_OIS = Server_Folder_OIS.Replace("[Oper1]", PartInfo.OpNum); * sExcelDirData.ExcelFQCServerDir = string.Format(@"{0}\{1}", Server_Folder_OIS, ExcelInfo.Name); * } * } * if (List_ExcelFQC.Count != 0) * { * listView1.Items.Add(Path.GetFileName(sExcelDirData.ExcelFQCLocalDir)); * } #endregion */ #endregion }