Ejemplo n.º 1
0
        //資料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;

        }
Ejemplo n.º 2
0
        //資料View查詢內容描述
        public ReturnDBResult ViewQueryNote(string view) //取得資料內容描述
        {
            ReturnDBResult ReturnResult = new ReturnDBResult();
            if (MyCardQueryLog.Properties.Settings.Default.In34.ToUpper() == "TRUE")
            {
                MyCardQueryLogWcf.Service1Client MyCardQueryLogWcf = new MyCardQueryLogWcf.Service1Client();
                MyCardQueryLogWcf.ReturnResult ReturnValueB2B = new MyCardQueryLogWcf.ReturnResult();

                InValue = "QueryDBTableNote";
                try
                {
                    ReturnValueB2B = MyCardQueryLogWcf.QueryDBTableNote(view);
                    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();
                InValue = "QueryDBTableNote";
                try
                {
                    ReturnValueB2B = MyCardQueryLogWcfB2B.QueryDBTableNote(view);
                    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; 
        }