/// <summary> /// 리시브데이터 파싱 /// </summary> /// <param name="command">The command.</param> /// <param name="data">The data.</param> private void fnReceivedMessage(mRF.ReturnType command, string data) { try { //this.txtMsg.Text = data + System.Environment.NewLine + this.txtMsg.Text; IsProcess = false; //DB 에 자동저장한다. string orgfacility = this.Rows["FACILITY_CODE"].ToString().Trim(); string orgsexcode = this.Rows["SEX_CODE"].ToString().Trim(); string orglockno = this.Rows["LOCK_NO"].ToString().Trim(); DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter); dtParm.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode }); dtParm.Rows.Add(new object[] { "V_FACILITY_CODE", orgfacility }); dtParm.Rows.Add(new object[] { "V_SEX_CODE", orgsexcode }); dtParm.Rows.Add(new object[] { "V_LOCK_NO", orglockno }); dtParm.Rows.Add(new object[] { "V_UID_NO", data }); dtParm.Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id }); dtParm.Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip }); string vRet = DataLayer.ExecuteSpScala("PKG_JNAAI01.PR_13", dtParm, DataLayer.MessageEncoding.Default); if (vRet != "OK") { lblInfo.Appearance.ForeColor = System.Drawing.Color.Red; this.txtMsg.BackColor = Color.Red; addText("[" + Caption + "] 락카키 = " + data + System.Environment.NewLine + vRet); } else { lblInfo.Appearance.ForeColor = System.Drawing.Color.Blue; this.txtMsg.BackColor = Color.White; addText("[" + Caption + "] " + data + System.Environment.NewLine + "입력하였습니다."); if (chkContinue.Checked) { Basic.LoadParentFunction(this, ReturnFunction, new object[] { data }); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { IsProcess = true; } }
/// <summary> /// 데이터 리시브 /// </summary> /// <param name="command">The command.</param> /// <param name="data">The data.</param> private void em_Event_Received(mRF.ReturnType command, object data) { try { if (!IsProcess) { return; } IAsyncResult ar = BeginInvoke(new ReceviedMessage(fnReceivedMessage), new object[] { command, data }); EndInvoke(ar); } catch (Exception ex) { throw ex; } }