Example #1
0
        //static string prevPage;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                AccountGridView.Visible = false;
                //  prevPage = Request.UrlReferrer.AbsolutePath;
            }
            if (IsPostBack)
            {
                if (usernamehidden.Value == null)
                {
                    ErrorPanel.Visible = false;
                    Hide.Visible       = true;
                }
                else
                {
                    //if (prevPage.Contains("LoginPage"))
                    //{
                    AccountGridView.Visible = true;
                    string query = "SELECT [ID], [JobTitle], [CompanyName], [HasApplied], [DateAppCloses], [DateInterview], [DateOfferDeadline] FROM [AppliCanEntries] WHERE [Enabled] = 1  AND [AccountUser] = '" + usernamehidden.Value + "'";
                    //AccountInfoSqlDataSource.SelectCommand = AccountInfoSqlDataSource.SelectCommand + " AND [AccountUser] = '"+ usernamehidden.Value + "'";
                    AccountInfoSqlDataSource.SelectCommand = query;
                    AccountGridView.DataBind();
                    //AccountGridView.Visible = true;
                    //}
                    //else
                    //{

                    //}
                }
            }
        }
Example #2
0
 private void RefreshTable()
 {
     AccountGridView.DataSource = AccountController.viewAllAccounts();
     AccountGridView.DataBind();
 }