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 FrmMainRibbon_Load(object sender, EventArgs e) { InitMessageForm(); //this.notifyIcon1.Visible = true; //this.notifyIcon1.Icon = EFWWin.Properties.Resources.msn; //this.notifyIcon1.Text = WorkName; this.Text = WorkName; this.applicationButton1.Text = WorkName; //BarCodeHook方式获取扫描枪数据 if (BarCode != null) { BarCode.Start(); } //CodeBar方式获取扫描枪数据 CodeBarInput.EnabledAllCodeBarInput(Handle); //QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); //qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE; //qrCodeEncoder.QRCodeScale = 2; //qrCodeEncoder.QRCodeVersion = 7; //qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M; //metroTileItem1.Image = qrCodeEncoder.Encode("回收"); //metroTileItem2.Image = qrCodeEncoder.Encode("清洗"); //metroTileItem3.Image = qrCodeEncoder.Encode("配包"); //metroTileItem4.Image = qrCodeEncoder.Encode("灭菌"); }
public HCSSM_workspace(string inappid) { Logger = LogManager.GetLogger("CnasWNSClient"); LoadConfigSetting(); App_ID = inappid; InitializeComponent(); HCSSM_system_config_manager configDialog = new HCSSM_system_config_manager(); configDialog.AppID = this.App_ID; configDialog.IsManagerConfigable = false; this.tabp_03.Controls.Add(configDialog); configDialog.Dock = DockStyle.Fill; InitializeButtonImage(); DoDisplayOrder(); loadclass(); //HCS-pdbasepar-sec02:获取当前工作台下所有流程的参数 CnasRemotCall reCnasRemotCall = new CnasRemotCall(); dtpdpart = reCnasRemotCall.RemotInterface.SelectData("HCS-pdparameter-sec04", null); dtpartvalue = reCnasRemotCall.RemotInterface.SelectData("HCS-pdparametervalue-sec03", null); mtb_cssd.Text = CnasBaseData.SystemInfoData.Rows[0]["customer"].ToString(); InitializeCustomerCbx(); //HCS-apppd-sec001 SortedList sttemp02 = new SortedList(); sttemp02.Add(1, App_ID); dtapppd = reCnasRemotCall.RemotInterface.SelectData("HCS-apppd-sec002", sttemp02); if (dtapppd != null) { for (int i = 0; i < dtapppd.Rows.Count; i++) { App_pd = App_pd + ",'" + dtapppd.Rows[i]["pd_code"].ToString() + "'"; } App_pd = App_pd.Substring(1); } SetComCostCenterItem(); SetWorkSetCbxItem(); GetWorkSets(true); ScannerHook = new BarCodeHook(); ScannerHook.BarCodeEvent += OnWorkSpaceScaned; ScannerHook.Start(false); SetMonitorEnable(false); Thread thread = new Thread(BackgroundWork); thread.IsBackground = true; thread.Start(); }
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); } } }