Ejemplo n.º 1
0
        private void OpRevcomboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            //清空ListView資訊
            listBox1.Items.Clear();
            //取得當前選取的製程版次
            //CurrentOpRev = OpRevcomboBox.Text;
            //打開&清空下拉選單-製程序
            Oper1comboBox.Enabled = true;
            Oper1comboBox.Items.Clear();
            Oper1comboBox.Text = "";

            //取得PECreateData.dat
            string PECreateData_Path = string.Format(@"{0}\{1}\{2}\{3}\{4}\{5}\{6}", CaxEnv.GetGlobaltekTaskDir(), comboBoxCusName.Text, PartNocomboBox.Text, CusRevcomboBox.Text, OpRevcomboBox.Text, "MODEL", "PECreateData.dat");

            if (!File.Exists(PECreateData_Path))
            {
                CaxLog.ShowListingWindow("此料號沒有舊資料檔案,請檢查PECreateData.dat");
                return;
            }
            CaxPE.ReadPECreateData(PECreateData_Path, out cPECreateData);

            Oper1comboBox.Items.AddRange(cPECreateData.oper1Ary.ToArray());

            Oper1comboBox.Items.Add("全部下載");
        }
Ejemplo n.º 2
0
        private void comboBoxOldCusRev_SelectedIndexChanged(object sender, EventArgs e)
        {
            //清空superGrid資料
            panel.Rows.Clear();
            //取得當前選取的客戶版次
            CurrentOldCusRev = comboBoxOldCusRev.Text;

            //取得PECreateData.dat
            string PECreateData_Path = string.Format(@"{0}\{1}\{2}\{3}\{4}\{5}", CaxEnv.GetGlobaltekTaskDir(), CurrentOldCusName, CurrentOldPartNo, CurrentOldCusRev, "MODEL", "PECreateData.dat");

            if (!File.Exists(PECreateData_Path))
            {
                CaxLog.ShowListingWindow("此料號沒有舊資料檔案,請檢查PECreateData.dat");
                return;
            }
            CaxPE.ReadPECreateData(PECreateData_Path, out cPECreateData);

            //將舊資料填入SuperGridControl
            GridRow row = new GridRow();

            for (int i = 0; i < cPECreateData.Oper1Ary.Count; i++)
            {
                row = new GridRow(cPECreateData.Oper1Ary[i], cPECreateData.Oper2Ary[i], "刪除");
                panel.Rows.Add(row);
            }

            /*
             * //比對選擇的客戶版次取得對應的Oper並塞入SuperGridControl
             * List<string> ListOper1 = new List<string>();
             * List<string> ListOper2 = new List<string>();
             * for (int i = 0; i < cMETEDownloadData.EntirePartAry[IndexofCusName].CusPart[IndexofPartNo].CusRev.Count; i++)
             * {
             *  if (CurrentOldCusRev == cMETEDownloadData.EntirePartAry[IndexofCusName].CusPart[IndexofPartNo].CusRev[i].RevNo)
             *  {
             *      ListOper1 = cMETEDownloadData.EntirePartAry[IndexofCusName].CusPart[IndexofPartNo].CusRev[i].OperAry1;
             *      ListOper2 = cMETEDownloadData.EntirePartAry[IndexofCusName].CusPart[IndexofPartNo].CusRev[i].OperAry2;
             *  }
             * }
             *
             * GridRow row = new GridRow();
             * for (int i = 0; i < ListOper1.Count;i++ )
             * {
             *  row = new GridRow(ListOper1[i], ListOper2[i], "刪除");
             *  panel.Rows.Add(row);
             * }
             */
            Is_OldPart = true;
        }
Ejemplo n.º 3
0
        private void CusRevcomboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            //清空ListView資訊
            listView.Items.Clear();
            //取得當前選取的客戶版次
            CurrentCusRev = CusRevcomboBox.Text;
            //打開&清空下拉選單-製程序
            Oper1comboBox.Enabled = true;
            Oper1comboBox.Items.Clear();
            Oper1comboBox.Text = "";

            //取得PECreateData.dat
            string PECreateData_Path = string.Format(@"{0}\{1}\{2}\{3}\{4}\{5}", CaxEnv.GetGlobaltekTaskDir(), CurrentCusName, CurrentPartNo, CurrentCusRev, "MODEL", "PECreateData.dat");

            if (!File.Exists(PECreateData_Path))
            {
                CaxLog.ShowListingWindow("此料號沒有舊資料檔案,請檢查PECreateData.dat");
                return;
            }
            CaxPE.ReadPECreateData(PECreateData_Path, out cPECreateData);

            Oper1comboBox.Items.AddRange(cPECreateData.Oper1Ary.ToArray());
            Oper1comboBox.Items.Add("全部下載");

            /*
             * //比對選擇的客戶、料號、版次取得對應的製程序並塞入下拉選單中
             * for (int i = 0; i < cMETEDownloadData.EntirePartAry[IndexofCusName].CusPart[IndexofPartNo].CusRev.Count; i++ )
             * {
             *  if (CurrentCusRev == cMETEDownloadData.EntirePartAry[IndexofCusName].CusPart[IndexofPartNo].CusRev[i].RevNo)
             *  {
             *      Oper1comboBox.Items.AddRange(cMETEDownloadData.EntirePartAry[IndexofCusName].CusPart[IndexofPartNo].CusRev[i].OperAry1.ToArray());
             *  }
             * }
             * Oper1comboBox.Items.Add("全部下載");
             */
        }