コード例 #1
0
        private void bind()
        {
            D = new DemoEntities();
            var V = from O in D.OrderInfoes
                    select O;

            FormView.DataSource = V.ToList();
            FormView.DataBind();
        }
コード例 #2
0
        private void bind()
        {
            d = new DemoEntities();
            var v = from i in d.order_info
                    select i;

            FormView1.DataSource = v.ToList();
            FormView1.DataBind();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #5
0
ファイル: Ado1.aspx.cs プロジェクト: RachanaReddy47/DemoWeb
 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();
     }
 }
コード例 #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();
     }
 }
コード例 #7
0
ファイル: WebForm3.aspx.cs プロジェクト: Anusha1104/DemoWeb
        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();
            //}
        }
コード例 #8
0
ファイル: Update.aspx.cs プロジェクト: Anusha1104/DemoWeb
 protected void Page_Load(object sender, EventArgs e)
 {
     d = new DemoEntities();
 }