//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(); } }
protected void OnButtonClick(object sender, EventArgs e) { //Event handler for command button clicked Button btn = (Button)sender; switch (btn.ID) { case "btnDelete": long id = Convert.ToInt64(this.grdLog.SelectedDataKey.Value); Argix.AppService logger = new Argix.AppService(); bool ret = logger.DeleteLogEntry(id); if (ret) { this.grdLog.DataBind(); } break; } }
//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(); } }
protected void OnConfigurationRowCommand(object sender, GridViewCommandEventArgs e) { //Event handler for row command event switch (e.CommandName) { case "Insert": Label lblApplication = (Label)this.grdConfig.FooterRow.FindControl("lblApplication"); Label lblUserName = (Label)this.grdConfig.FooterRow.FindControl("lblUserName"); TextBox txtKey = (TextBox)this.grdConfig.FooterRow.FindControl("txtKey"); TextBox txtValue = (TextBox)this.grdConfig.FooterRow.FindControl("txtValue"); Argix.AppService config = new Argix.AppService(); bool created = config.CreateConfigurationEntry(lblApplication.Text, lblUserName.Text, txtKey.Text, txtValue.Text, "1"); this.grdConfig.DataBind(); this.grdConfig.ShowFooter = false; break; case "Cancel": this.grdConfig.ShowFooter = false; break; } }
//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(); } }