public void ShowAllData(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn) { OleExec sfcdb = null; try { sfcdb = this.DBPools["SFCDB"].Borrow(); T_C_STATION cStation = new T_C_STATION(sfcdb, DB_TYPE_ENUM.Oracle); List <C_STATION_DETAIL> list = new List <C_STATION_DETAIL>(); list = cStation.ShowAllData(sfcdb); if (list.Count > 0) { StationReturn.Data = list; StationReturn.Status = StationReturnStatusValue.Pass; StationReturn.MessageCode = "MES00000001"; } else { StationReturn.Status = StationReturnStatusValue.Fail; StationReturn.MessageCode = "MES00000034"; StationReturn.Data = ""; } this.DBPools["SFCDB"].Return(sfcdb); } catch (Exception e) { this.DBPools["SFCDB"].Return(sfcdb); throw e; } }
public void ShowAllData(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn) { OleExec sfcdb = this.DBPools["SFCDB"].Borrow(); try { T_C_STATION cStation = new T_C_STATION(sfcdb, DB_TYPE_ENUM.Oracle); List <C_STATION_DETAIL> list = new List <C_STATION_DETAIL>(); list = cStation.ShowAllData(sfcdb); if (list.Count > 0) { StationReturn.Data = list; StationReturn.Status = "1"; StationReturn.Message = "OK"; } else { StationReturn.Status = "0"; StationReturn.Message = "No data found"; } } catch (Exception e) { StationReturn.Message = e.Message; StationReturn.Status = "0"; } finally { this.DBPools["SFCDB"].Return(sfcdb); } }