Example #1
0
        private void BindCampus()
        {
            try
            {
                DataTable dtCampus = new DataTable();
                dtCampus = DataAccessManager.GetCampusUserRole();
                Rddlcampus.DataSource     = dtCampus;
                Rddlcampus.DataTextField  = "CampusName";
                Rddlcampus.DataValueField = "CampusID";
                Rddlcampus.DataBind();

                if (Convert.ToString(Session["user_level"]) != "99")
                {
                    string CampusID = string.Empty;
                    CampusID = Convert.ToString(Session["CampusID"]);
                    Rddlcampus.SelectedValue = CampusID;
                    Rddlcampus.Enabled       = false;
                    BindRole(CampusID);
                }
                else
                {
                    BindRole("");
                    Rddlcampus.SelectedIndex = 0;
                }
            }
            catch (Exception ex)
            {
            }
        }