예제 #1
0
        private void Form3_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (flag == true)
            {
                mModel.IsSave    = false;
                mModel.IsConnect = true;

                hWebservice.INSERT_CM_WIP_PROCESS_LINE_HISTORY(mModel.Factories[Convert.ToInt32(mModel.Factory)], mModel.LineIds[Convert.ToInt32(mModel.LineId)], mModel.LineNumbers[Convert.ToInt32(mModel.LineNumber)], mModel.ProcessIds[Convert.ToInt32(mModel.ProcessId)], mModel.UserId, mModel.ProductId, mModel.P_LOT_TYPE, "");
                Window.TextBox4Add();
            }
            else
            {
                flag = false;
            }
            mModel.Isform3Alive = false;
        }
예제 #2
0
 private void newForm()
 {
     try
     {
         if (!mModel.IsConnect)
         {
             mModel.UserId    = userIdtxt.Text;
             mModel.ProductId = productIdtxt.Text;
             MessageBoxButtons messbutton = MessageBoxButtons.OKCancel;
             DialogResult      dr         = MessageBox.Show("網絡斷開是否進入無網絡讀碼?", "否", messbutton);
             if (dr == DialogResult.OK)
             {
                 this.BeginInvoke(new Action(() => { form2.fun(); }));
             }
         }
         else
         {
             string ss = webService.INSERT_CM_WIP_PROCESS_LINE_HISTORY(mModel.Factories[Convert.ToInt32(mModel.Factory)], userIdtxt.Text, productIdtxt.Text, mModel.ProcessIds[Convert.ToInt32(mModel.ProcessId)], mModel.LineIds[Convert.ToInt32(mModel.LineId)], mModel.LineNumbers[Convert.ToInt32(mModel.LineNumber)], mModel.P_LOT_TYPE, "");
             //MessageBox.Show(mModel.Factories[Convert.ToInt32(mModel.Factory)]+","+userIdtxt.Text+","+productIdtxt.Text + "," + mModel.ProcessIds[Convert.ToInt32(mModel.ProcessId)] + "," + mModel.LineIds[Convert.ToInt32(mModel.LineId)] + "," + mModel.LineNumbers[Convert.ToInt32(mModel.LineNumber)] + "," + mModel.P_LOT_TYPE);
             if (ss != "OK")
             {
                 MessageBox.Show(ss);
             }
             else
             {
                 mModel.IsLockKeyboard = true;
                 BindKeyBoardHook();
                 this.BeginInvoke(new Action(() => { form2.fun(); }));
             }
         }
     }
     catch
     {
         mModel.IsConnect = false;
         mModel.UserId    = userIdtxt.Text;
         mModel.ProductId = productIdtxt.Text;
         MessageBoxButtons messbutton = MessageBoxButtons.OKCancel;
         DialogResult      dr         = MessageBox.Show("網絡斷開是否進入無網絡讀碼?", "否", messbutton);
         if (dr == DialogResult.OK)
         {
             this.BeginInvoke(new Action(() => { form2.fun(); }));
         }
     }
     finally
     {
     }
 }