コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     T = new TestEntities();
     if (!IsPostBack)
     {
         txtStart.Enabled  = false;
         txtEnd.Enabled    = false;
         ddlDeptno.Enabled = false;
         var E = from E1 in T.DEPTDATAs
                 select E1;
         List <DEPTDATA> L = E.ToList();
         ddlDeptno.DataSource     = L;
         ddlDeptno.DataTextField  = "Dname";
         ddlDeptno.DataValueField = "deptno";
         ddlDeptno.DataBind();
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     T = new TestEntities();
 }