protected void Page_Load(object sender, EventArgs e)
        {
            //string a = Request.QueryString["v1"].ToString();
            //Session["User"] = Session["Name"].ToString();
            //int zipcode = 0;

            {
                int zipcode = 0;
                string a = Request.QueryString["v1"].ToString();
                Session["User"] = Session["Name"].ToString();

                //OleDbConnection cn = new OleDbConnection("Provider=MSDAORA;Data Source=192.168.0.217/orcl;Persist Security Info=True;User ID=hr;Password=hr;");
                ////  var con = new SqlConnection("Provider=OraOLEDB.Oracle;User Id=scott;Password=tiger;");
                //cn.Open();
                //var cmd = new OleDbCommand("select zipcode from address where address_id=(select billing_address_id from customer where customer_id='" + Session["Name"] + "'", cn);

                //OleDbDataReader R = cmd.ExecuteReader();

                //if (R.Read())
                //    zipcode = Int32.Parse(R[0].ToString());

                productlist.GetAllProductsSoapClient s = new productlist.GetAllProductsSoapClient();
                productlist.ProductClass[] pc = s.GetProductsByZipAndServiceID(a, 10001);
                int g = pc.Count();
                if (g == 1)
                {
                    Response.Redirect("displayproductone.aspx");
                }
                else
                {
                    gvdata.DataSource = pc;
                    gvdata.DataBind();
                }
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string a = Request.QueryString["v1"].ToString();
            string b = Request.QueryString["v2"].ToString();
            productlist.GetAllProductsSoapClient s = new productlist.GetAllProductsSoapClient();
            productlist.ProductClass[] pc = s.GetProductsByZipAndServiceID(a, int.Parse(b));
            updateproduct.Service1SoapClient x = new updateproduct.Service1SoapClient();
            string k = pc[0].Product_ID;
            int i = x.product_service(a, product_id.Text, 22);
            if (product_id.Text == k)
            {
                if (i == 1)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert(' Your Service is updated.Have a nice day')", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Sorry Server is down.Will try to reach you')", true);
                }
            }

            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert(' You Entered incorrect product Id,Please Check ')", true);
                }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     productlist.GetAllProductsSoapClient s = new productlist.GetAllProductsSoapClient();
     productlist.ProductClass[] pc = s.GetProductsByZipAndServiceID("2",10003);
     GridView1.DataSource = pc;
     GridView1.DataBind();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            string a = Request.QueryString["v1"].ToString();
            string b = Request.QueryString["v2"].ToString();
            productlist.GetAllProductsSoapClient s = new productlist.GetAllProductsSoapClient();
            productlist.ProductClass[] pc = s.GetProductsByZipAndServiceID(a, int.Parse(b));
            int i = pc.Count();

            if (i == 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert(' Sorry This service is not available at your place.Please try another.Thank You ')", true);

            }
            else
            {
                GridView1.DataSource = pc;
                GridView1.DataBind();
            }
        }