public Terminals GetTerminals() { //Get Argix terminals Terminals terminals = null; try { terminals = new Terminals(); DataSet ds = fillDataset(USP_TERMINALS, TBL_TERMINALS, new object[] { }); if (ds != null && ds.Tables[TBL_TERMINALS].Rows.Count > 0) { EnterpriseDS _ds = new EnterpriseDS(); _ds.Merge(ds); for (int i = 0; i < _ds.TerminalTable.Rows.Count; i++) { Terminal t = new Terminal(); t.TerminalID = Convert.ToInt32(ds.Tables[TBL_TERMINALS].Rows[i]["TerminalID"]); t.Number = ds.Tables[TBL_TERMINALS].Rows[i]["Number"].ToString().Trim(); t.Description = ds.Tables[TBL_TERMINALS].Rows[i]["Description"].ToString().Trim(); t.AgentID = ds.Tables[TBL_TERMINALS].Rows[i]["AgentID"].ToString().Trim(); terminals.Add(t); } } } catch (Exception ex) { throw new FaultException <EnterpriseFault>(new EnterpriseFault(new ApplicationException("Unexpected error while reading Argix terminals.", ex))); } return(terminals); }
public Terminals GetEnterpriseAgents() { // Terminals agents = new Terminals(); DataSet ds = new DataService().FillDataset(this.mConnectionID, USP_ENTERPRISEAGENTS, TBL_ENTERPRISEAGENTS, null); if (ds.Tables[TBL_ENTERPRISEAGENTS].Rows.Count > 0) { for (int i = 0; i < ds.Tables[TBL_ENTERPRISEAGENTS].Rows.Count; i++) { agents.Add(new Terminal(ds.Tables[TBL_ENTERPRISEAGENTS].Rows[i]["AgentNumber"].ToString(), ds.Tables[TBL_ENTERPRISEAGENTS].Rows[i]["Description"].ToString())); } } return(agents); }
public Argix.Enterprise.Terminals GetTerminals() { //Returns a list of terminals Argix.Enterprise.Terminals terminals = null; try { terminals = new Argix.Enterprise.Terminals(); DataSet ds = new TLViewerGateway().GetTerminals(); if (ds != null) { EnterpriseDataset tDS = new EnterpriseDataset(); tDS.Merge(ds); for (int i = 0; i < tDS.TerminalTable.Rows.Count; i++) { Argix.Enterprise.Terminal terminal = new Argix.Enterprise.Terminal(tDS.TerminalTable[i]); terminals.Add(terminal); } } } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } return(terminals); }
public Terminals GetTerminals() { //Returns a list of terminals Terminals terminals = null; try { terminals = new Terminals(); DataSet ds = fillDataset(USP_TERMINALS, TBL_TERMINALS, new object[] {}); if (ds != null && ds.Tables[TBL_TERMINALS].Rows.Count > 0) { for (int i = 0; i < ds.Tables[TBL_TERMINALS].Rows.Count; i++) { Terminal terminal = new Terminal(); terminal.TerminalID = Convert.ToInt32(ds.Tables[TBL_LOCALTERMINAL].Rows[i]["TerminalID"]); terminal.Number = ds.Tables[TBL_LOCALTERMINAL].Rows[i]["Number"].ToString().Trim(); terminal.Description = ds.Tables[TBL_LOCALTERMINAL].Rows[i]["Description"].ToString().Trim(); terminals.Add(terminal); } } } catch (Exception ex) { throw new ApplicationException("Unexpected error while reading terminals.", ex); } return(terminals); }