コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var context = new LogicUniversityEntities();
                Departments.DataSource     = context.departments.Where(x => x.department_id != "STOR").Select(x => new { x.department_name, x.department_id }).ToList();
                Departments.DataTextField  = "department_name";
                Departments.DataValueField = "department_id";
                Departments.DataBind();
                foreach (ListItem chkitem in Departments.Items)
                {
                    chkitem.Selected = true;
                }

                ChangeROGraph();
            }
        }