Exemple #1
0
 private void searchdata(UserBase userInfo)
 {
     try
     {
         if (userInfo != null)                //indata.StartsWith("BCB"))
         {
             //UserBase userInfo = UserBaseHelper.GetUserByBarCode(indata);
             if (userInfo.UserID > 0)
             {
                 this.BeginInvoke(new Action(() =>
                 {
                     HCSSM_scan_barcode scanCodeDialog = new HCSSM_scan_barcode(CnasHCSWorkflowInterface01, userInfo, dtpdpart, dtapppd, dtpartvalue);
                     if (!scanCodeDialog.IsInternalError)
                     {
                         ScannerHook.Stop();
                         scanCodeDialog.ShowDialog();
                         ScannerHook.Start(false);
                         GetWorkSets();
                     }
                 }));
             }
             else
             {
                 MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("nouser", EnumPromptMessage.warning, new string[] { userInfo.Userbcode }),
                                 "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
     catch (Exception ex)
     {
     }
 }
 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);
         }
     }
 }