protected void BindGridviewData() { List<prod> L = new List<prod>(); prod p = new prod(); p.Product_Id = "2"; p.Product_name = "abc"; L.Add(p); p = new prod(); p.Product_Id = "3"; p.Product_name = "4abc"; L.Add(p); p = new prod(); p.Product_Id = "4"; p.Product_name = "ffabc"; L.Add(p); //SqlConnection con = new SqlConnection("Data Source=MYSystem;Initial Catalog=MySamplesDB;Integrated Security=True"); //con.Open(); //SqlCommand cmd = new SqlCommand("select UserId,UserName,FirstName,LastName,Location from User_Information", con); //SqlDataAdapter da = new SqlDataAdapter(cmd); //DataSet ds = new DataSet(); //da.Fill(ds); // productlist.GetAllProductsSoapClient s = new productlist.GetAllProductsSoapClient(); // productlist.ProductClass[] pc = s.GetProductsByZipAndServiceID("2", 10003); gvdata.DataSource = L; gvdata.DataBind(); // con.Close(); }
protected void Page_Load(object sender, EventArgs e) { Session["User"] = Session["Name"].ToString(); if (!IsPostBack) { List<prod> L = new List<prod>(); prod p = new prod(); p.Product_Id = "1"; p.Product_name = "Wireline Fios tv Services"; L.Add(p); p = new prod(); p.Product_Id = "2"; p.Product_name = "Wireline Fios Data Services"; L.Add(p); p = new prod(); p.Product_Id = "3"; p.Product_name = "Wireline Fios Voice Services"; L.Add(p); p = new prod(); p.Product_Id = "4"; p.Product_name = "Wireless Service"; L.Add(p); Session["User"] = Session["Name"].ToString(); getservice.Service1SoapClient f = new getservice.Service1SoapClient(); getservice.Class2[] mn = f.getservice((Convert.ToInt32(Session["Name"]))); gvdata.DataSource = L; gvdata.DataBind(); } }
protected void BindGridviewData() { List <prod> L = new List <prod>(); prod p = new prod(); p.Product_Id = "2"; p.Product_name = "abc"; L.Add(p); p = new prod(); p.Product_Id = "3"; p.Product_name = "4abc"; L.Add(p); p = new prod(); p.Product_Id = "4"; p.Product_name = "ffabc"; L.Add(p); //SqlConnection con = new SqlConnection("Data Source=MYSystem;Initial Catalog=MySamplesDB;Integrated Security=True"); //con.Open(); //SqlCommand cmd = new SqlCommand("select UserId,UserName,FirstName,LastName,Location from User_Information", con); //SqlDataAdapter da = new SqlDataAdapter(cmd); //DataSet ds = new DataSet(); //da.Fill(ds); // productlist.GetAllProductsSoapClient s = new productlist.GetAllProductsSoapClient(); // productlist.ProductClass[] pc = s.GetProductsByZipAndServiceID("2", 10003); gvdata.DataSource = L; gvdata.DataBind(); // con.Close(); }
protected void Page_Load(object sender, EventArgs e) { Session["User"] = Session["Name"].ToString(); if (!IsPostBack) { List <prod> L = new List <prod>(); prod p = new prod(); p.Product_Id = "1"; p.Product_name = "Wireline Fios tv Services"; L.Add(p); p = new prod(); p.Product_Id = "2"; p.Product_name = "Wireline Fios Data Services"; L.Add(p); p = new prod(); p.Product_Id = "3"; p.Product_name = "Wireline Fios Voice Services"; L.Add(p); p = new prod(); p.Product_Id = "4"; p.Product_name = "Wireless Service"; L.Add(p); Session["User"] = Session["Name"].ToString(); getservice.Service1SoapClient f = new getservice.Service1SoapClient(); getservice.Class2[] mn = f.getservice((Convert.ToInt32(Session["Name"]))); gvdata.DataSource = L; gvdata.DataBind(); } }