示例#1
0
        private void LoadAsLoggedIn()
        {
            // hide login controls
            txtCompany.Visible  = false;
            lblCompany.Visible  = false;
            txtLogin.Visible    = false;
            lblLogin.Visible    = false;
            txtPassword.Visible = false;
            lblPassword.Visible = false;
            chkForce.Visible    = false;
            chkRemember.Visible = false;
            btnLogin.Visible    = false;
            btnLogout.Visible   = true;


            //show change pass contrl if necessary
            if (_user.PasswordExpired)
            {
                this.cellPassChange.Visible = true;
                this.cellContents.Visible   = false;
                _navigationEnabled          = false;
            }
            else
            {
                this.cellContents.Visible   = true;
                this.cellPassChange.Visible = false;
                _navigationEnabled          = true;

                DashboardServiceServer.ClearReportsCache();
                _flashVarsString = string.Format("userId={0}&serviceUrl={1}",
                                                 _user.ID.ToString(),
                                                 Request.Url.AbsoluteUri.Replace("Default.aspx", "WebServices/DashboardService.aspx")
                                                 );
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        //FI.Common.LogWriter.Instance.WriteEventLogEntry("DashboardService request: " + Request.TotalBytes.ToString());
        //FI.Common.LogWriter.Instance.WriteEventLogEntry("DashboardService request: " + Request.UserHostAddress.ToString());
        byte[] commandBytes = Request.BinaryRead(Request.TotalBytes);
        string command      = Encoding.UTF8.GetString(commandBytes);
        string response     = DashboardServiceServer.ExecuteCommand(command);


        this.Response.Clear();
        if (response != null && response != "")
        {
            this.Response.BinaryWrite(Encoding.UTF8.GetBytes(response));
        }
        this.Response.End();
    }