//ESBGateway-卡號查詢 public IMessage ESBGatewayRequest_GetGetData(string FunctionName, Enum_InputType EIType, string Input, Dictionary <string, string> dicAddParameter, uint attach, out string strCUSTNO) { Dictionary <string, string> dicParm = new Dictionary <string, string>(); strCUSTNO = ""; dicParm.Add(EIType.ToString(), Input); if (EIType == Enum_InputType.IDNO) { Dictionary <string, string> dicTemp = new Dictionary <string, string>(); dicTemp.Add("IDNO", Input.Trim()); IMessage IMTemp = Program.m_Gateway.MessageGateWayRequest("ESBGETCUSTNBR", Program.m_Gateway.ECMSClassName, dicTemp, attach, 0); if (IMTemp != null && (IMTemp.ResultCode == 0 && IMTemp.Parameters.ContainsKey("RETCD") && IMTemp.Parameters["RETCD"] == 0)) { strCUSTNO = IMTemp.Parameters["CustomerNo"].ToString().Trim(); dicParm.Add("CUSTNO", strCUSTNO); } } foreach (string str in dicAddParameter.Keys) { if (!dicParm.Keys.Contains(str)) { dicParm.Add(str, dicAddParameter[str]); } } return(Program.m_Gateway.MessageGateWayRequest(FunctionName, Program.m_Gateway.ESBClassName, dicParm, attach, 0)); }
//ECMSWorker-卡號查詢 public IMessage ECMSWorkerRequest_GetData(string FunctionName, Enum_InputType EIType, string Input, Dictionary <string, string> dicAddParameter, uint attach) { Dictionary <string, string> dicParm = new Dictionary <string, string>(); dicParm.Add(EIType.ToString(), Input); foreach (string str in dicAddParameter.Keys) { if (!dicParm.Keys.Contains(str)) { dicParm.Add(str, dicAddParameter[str]); } } return(Program.m_Gateway.MessageGateWayRequest(FunctionName, Program.m_Gateway.ECMSClassName, dicParm, attach, 0)); }
private void FilterData(string strInputNo) { System.Diagnostics.Stopwatch _sw = new System.Diagnostics.Stopwatch(); DSCompare.DTCompareRow drC = dSCompare.DTCompare.NewDTCompareRow(); Dictionary <string, string> dicAddParameter = GetAddParameter(this.tbxADDParameter.Text.Trim()); string strCUSTNO = ""; _sw.Reset(); _sw.Start(); //ECMS IMessage ECS_Data = ECMSWorkerRequest_GetData(this.tbxFunc.Text.Trim(), m_enumInputType, strInputNo, dicAddParameter, 0); _sw.Stop(); drC.ECSRecState = (_sw.Elapsed.TotalMilliseconds / 1000.0).ToString("0.00"); _sw.Reset(); _sw.Start(); //ESB IMessage ESB_Data = ESBGatewayRequest_GetGetData(this.tbxFunc.Text.Trim(), m_enumInputType, strInputNo, dicAddParameter, 0, out strCUSTNO); _sw.Stop(); drC.ESBRecState = (_sw.Elapsed.TotalMilliseconds / 1000.0).ToString("0.00"); switch (m_enumInputType) { case Enum_InputType.CARDNO: drC.IDNO = ""; drC.CARDNO = strInputNo.Trim(); drC.CUSTNO = ""; break; case Enum_InputType.IDNO: drC.IDNO = strInputNo.Trim(); drC.CARDNO = ""; drC.CUSTNO = strCUSTNO; break; } drC.InputType = m_enumInputType.ToString(); drC.FUNCTION = this.tbxFunc.Text.Trim(); drC.ADDParameter = this.tbxADDParameter.Text.Trim(); drC.ECS_ID = ADDECSDataToDS(drC.C_ID, ECS_Data); drC.ECSResultCode = ECS_Data == null ? "-1": ECS_Data.ResultCode.ToString(); drC.ESB_ID = ADDESBDataToDS(drC.C_ID, ESB_Data); drC.ESBResultCode = ESB_Data == null ? "-1" : ESB_Data.ResultCode.ToString(); //取得DataCount int intECSDataCount = -1, intECSRETCD = -1, intESBDataCount = -1, intESBRETCD = -1; GetDataCount(drC.C_ID, out intECSDataCount, out intECSRETCD, out intESBDataCount, out intESBRETCD); drC.ECSDATACount = intECSDataCount; drC.ESBDATACount = intESBDataCount; drC.ECSRetCD = intECSRETCD; drC.ESBRetCD = intESBRETCD; drC.CompareResult = GetCompareResult(drC.C_ID, drC.ECSDATACount, drC.ESBDATACount).ToString(); dSCompare.DTCompare.AddDTCompareRow(drC); dSCompare.AcceptChanges(); }