public MyCardQueryLogWcf.ReturnResult ViewQueryLog(string select, string view, string where, string orderby, string iseasyquery, string strquery) { MyCardQueryLogWcf.Service1Client MyCardQueryLogWcf = new MyCardQueryLogWcf.Service1Client(); MyCardQueryLogWcf.ReturnResult ReturnResult = new MyCardQueryLogWcf.ReturnResult(); try { ReturnResult = MyCardQueryLogWcf.ViewQueryLog(select, view, where, orderby, iseasyquery, strquery); } catch (Exception ex) { ReturnResult.ReturnMsgNo = -99; ReturnResult.ReturnMsg = "連線MyCardQueryLogWcf.ViewQueryLog失敗" + ex.Message; return ReturnResult; } return ReturnResult; }
//資料View查詢內容 public ReturnDBResult ViewQueryLog(string select, string view, string where, string orderby, string iseasyquery, string strquery) //取得資料 { ReturnDBResult ReturnResult = new ReturnDBResult(); InValue = "ViewQueryLog"; if (MyCardQueryLog.Properties.Settings.Default.In34.ToUpper() == "TRUE") { MyCardQueryLogWcf.Service1Client MyCardQueryLogWcf = new MyCardQueryLogWcf.Service1Client(); MyCardQueryLogWcf.ReturnResult ReturnValueB2B = new MyCardQueryLogWcf.ReturnResult(); try { ReturnValueB2B = MyCardQueryLogWcf.ViewQueryLog(select, view, where, orderby, iseasyquery, strquery); ReturnResult.ReturnMsgNo = ReturnValueB2B.ReturnMsgNo; ReturnResult.ReturnMsg = ReturnValueB2B.ReturnMsg; ReturnResult.ReturnDS = ReturnValueB2B.ReturnDS; } catch (Exception ex) { OutValue = "|回應|" + "Exception|" + ex.ToString(); ErrorLog(InValue + OutValue); ReturnResult.ReturnMsgNo = -99; ReturnResult.ReturnMsg = "系統發生錯誤"; } } else { MyCardQueryLogWcfB2B.Service1Client MyCardQueryLogWcfB2B = new MyCardQueryLogWcfB2B.Service1Client(); MyCardQueryLogWcfB2B.ReturnResult ReturnValueB2B = new MyCardQueryLogWcfB2B.ReturnResult(); try { MyCardQueryLogWcfB2B.Endpoint.Binding.ReceiveTimeout = new TimeSpan(0, 2, 0); ReturnValueB2B = MyCardQueryLogWcfB2B.ViewQueryLog(select, view, where, orderby, iseasyquery, strquery); ReturnResult.ReturnMsgNo = ReturnValueB2B.ReturnMsgNo; ReturnResult.ReturnMsg = ReturnValueB2B.ReturnMsg; ReturnResult.ReturnDS = ReturnValueB2B.ReturnDS; } catch (Exception ex) { OutValue = "|回應|" + "Exception|" + ex.ToString(); ErrorLog(InValue + OutValue); ReturnResult.ReturnMsgNo = -99; ReturnResult.ReturnMsg = "系統發生錯誤"; } } return ReturnResult; }