Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (Session["userType"] != "admin")
            //{
            //    Response.Redirect("login.aspx");
            //}

            if (Session["userType"] == "admin")
            {
                var data = CompanyRepos.getCompanies();
                Companies_ListView.DataSource = data;
            }
            else if (Session["userType"] == "government")
            {
                var data = CompanyRepos.getGovernmentCompanies();
                Companies_ListView.DataSource = data;
            }

            Companies_ListView.DataBind();
        }