Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //BindDatalist();
        string StartSRate;
        string EndSRate;

        if (this.IsPostBack == false)
        {
            LblCategoryId.Text    = Request.QueryString["Scat"];
            Session["CategoryId"] = LblCategoryId.Text;
        }


        SqlConnection ObjConnection = new SqlConnection(Common.C_ConnectionString);

        ObjConnection.Open();

        SqlCommand ObjCommand = new SqlCommand();

        ObjCommand.Connection  = ObjConnection;
        ObjCommand.CommandText = "SubCategoryImage";
        ObjCommand.CommandType = CommandType.StoredProcedure;
        ObjCommand.Parameters.AddWithValue("@CategoryId", Convert.ToInt32(LblCategoryId.Text));

        //DataTable dt = new DataTable();

        SqlDataAdapter ObjDataAdapter     = new SqlDataAdapter(ObjCommand);
        DataSet        dsSubCategoryImage = new DataSet();

        ObjDataAdapter.Fill(dsSubCategoryImage);



        DataSubCategoryList.DataSource = dsSubCategoryImage;
        DataSubCategoryList.DataBind();


        ////////Image1.ImageUrl = "~/Image/" + dt.Rows[0]["Image"];
        ////////Image1.PostBackUrl = "~/Cosubcart.aspx?Cscat=" + dt.Rows[0]["SubCategoryId"];
        ////////Image2.ImageUrl = "~/Image/" + dt.Rows[1]["Image"];
        ////////Image2.PostBackUrl = "~/Cosubcart.aspx?Cscat=" + dt.Rows[1]["SubCategoryId"];
        ////////Image3.ImageUrl = "~/Image/" + dt.Rows[2]["Image"];
        ////////Image3.PostBackUrl = "~/Cosubcart.aspx?Cscat=" + dt.Rows[2]["SubCategoryId"];
        ////////Image4.ImageUrl = "~/Image/" + dt.Rows[3]["Image"];
        ////////Image4.PostBackUrl = "~/Cosubcart.aspx?Cscat=" + dt.Rows[3]["SubCategoryId"];
    }
Exemple #2
0
    protected void PriceRadio_SelectedIndexChanged1(object sender, EventArgs e)
    {
        if (Master.PriceRadio.SelectedIndex == 0)
        {
            //BindSerchData();
            string        StartSRate    = "0";
            string        EndSRate      = "900";
            SqlConnection ObjConnection = new SqlConnection(Common.C_ConnectionString);
            ObjConnection.Open();

            SqlCommand ObjCommand = new SqlCommand();
            ObjCommand.Connection  = ObjConnection;
            ObjCommand.CommandText = "ProductsearchPrice";
            ObjCommand.CommandType = CommandType.StoredProcedure;


            ObjCommand.Parameters.AddWithValue("@cATEGORYID_LIST", Convert.ToInt32(LblCategoryId.Text));
            ObjCommand.Parameters.AddWithValue("@StartSRate", StartSRate.ToString());
            ObjCommand.Parameters.AddWithValue("@EndSRate", EndSRate.ToString());

            //DataTable dt = new DataTable();

            SqlDataAdapter ObjDataAdapter       = new SqlDataAdapter(ObjCommand);
            DataSet        dsProductsearchPrice = new DataSet();
            ObjDataAdapter.Fill(dsProductsearchPrice);

            DataSubCategoryList.DataSource = dsProductsearchPrice;
            DataSubCategoryList.DataBind();
        }
        else if (Master.PriceRadio.SelectedIndex == 1)
        {
            //StartSRate = "0";
            //EndSRate = "1000";
        }
        else if (Master.PriceRadio.SelectedIndex == 2)
        {
            Lblmsg.Text = "ccc";
        }
    }