Beispiel #1
0
        private void buttonCancelLot_Click(object sender, EventArgs e)
        {
            FormEmpEnd   formEmpEnd = new FormEmpEnd(QRData);
            DialogResult result     = formEmpEnd.ShowDialog();

            //WebServiceAPCS.EndLotResult endLot = webService.EndLot(QRData.LotNo, QRData.McNo, QRData.EmpNoEnd, good, ng);
            if (result == DialogResult.OK)
            {
                webService = new WebServiceAPCS.ServiceiLibraryClient();
                WebServiceAPCS.CancelLotResult cancelLot = webService.CancelLot(QRData.McNo, QRData.LotNo, QRData.EmpNoEnd);
                if (cancelLot.IsPass == false)
                {
                    MessageDialog.MessageBoxDialog.ShowMessageDialog("End Lot", cancelLot.Cause, cancelLot.Type.ToString()); //setupLot.Cause, setupLot.Type.ToString()
                    return;
                }
                else
                {
                    ClassLog.SaveLog("Click Cancel Lot Button", "Lot No.:" + QRData.LotNo, QRData.McNo, QRData.EmpNoEnd);

                    QRData.LotNo       = null;
                    QRData.DeviceName  = null;
                    QRData.PackageName = null;
                    QRData.LotSetting  = null;//บันทึกค่าลง class
                    QRData.EmpNo       = null;
                    QRData.InputQty    = null;
                    QRData.LotStart    = null;
                    QRData.LotClose    = null;
                    QRData.TotalNg     = null;
                    QRData.MarkerM     = 0;
                    QRData.MarkerK     = 0;
                    QRData.MekaNG      = 0;
                    QRData.MissingIC   = 0;

                    SaveXml(QRData, AppDomain.CurrentDomain.BaseDirectory + "/xmlData.txt"); //update binary file

                    // ShowData(QRData);
                    //classDataQRBindingSource.ResetBindings(true);

                    labelStatus.Text             = "Status : Wait Input Lot";
                    buttonLotEnd.Enabled         = false;
                    buttonLotEnd.BackgroundImage = test2.Properties.Resources.End_gray;
                    button1.Enabled             = true;
                    button1.BackgroundImage     = test2.Properties.Resources.input_blue;
                    buttonStart.Enabled         = false;
                    buttonStart.BackgroundImage = test2.Properties.Resources.Start_gray;
                }
            }
        }
Beispiel #2
0
        private void button18_Click(object sender, EventArgs e)
        {
            if (textBoxKanaB.Text.Trim() == "")
            {
                MessageBox.Show("Please Input Before.");
                textBoxKanaB.Focus();
            }
            else if (textBoxKanaA.Text.Trim() == "" && textBoxKanaB.Text != "A")
            {
                MessageBox.Show("Please Input After.");
                textBoxKanaA.Focus();
            }
            else if (textBox1SKana.Text.Trim() == "")
            {
                MessageBox.Show("Please Input 1 Shot Kanagata.");
                textBox1SKana.Focus();
            }
            else if (textBox1SAdj.Text.Trim() == "" && textBox1SKana.Text != "A")
            {
                MessageBox.Show("Please Input 1 Shot Adjust.");
                textBox1SAdj.Focus();
            }
            else if (textBoxJigChk.Text.Trim() == "")
            {
                MessageBox.Show("Please Input Visual Check.");
                textBoxJigChk.Focus();
            }
            else if (textBoxVisualChk.Text.Trim() == "")
            {
                MessageBox.Show("Please Input 1 Shot Kanagata.");
                textBoxVisualChk.Focus();
            }
            else if (textBoxVisualAdj.Text.Trim() == "" && textBoxVisualChk.Text != "A")
            {
                MessageBox.Show("Please Input Visual Check Adlust :.");
                textBoxVisualAdj.Focus();
            }
            else if (textBoxTotalNG.Text == "")
            {
                MessageBox.Show("Please Input Total NG.");
                textBoxTotalNG.Focus();
            }
            else if (textBoxM.Text == "")
            {
                MessageBox.Show("Please Input Marker M.");
                textBoxM.Focus();
            }
            else if (textBoxK.Text == "")
            {
                MessageBox.Show("Please Input Marker K.");
                textBoxK.Focus();
            }
            else if (textBoxMekaNG.Text == "")
            {
                MessageBox.Show("Please Input Meka NG.");
                textBoxMekaNG.Focus();
            }
            else if (textBoxIC.Text == "")
            {
                MessageBox.Show("Please Input Missing IC.");
                textBoxIC.Focus();
            }
            else
            {
                DataQR.KanagataBefore  = textBoxKanaB.Text;
                DataQR.KanagataAfter   = textBoxKanaA.Text;
                DataQR.OneShotKanagata = textBox1SKana.Text;
                DataQR.OneShotAdjust   = textBox1SAdj.Text;
                DataQR.JigCheck        = textBoxJigChk.Text;
                DataQR.VisualCheck     = textBoxVisualChk.Text;
                DataQR.VisualAdjust    = textBoxVisualAdj.Text;

                DataQR.TotalNg   = textBoxTotalNG.Text;
                DataQR.MarkerM   = int.Parse(textBoxM.Text);
                DataQR.MarkerK   = int.Parse(textBoxK.Text);
                DataQR.MekaNG    = int.Parse(textBoxMekaNG.Text);
                DataQR.MissingIC = int.Parse(textBoxIC.Text);
                int totalGood = int.Parse(DataQR.InputQty) - int.Parse(DataQR.TotalNg);
                DataQR.TotalGood = totalGood.ToString();

                DialogResult = DialogResult.OK;
            }
            FormEmpEnd   formEmpEnd = new FormEmpEnd(DataQR);
            DialogResult result     = formEmpEnd.ShowDialog();
        }