public ReturnDBResult ViewQueryDBOrViewNote(string DbName) //取得資料庫資料 { ReturnDBResult ReturnResult = new ReturnDBResult(); InValue = "ViewQueryDBOrViewNote"; if (MyCardQueryLog.Properties.Settings.Default.In34.ToUpper() == "TRUE") { MyCardQueryLogWcf.Service1Client MyCardQueryLogWcf = new MyCardQueryLogWcf.Service1Client(); MyCardQueryLogWcf.ReturnResult ReturnValueB2B = new MyCardQueryLogWcf.ReturnResult(); try { ReturnValueB2B = MyCardQueryLogWcf.QueryDBOrViewNote(DbName); 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 { ReturnValueB2B = MyCardQueryLogWcfB2B.QueryDBOrViewNote(DbName); 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; }
public MyCardQueryLogWcf.ReturnResult QueryDBOrViewNote(string DbName) { MyCardQueryLogWcf.Service1Client MyCardQueryLogWcf = new MyCardQueryLogWcf.Service1Client(); MyCardQueryLogWcf.ReturnResult ReturnResult = new MyCardQueryLogWcf.ReturnResult(); try { ReturnResult = MyCardQueryLogWcf.QueryDBOrViewNote(DbName); } catch (Exception ex) { ReturnResult.ReturnMsgNo = -99; ReturnResult.ReturnMsg = "連線MyCardQueryLogWcf.QueryDBOrViewNote失敗" + ex.Message; return ReturnResult; } return ReturnResult; }