Esempio n. 1
0
        private void bind()
        {
            D = new DemoEntities();
            var V = from O in D.OrderInfoes
                    select O;

            FormView.DataSource = V.ToList();
            FormView.DataBind();
        }
Esempio n. 2
0
        private void bind()
        {
            d = new DemoEntities();
            var v = from i in d.order_info
                    select i;

            FormView1.DataSource = v.ToList();
            FormView1.DataBind();
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bind();
            d = new DemoEntities();
            var v = from i in d.order_info
                    select i;

            gvdata.DataSource = v.ToList();
            gvdata.DataBind();
            dview.DataSource = v.ToList();
            dview.DataBind();
            //FormView1.DataSource = v.ToList();
            //FormView1.DataBind();
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bind();
            }
            D = new DemoEntities();
            var V = from O in D.OrderInfoes
                    select O;

            GridView.DataSource = V.ToList();
            GridView.DataBind();
            DetailsView.DataSource = V.ToList();
            DetailsView.DataBind();
        }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     D = new DemoEntities();
     if (!IsPostBack)
     {
         txtStart.Enabled  = false;
         txtEnd.Enabled    = false;
         ddlDeptNo.Enabled = false;
         var D1 = from d1 in D.DEPTDATAs
                  select d1;
         List <DEPTDATA> L = D1.ToList();
         ddlDeptNo.DataSource     = L;
         ddlDeptNo.DataTextField  = "Dname";
         ddlDeptNo.DataValueField = "Deptno";
         ddlDeptNo.DataBind();
     }
 }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     D   = new DemoEntities();
     Con = new SqlConnection(ConfigurationManager.ConnectionStrings["SqlCon"].ToString());
     Adp = new SqlDataAdapter("sp_ExtraxtDept", Con);
     if (!IsPostBack)
     {
         txtStart.Enabled              = false;
         txtEnd.Enabled                = false;
         ddlDeptNo.Enabled             = false;
         Adp.SelectCommand.CommandType = CommandType.StoredProcedure;
         DataSet DS = new DataSet();
         Adp.Fill(DS, "D");
         ddlDeptNo.DataSource     = DS.Tables["D"];
         ddlDeptNo.DataTextField  = "Dname";
         ddlDeptNo.DataValueField = "Deptno";
         ddlDeptNo.DataBind();
     }
 }
Esempio n. 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            d = new DemoEntities();

            var deptno = (from i in d.DEPTDATAs
                          select i).ToList();
            List <DEPTDATA> l = deptno;

            if (!IsPostBack)
            {
                txtstart.Enabled         = false;
                txtend.Enabled           = false;
                ddldeptno.Enabled        = false;
                ddldeptno.DataSource     = l;
                ddldeptno.DataTextField  = "dname";
                ddldeptno.DataValueField = "deptno";
                ddldeptno.DataBind();
            }



            //con = new SqlConnection(ConfigurationManager.ConnectionStrings["SqlCon"].ToString());
            //adp = new SqlDataAdapter("sp_ExtractDept", con);
            //if (!IsPostBack)
            //{
            //    txtstart.Enabled = false;
            //    txtend.Enabled = false;
            //    ddldeptno.Enabled = false;
            //    adp.SelectCommand.CommandType = CommandType.StoredProcedure;
            //    DataSet ds = new DataSet();
            //    adp.Fill(ds, "E");
            //    ddldeptno.DataSource = ds.Tables["E"];
            //    ddldeptno.DataTextField = "dname";
            //    ddldeptno.DataValueField = "deptno";
            //    ddldeptno.DataBind();
            //}
        }
Esempio n. 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     d = new DemoEntities();
 }