using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class 页面集_班级学科成绩表 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindListBoxyw();
            BindListBoxshx();
            BindListBoxkx();
            BindListBoxyy();
        }

    }
    private void BindListBoxyw()
    {
        lboxyw.Items.Clear();
        string path = Server.MapPath("../语文");
        string[] files = System.IO.Directory.GetFiles(path);
        foreach (string f in files)
        {
            string fileName = System.IO.Path.GetFileName(f);
            ListItem li = new ListItem(fileName, f);
            lboxyw.Items.Add(li);
        }
    }
    private void BindListBoxshx()
    {
        lboxshx.Items.Clear();
        string path = Server.MapPath("../数学");
        string[] files = System.IO.Directory.GetFiles(path);
        foreach (string f in files)
        {
            string fileName = System.IO.Path.GetFileName(f);
            ListItem li = new ListItem(fileName, f);
            lboxshx.Items.Add(li);
        }
    }
    private void BindListBoxyy()
    {
        lboxyy.Items.Clear();
        string path = Server.MapPath("../英语");
        string[] files = System.IO.Directory.GetFiles(path);
        foreach (string f in files)
        {
            string fileName = System.IO.Path.GetFileName(f);
            ListItem li = new ListItem(fileName, f);
            lboxyy.Items.Add(li);
        }
    }
    private void BindListBoxkx()
    {
        lboxkx.Items.Clear();
        string path = Server.MapPath("../科学");
        string[] files = System.IO.Directory.GetFiles(path);
        foreach (string f in files)
        {
            string fileName = System.IO.Path.GetFileName(f);
            ListItem li = new ListItem(fileName, f);
            lboxkx.Items.Add(li);
        }
    }
}
