Пример #1
0
    //Interface
    protected void Page_Load(object sender, EventArgs e)
    {
        //
        if (!Page.IsPostBack)
        {
            //Display local terminal name
            Argix.AppService   config = new Argix.AppService();
            Argix.TerminalInfo info   = config.GetTerminalInfo();
            this.mTerminal        = info.Description + " (" + info.Number + ") : " + info.Connection;
            ViewState["Terminal"] = this.mTerminal;

            //
            this.cboApp.DataBind();
            if (this.cboApp.Items.Count > 0)
            {
                this.cboApp.SelectedIndex = 0;
            }
            OnAppChanged(this.cboApp, EventArgs.Empty);
            setServices();
        }
        else
        {
            this.mTerminal = ViewState["Terminal"].ToString();
        }
    }
Пример #2
0
        public TerminalInfo GetTerminalInfo()
        {
            //Get information about the local terminal for this service
            TerminalInfo info = new TerminalInfo();

            info.Connection = DatabaseFactory.CreateDatabase("SQLConnection").ConnectionStringWithoutCredentials;
            DataSet ds = fillDataset(USP_LOCALTERMINAL, TBL_LOCALTERMINAL, new object[] {});

            if (ds != null && ds.Tables[TBL_LOCALTERMINAL].Rows.Count > 0)
            {
                info.TerminalID  = Convert.ToInt32(ds.Tables[TBL_LOCALTERMINAL].Rows[0]["TerminalID"]);
                info.Number      = ds.Tables[TBL_LOCALTERMINAL].Rows[0]["Number"].ToString().Trim();
                info.Description = ds.Tables[TBL_LOCALTERMINAL].Rows[0]["Description"].ToString().Trim();
            }
            return(info);
        }
Пример #3
0
        public TerminalInfo GetTerminalInfo()
        {
            //Get the operating enterprise terminal
            TerminalInfo terminal = null;
            KronosClient _Client  = null;

            try {
                _Client  = new KronosClient();
                terminal = _Client.GetTerminalInfo();
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetTerminalInfo() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetTerminalInfo() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetTerminalInfo() communication error.", ce); }
            return(terminal);
        }
Пример #4
0
        public TerminalInfo GetTerminalInfo()
        {
            //Get information about the local terminal for this service
            TerminalInfo info = null;

            try {
                info            = new TerminalInfo();
                info.Connection = DatabaseFactory.CreateDatabase(this.mConnectionID).ConnectionStringWithoutCredentials;
                DataSet ds = new DataService().FillDataset(this.mConnectionID, USP_LOCALTERMINAL, TBL_LOCALTERMINAL, new object[] { });
                if (ds != null && ds.Tables[TBL_LOCALTERMINAL].Rows.Count > 0)
                {
                    info.TerminalID  = Convert.ToInt32(ds.Tables[TBL_LOCALTERMINAL].Rows[0]["TerminalID"]);
                    info.Number      = ds.Tables[TBL_LOCALTERMINAL].Rows[0]["Number"].ToString().Trim();
                    info.Description = ds.Tables[TBL_LOCALTERMINAL].Rows[0]["Description"].ToString().Trim();
                }
            }
            catch (Exception ex) { throw new FaultException <ConfigurationFault>(new ConfigurationFault(new ApplicationException("Unexpected error while reading terminal information.", ex))); }
            return(info);
        }
Пример #5
0
    //Interface
    protected void Page_Load(object sender, EventArgs e)
    {
        //
        if (!Page.IsPostBack)
        {
            //Display local terminal name
            Argix.AppService   config = new Argix.AppService();
            Argix.TerminalInfo info   = config.GetTerminalInfo();
            this.mTerminal        = info.Description + " (" + info.Number + ") : " + info.Connection;
            ViewState["Terminal"] = this.mTerminal;

            this.lblApp.Text  = this.Request.QueryString["app"];
            this.lblUser.Text = this.Request.QueryString["user"];
            this.grdConfig.DataBind();
        }
        else
        {
            this.mTerminal = ViewState["Terminal"].ToString();
        }
    }
Пример #6
0
    //Interface
    protected void Page_Load(object sender, EventArgs e)
    {
        //
        if (!Page.IsPostBack)
        {
            //Get query info
            this.mLogName = Request.QueryString["log"];
            this.mSource  = Request.QueryString["src"];

            //Display local terminal name
            Argix.AppService   logger = new Argix.AppService();
            Argix.TerminalInfo info   = logger.GetTerminalInfo();
            this.mTerminal        = info.Description + " (" + info.Number + ") : " + info.Connection;
            ViewState["Terminal"] = this.mTerminal;

            //Setup the log
            this.cboLog.DataBind();
            if (this.mLogName != null && this.mLogName.Trim().Length > 0)
            {
                if (this.cboLog.Items.Count > 0)
                {
                    this.cboLog.SelectedValue = this.mLogName;
                }
            }
            else
            {
                if (this.cboLog.Items.Count > 0)
                {
                    this.cboLog.SelectedIndex = 0;
                }
            }
            OnLogNameChanged(this.cboLog, EventArgs.Empty);
            setServices();
        }
        else
        {
            this.mTerminal = ViewState["Terminal"].ToString();
        }
    }