Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        MessageLabel.Text = string.Empty;

        dbOps = DBOperations.Instance;
        links = Links.Instance;
        general = General.Instance;
        gui = GUIVariables.Instance;
        engine = ProcessingEngine.Instance;

        #region CookieAlreadyExists
        //  START: If a getputsCookie with the Username already exists, do not show the Login Page.

        if (Request.Cookies["getputsCookie"] != null)
        {
            HttpCookie getputsCookie = Request.Cookies["getputsCookie"];
            UID = dbOps.Decrypt(getputsCookie["UID"].ToString().Trim());
        }
        if (string.IsNullOrEmpty(UID))
        {
            if (general.IsUserAdministrator(UID))
            {

            }
            else
            {
                Response.Redirect(links.FrontPageLink, false);
            }
        }
        //  END: If a getputsCookie with the Username already exists, do not show the Login Page.
        #endregion CookieAlreadyExists

        //if (!IsPostBack)
        //{
        //    string queryString = @"SELECT * FROM getputs.item;";
        //    PopulateItemGridView(queryString);
        //}

        if(!IsPostBack)
            MaxRowsTB.Text = maxRows.ToString();
    }