Beispiel #1
0
        private void buttonLotEnd_Click(object sender, EventArgs e)
        {
            FormDataRecord formDataRecord   = new FormDataRecord(QRData);
            DialogResult   resultDatarecode = formDataRecord.ShowDialog();

            /////////goto emp end form ///////////////
            ///
            //check by webserv
            if (resultDatarecode == DialogResult.OK)
            {
                QRData.LotClose = DateTime.Now;
                webService      = new WebServiceAPCS.ServiceiLibraryClient();

                int good = int.Parse(QRData.TotalGood);
                int ng   = int.Parse(QRData.TotalNg);

                WebServiceAPCS.EndLotResult endLot = webService.EndLot(QRData.LotNo, QRData.McNo, QRData.EmpNoEnd, good, ng);

                if (endLot.IsPass == false)
                {
                    MessageDialog.MessageBoxDialog.ShowMessageDialog("End Lot", endLot.Cause, endLot.Type.ToString()); //setupLot.Cause, setupLot.Type.ToString()
                    return;
                }
                else
                {
                    UpdateSqlData(QRData.McNo, QRData.LotNo, QRData.LotStart);
                    SaveXml(QRData, AppDomain.CurrentDomain.BaseDirectory + "/xmlData.txt"); //update binary file
                    ClassLog.SaveLog("Click Lot End Button", "Lot No.:" + QRData.LotNo, QRData.McNo, QRData.EmpNoEnd + "| Total Good " + QRData.TotalGood + "| Total NG " + QRData.TotalNg);


                    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;
                    pictureBox2.Visible     = false;
                }
            }
            // ShowData(QRData);
            //classDataQRBindingSource.ResetBindings(true);
        }
Beispiel #2
0
 private void button2_Click_1(object sender, EventArgs e)
 {
     FormDataRecord formDataRecord = new FormDataRecord(QRData);
     DialogResult   result         = formDataRecord.ShowDialog();
 }