Esempio n. 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            DataSourceSelectArguments args = new DataSourceSelectArguments();
            DataView  dv = (DataView)Sql_Produse_Data_Source.Select(args);
            DataTable dt = dv.ToTable();
            DataSet   ds = new DataSet();

            ds.Tables.Add(dt);
            Cache["CacheProduse"] = ds;
        }
Esempio n. 2
0
        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Console.WriteLine("A intrat");
            DataSourceSelectArguments args = new DataSourceSelectArguments();
            //incarcam args din select
            DataView  dv = (DataView)Sql_Produse_Data_Source.Select(args);
            DataTable dt = dv.ToTable();
            DataSet   ds = new DataSet();

            ds.Tables.Add(dt);
            Cache["CacheProduse"] = ds;
            Console.WriteLine(DropDownList1.SelectedItem.Text);
            Response.Redirect("/Products_Graph.aspx?tip=" + DropDownList1.SelectedItem.Text);
            DropDownList1.SelectedIndex = 0;
        }