예제 #1
0
        private void bind()
        {
            d = new DemoEntities();
            var v = from o in d.vreport1
                    select o;

            FormView1.DataSource = v.ToList();
            FormView1.DataBind();
        }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     d = new DemoEntities();
     if (!IsPostBack)
     {
         txtstart.Enabled  = false;
         txtend.Enabled    = false;
         ddldeptno.Enabled = false;
         var h = from e1 in d.DEPTDATAs
                 select e1;
         List <DEPTDATA> i = h.ToList();
         ddldeptno.DataSource     = i;
         ddldeptno.DataTextField  = "dname";
         ddldeptno.DataValueField = "deptno";
         ddldeptno.DataBind();
     }
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     D = new DemoEntities();
 }