Exemplo n.º 1
0
        private void but_select_Click(object sender, EventArgs e)
        {
            SortedList slttmp_01 = new SortedList();
            SortedList slttmp01  = new SortedList();
            SortedList slttmp_02 = new SortedList();
            SortedList slttmp02  = new SortedList();

            if (dgv_02.CurrentRow == null)
            {
                MessageBox.Show(PromptMessageXmlHelper.GetPromptMessage("norecall", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (cb_cycle.Text == "")
            {
                MessageBox.Show(PromptMessageXmlHelper.GetPromptMessage("fillralla", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            for (int i = 0; i < dgv_02.Rows.Count; i++)
            {
                if ((bool)dgv_02.Rows[i].Cells["s_select"].Value != true)
                {
                    return;
                }
                {
                    slttmp_01.Add(1, dgv_02.Rows[i].Cells["set_barcode"].Value.ToString());
                    slttmp_01.Add(2, tb_sterbar.Text);
                    slttmp_01.Add(3, tb_batch.Text);
                    slttmp01.Add(1, slttmp_01);

                    slttmp_02.Add(1, dgv_02.Rows[i].Cells["id"].Value.ToString());
                    slttmp_02.Add(2, dgv_02.Rows[i].Cells["set_barcode"].Value.ToString());
                    slttmp_02.Add(3, dgv_02.Rows[i].Cells["base_set"].Value.ToString());
                    slttmp_02.Add(4, cb_cycle.Text.Substring(0, 4));
                    slttmp02.Add(1, slttmp_02);
                }
            }
            CnasRemotCall reCnasRemotCall = new CnasRemotCall();
            //string recsql = reCnasRemotCall.RemotInterface.CheckUPData(3, "HCS-procedure_relation-add001", sltmp01, sltmp02);
            //Todo Long: 召回时使用流程的接口去召回。
            int recint = reCnasRemotCall.RemotInterface.UPData(3, "HCS-workset-add010", slttmp01, slttmp02);

            if (recint > -1)
            {
                MessageBox.Show(PromptMessageXmlHelper.GetPromptMessage("successful", EnumPromptMessage.warning, new string[] { "召回包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
        }
 private void searchdata(string indata)
 {
     //Cnas.wns.CnasMetroFramework.MetroMessageBox.Show(this, indata, "信息提示");
     if (indata.StartsWith("BCB"))
     {
         UserBase userInfo = UserBaseHelper.GetUserByBarCode(indata);
         if (userInfo != null)
         {
             _scannerHook.Stop();
             HCSSM_scan_barcode HCSSM_scanbarcode01 = new HCSSM_scan_barcode(CnasHCSWorkflowInterface01, userInfo, dtpdpart, dtapppd, dtpartvalue);
             if (!HCSSM_scanbarcode01.IsInternalError)
             {
                 HCSSM_scanbarcode01.ShowDialog();
                 _scannerHook.Start(false);
                 load_workorder("");
             }
         }
         else
         {
             MessageBox.Show(PromptMessageXmlHelper.GetPromptMessage("nouser", EnumPromptMessage.error, new string[] { indata }), "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }