示例#1
0
    protected void imgBtn_Odberi_Click(object sender, ImageClickEventArgs e)
    {
        ImageButton  imgBtnIzbrisiClicked = (ImageButton)sender;
        DataListItem SelectedItem         = (DataListItem)imgBtnIzbrisiClicked.NamingContainer;
        Label        Slika_Id             = (Label)SelectedItem.FindControl("lbl_Slika_Id");

        SqlConnection connection = new SqlConnection();

        connection.ConnectionString = ConfigurationManager.ConnectionStrings["Konekcija"].ConnectionString;
        SqlCommand komanda = new SqlCommand();

        komanda.Connection  = connection;
        komanda.CommandText = @"UPDATE Pozadina SET Aktivna = 0 ; UPDATE Pozadina SET Aktivna = 1 WHERE Pozadina_Id = " + Slika_Id.Text;

        try
        {
            connection.Open();
            komanda.ExecuteNonQuery();
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "AlertPopup", "alert('Успешна промена!');", true);
        }
        finally
        { connection.Close(); }

        DS_SiteSliki.SelectCommand = "SELECT * FROM Pozadina";
        DS_SiteSliki.DataBind();
        DataList6.DataBind();
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //显示用户信息
        localhost.Service myBBS = new localhost.Service();

        DataSet userInforDS = myBBS.GetUserInfo(Session["username"].ToString());

        DataList1.DataSource = userInforDS.Tables["UserInfor"].DefaultView;
        DataList1.DataBind();

        //显示所有用户发表的帖子
        DataSet titleListDS1 = myBBS.GetUserTitle(Session["username"].ToString(), "站务通知");

        DataList2.DataSource = titleListDS1.Tables["TitleList"].DefaultView;
        DataList2.DataBind();
        DataSet titleListDS2 = myBBS.GetUserTitle(Session["username"].ToString(), "文化艺术");

        DataList4.DataSource = titleListDS2.Tables["TitleList"].DefaultView;
        DataList4.DataBind();
        DataSet titleListDS3 = myBBS.GetUserTitle(Session["username"].ToString(), "休闲娱乐");

        DataList5.DataSource = titleListDS3.Tables["TitleList"].DefaultView;
        DataList5.DataBind();
        DataSet titleListDS4 = myBBS.GetUserTitle(Session["username"].ToString(), "学习天地");

        DataList6.DataSource = titleListDS4.Tables["TitleList"].DefaultView;
        DataList6.DataBind();
        DataSet titleListDS5 = myBBS.GetUserTitle(Session["username"].ToString(), "信息技术");

        DataList7.DataSource = titleListDS5.Tables["TitleList"].DefaultView;
        DataList7.DataBind();
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataList4.DataSource = data.GetDataReader("select * from Musictype");
            DataList4.DataBind();

            DataList6.DataSource = data.GetDataReader("select * from Singer");
            DataList6.DataBind();

            DataList5.DataSource = data.GetDataReader("select * from Album");
            DataList5.DataBind();

            Datalist3.DataSource = data.GetDataReader("select top 8 * from News");
            Datalist3.DataBind();



            DataList1.DataSource = data.GetDataReader("select top 6 * from Music  where  IsCheck='1' order  by  id desc  ");
            DataList1.DataBind();


            DataList2.DataSource = data.GetDataReader("select top 6 * from Music  where  IsCheck='1' order  by  clk desc  ");
            DataList2.DataBind();
            if (Session["users"] != null)
            {
                table2.Visible = true;
                TABLE1.Visible = false;
                MName.Text     = Session["users"].ToString();
            }
        }
    }
示例#4
0
 public void getdata()
 {
     DataList1.DataBind();
     DataList2.DataBind();
     DataList3.DataBind();
     DataList4.DataBind();
     DataList5.DataBind();
     DataList6.DataBind();
     DataList7.DataBind();
 }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataList1.DataSource = db.GetProducts();
                DataList1.DataBind();


                DataList6.DataSource = db.GetAllCategory();
                DataList6.DataBind();
            }
        }
示例#6
0
    private void gg()
    {
        string          sSql = "select * from Notice order by id desc";
        SQL             s    = new SQL();
        DataSet         ds   = s.DSSearch(sSql);         // s.DSSearch(sSql);
        PagedDataSource pds  = new PagedDataSource();    //初始化PagedDataSource实例,主要用做DataList1的分页使用

        pds.AllowPaging      = true;                     //允许分页
        pds.PageSize         = 6;                        //每页显示7条
        pds.DataSource       = ds.Tables[0].DefaultView; //将检索出的ds数据集绑定给PagedDataSource实例pds
        DataList6.DataSource = pds;                      //将pds内容最终绑定给DataList1,呈现到界面中
        DataList6.DataBind();
    }
    public void Load()
    {
        DataList3.DataSource = op.SelectImage("手机", 5);
        DataList3.DataBind();
        DataList4.DataSource = op.SelectImage("电器城", 5);
        DataList4.DataBind();
        DataList5.DataSource = op.SelectImage("西西超市", 5);
        DataList5.DataBind();
        DataList6.DataSource = op.SelectImage("西西生活", 5);
        DataList6.DataBind();
        DataList7.DataSource = op.SelectImage("有我你更美", 5);
        DataList7.DataBind();
        DataList8.DataSource = op.SelectImage("智能硬件", 5);
        DataList8.DataBind();

        midImage.DataSource = op.SelectImage("pimage", 5);
        midImage.DataBind();

        DataList9.DataSource = op.SelectImage("手机", 10);
        DataList9.DataBind();
        DataList10.DataSource = op.SelectImage("电器城", 10);
        DataList10.DataBind();
        DataList11.DataSource = op.SelectImage("西西超市", 10);
        DataList11.DataBind();
        DataList12.DataSource = op.SelectImage("西西生活", 10);
        DataList12.DataBind();
        DataList13.DataSource = op.SelectImage("智能硬件", 10);
        DataList13.DataBind();
        DataList14.DataSource = op.SelectImage("有我你更美", 10);
        DataList14.DataBind();
        DataList15.DataSource = op.SelectImage("办公设备", 10);
        DataList15.DataBind();
        DataList16.DataSource = op.SelectImage("西西商城", 10);
        DataList16.DataBind();

        DataList17.DataSource = op.SelectNewInfo(10);
        DataList17.DataBind();


        Phone.DataSource = op.SelectPhone(10);
        Phone.DataBind();

        Life.DataSource = op.SelectImage("西西生活", 10);
        Life.DataBind();

        Electric.DataSource = op.SelectImage("电器城", 10);
        Electric.DataBind();

        Beauty.DataSource = op.SelectImage("有我你更美", 10);
        Beauty.DataBind();
    }
示例#8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     GetGoodsInfo();
     DataList3.DataSource = op.SelectImage("手机", 5);
     DataList3.DataBind();
     DataList4.DataSource = op.SelectImage("电器城", 5);
     DataList4.DataBind();
     DataList5.DataSource = op.SelectImage("西西超市", 5);
     DataList5.DataBind();
     DataList6.DataSource = op.SelectImage("西西生活", 5);
     DataList6.DataBind();
     DataList7.DataSource = op.SelectImage("有我你更美", 5);
     DataList7.DataBind();
     DataList8.DataSource = op.SelectImage("智能硬件", 5);
     DataList8.DataBind();
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str;
            str = "select * from Screen_managment where category = 'Hollywood'";


            SqlCommand cmd = new SqlCommand(str, con);

            con.Open();

            SqlDataReader dr;
            dr = cmd.ExecuteReader();

            DataList6.DataSource = dr;
            DataList6.DataBind();
        }
    }
示例#10
0
    //int di;
    protected void Page_Load(object sender, EventArgs e)
    {
        GetGoodsInfo();

        Label123.Text = Session["UserName"].ToString();


        //DataList1.DataSource = op.SelectInfo();
        //DataList1.DataBind();
        DataList3.DataSource = op.SelectImage("手机", 5);
        DataList3.DataBind();
        DataList4.DataSource = op.SelectImage("电器城", 5);
        DataList4.DataBind();
        DataList5.DataSource = op.SelectImage("西西超市", 5);
        DataList5.DataBind();
        DataList6.DataSource = op.SelectImage("西西生活", 5);
        DataList6.DataBind();
        DataList7.DataSource = op.SelectImage("有我你更美", 5);
        DataList7.DataBind();
        DataList8.DataSource = op.SelectImage("智能硬件", 5);
        DataList8.DataBind();
    }
示例#11
0
    protected void InsertPozadina()
    {
        if (Upload.HasFile)
        {
            string FileName = System.IO.Path.GetFileName(Upload.PostedFile.FileName);
            int    len      = Upload.PostedFile.ContentLength;
            byte[] pic      = new byte[len];
            Upload.PostedFile.InputStream.Read(pic, 0, len);

            String Url = tbPozadinaUrl.Text.Replace("'", "''");
            if (Url.StartsWith("www"))
            {
                Url = "http://" + Url;
            }

            SqlConnection connection = new SqlConnection();
            connection.ConnectionString = ConfigurationManager.ConnectionStrings["Konekcija"].ConnectionString;
            SqlCommand komanda = new SqlCommand();
            komanda.Connection  = connection;
            komanda.CommandText = @"INSERT INTO Pozadina (Pozadina, Aktivna, Url) Values (@Reklama, 0, '" + Url + "')";

            komanda.Parameters.Add("@Reklama", pic);
            try
            {
                connection.Open();
                komanda.ExecuteNonQuery();
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "AlertPopup", "alert('Позадината е прикачена!');", true);
            }
            finally
            { connection.Close(); }
            DS_SiteSliki.SelectCommand = "SELECT * FROM Pozadina";
            DS_SiteSliki.DataBind();

            DataList6.DataBind();
        }
    }
示例#12
0
        private void Restaurent()
        {
            string        mainconn      = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            SqlConnection sqlConnection = new SqlConnection(mainconn);
            //var button = (Control)sender;
            //var answerLabel = NamingContainer.FindControl("placename");
            string sqlquery = "select * from [dbo].[RestaurentInfo] where PlaceName=@PlaceName";

            SqlCommand sqlCommand = new SqlCommand(sqlquery, sqlConnection);

            sqlConnection.Open();
            sqlCommand.Parameters.AddWithValue("@PlaceName", Request.QueryString["PlaceName"]);

            SqlDataReader sdr = sqlCommand.ExecuteReader();

            if (sdr.HasRows)
            {
                sdr.Close();
                SqlDataAdapter sda = new SqlDataAdapter();
                sda.SelectCommand = sqlCommand;
                DataSet ds = new DataSet();
                sda.Fill(ds);
                b = ds.Tables[0].Rows.Count;
                DataTable       dt  = ds.Tables[0];
                PagedDataSource pg2 = new PagedDataSource();
                pg2.DataSource       = dt.DefaultView;
                pg2.AllowPaging      = true;
                pg2.CurrentPageIndex = a;
                pg2.PageSize         = 4;
                Button9.Visible      = true;
                Button10.Visible     = true;
                Button11.Visible     = true;
                Button12.Visible     = true;
                if (pg2.IsFirstPage)
                {
                    Button9.BackColor  = System.Drawing.Color.Gray;
                    Button9.ForeColor  = System.Drawing.Color.White;
                    Button10.BackColor = System.Drawing.Color.Gray;
                    Button10.ForeColor = System.Drawing.Color.White;
                }
                else
                {
                    Button9.BackColor  = System.Drawing.Color.FromArgb(0xd00040);
                    Button9.ForeColor  = System.Drawing.Color.White;
                    Button10.BackColor = System.Drawing.Color.FromArgb(0xd00040);
                    Button10.ForeColor = System.Drawing.Color.White;
                }
                if (pg2.IsLastPage)
                {
                    Button11.BackColor = System.Drawing.Color.Gray;
                    Button11.ForeColor = System.Drawing.Color.White;
                    Button12.BackColor = System.Drawing.Color.Gray;
                    Button12.ForeColor = System.Drawing.Color.White;
                }
                else
                {
                    Button11.BackColor = System.Drawing.Color.FromArgb(0xd00040);
                    Button11.ForeColor = System.Drawing.Color.White;
                    Button12.BackColor = System.Drawing.Color.FromArgb(0xd00040);
                    Button12.ForeColor = System.Drawing.Color.White;
                }
                Button9.Enabled      = !pg2.IsFirstPage;
                Button10.Enabled     = !pg2.IsFirstPage;
                Button11.Enabled     = !pg2.IsLastPage;
                Button12.Enabled     = !pg2.IsLastPage;
                DataList6.DataSource = pg2;

                DataList6.DataBind();

                title.Text = "Restaurents in " + ds.Tables[0].Rows[0]["PlaceName"].ToString();



                sqlConnection.Close();
            }
            else
            {
                Button9.Visible  = false;
                Button10.Visible = false;
                Button11.Visible = false;
                Button12.Visible = false;
                title.Visible    = false;
                sqlConnection.Close();
            }
            sqlConnection.Close();
        }
示例#13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.ConnectionStrings["DB_Connect"].ConnectionString;

            SqlConnection connect = new SqlConnection(connectionString);

            connect.Open();
            string UserId = Session["Userid"].ToString();

            SqlCommand getvid = new SqlCommand("SELECT vuserid FROM visitors WHERE puserid = @userid", connect);

            //SqlCommand getvid = new SqlCommand("SELECT vuserid FROM visitors WHERE puserid = 'rvpisal'", connect);
            getvid.Parameters.AddWithValue("@userid", UserId);
            getvid.ExecuteNonQuery();
            SqlDataAdapter genreRdr = new SqlDataAdapter();

            genreRdr.SelectCommand = getvid;
            DataTable dt2 = new DataTable();

            genreRdr.Fill(dt2);

            if (dt2.Rows.Count > 0)
            {
                string     getinfo            = "SELECT * FROM LinkedU_Account WHERE Userid = @id;";
                SqlCommand checkDatabaseTable = new SqlCommand(getinfo, connect);
                checkDatabaseTable.Parameters.AddWithValue("@id", UserId);
                checkDatabaseTable.ExecuteNonQuery();
                SqlDataReader Records = checkDatabaseTable.ExecuteReader();
                Records.Read();

                if (Records["Membership"].ToString() == "Y")
                {
                    SqlConnection connect1 = new SqlConnection(connectionString);
                    connect1.Open();
                    //connect1.ChangeDatabase("kpborol_Assign4B");
                    string Userid1 = Session["Userid"].ToString();
                    //string Userid1 = "ishan30";
                    string visitors = "SELECT DISTINCT K.Fname, K.Lname, K.Userid, V.vuserid FROM visitors V INNER JOIN KUserinfo K ON K.Userid = V.vuserid WHERE V.puserid = @userid  AND V.vuserid !=  @userid  ;";

                    SqlCommand displayvisitors = new SqlCommand(visitors, connect1);
                    displayvisitors.Parameters.AddWithValue("@userid", Userid1);
                    SqlDataAdapter dadp = new SqlDataAdapter();
                    dadp.SelectCommand = displayvisitors;
                    DataSet ds1 = new DataSet();
                    dadp.Fill(ds1);
                    DataList5.DataSource = ds1;
                    DataList5.DataBind();
                    connect1.Close();
                }
                else if (Records["Membership"].ToString() == "N")
                {
                    SqlConnection connect2 = new SqlConnection(connectionString);


                    connect2.Open();
                    //connect2.ChangeDatabase("kpborol_Assign4B");
                    string Userid2 = Session["Userid"].ToString();

                    string visitors = "SELECT count(DISTINCT(V.vuserid)) AS 'COUNT' FROM visitors V INNER JOIN KUserinfo K ON K.Userid = V.vuserid WHERE V.puserid = @userid  AND V.vuserid !=  @userid ;";
                    //string visitors = "SELECT count(V.vuserid) AS 'COUNT' FROM visitors V INNER JOIN KUserinfo K ON K.Userid = V.vuserid WHERE V.puserid = 'ishan30';";
                    SqlCommand displayvisitors = new SqlCommand(visitors, connect2);
                    displayvisitors.Parameters.AddWithValue("@userid", Userid2);
                    SqlDataAdapter dadp = new SqlDataAdapter();
                    dadp.SelectCommand = displayvisitors;
                    DataSet ds2 = new DataSet();
                    dadp.Fill(ds2);
                    DataList6.DataSource = ds2;
                    DataList6.DataBind();
                    connect2.Close();
                }
                else
                {
                    Label20.Text      = "Sorry, nobody has visited your profile yet!!";
                    Label20.ForeColor = System.Drawing.Color.Red;
                }
            }
            else
            {
                Label20.Text      = "Sorry, nobody has visited your profile yet!!";
                Label20.ForeColor = System.Drawing.Color.Red;
            }
        }
示例#14
0
    //void partiyalar()
    //{
    //    DataTable meqsed = klas.getdatatable("Select PartiyaID,Adi from PartiyalarSiyahi order by PartiyaID");
    //    partiya.DataTextField = "Adi";
    //    partiya.DataValueField = "PartiyaID";
    //    partiya.DataSource = meqsed;
    //    partiya.DataBind();
    //    partiya.Items.Insert(0, new ListItem("Seçin", "-1"));
    //}
    protected void btnAxtar_Click(object sender, EventArgs e)
    {
        vizual();

        DataList1.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,c.adi,c.Proqramteminat,c.Lisenziya,c.Sair,Proqramteminat+Lisenziya+Sair as Cemi " +
                                                 "from Tesnifatlar t left join IQQeyrimaddiaktiv c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=2 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList1.DataBind();

        DataList3.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,t.Tesnifatadi adi,c.Binatikili,c.Avadanliq, c.Neqliyyatvas,c.Invertar,c.Sair, c.Avadanliq + c.Neqliyyatvas +c.Binatikili+ c.Invertar + c.Sair as Cemi from  Tesnifatlar t left join IQTorpaq c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=3 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList3.DataBind();

        DataList4.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,t.Tesnifatadi adi,c.Depozit, c.Sair,c.Depozit + c.Sair as Cemi from " +
                                                 "Tesnifatlar t left join IQSairuzunmudaktiv c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=4 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList4.DataBind();

        DataList5.DataSource = klas.getdatatable(" select ROW_NUMBER() OVER (order by t.TesnifatID) SN,c.Adi,c.Defterxana,c.Yanacaq,c.Sair,c.Defterxana + c.Yanacaq + c.Sair as Cemi from " +
                                                 "Tesnifatlar t left join IQEhtiyat c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=5 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList5.DataBind();

        DataList6.DataSource = klas.getdatatable("   select ROW_NUMBER() OVER (order by c.IQqisamdebitor) SN,* from " +
                                                 " IQQisamudDebitor c where c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList6.DataBind();

        DataList7.DataSource = klas.getdatatable("    select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                 "Tesnifatlar t left join IQSairqisamudaktiv c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=7 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList7.DataBind();

        DataList8.DataSource = klas.getdatatable("  select ROW_NUMBER() OVER (order by t.TesnifatID) SN,*,Bankkredit + Lizinq as Cemi from " +
                                                 "Tesnifatlar t left join IQUzunmudfaizxerc c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=8 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList8.DataBind();

        DataList9.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,*,Bankkredit + Lizinq as Cemi from " +
                                                 "Tesnifatlar t left join IQQisamudfaizxerc c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=9 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList9.DataBind();

        DataList10.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQMecburiodenis c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=10 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList10.DataBind();

        DataList11.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQQisamudkreditor c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=11 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList11.DataBind();

        DataList12.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQSairqisamudohdelik c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=12 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList12.DataBind();

        DataList13.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQUzvlukhaqlari c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=13 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList13.DataBind();

        DataList14.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by IQAlinmisianeID) SN,IQAlinmisianeID," +
                                                  "PartiyaID, UserID, Hesabatili, Adi+' '+Soyad+' '+Ataadi adsoyad, Ianekodu, Seriyasi+', '+Nomresi+', '+ " +
                                                  "convert(nvarchar,Verilmetarixi,104) seriyanomretarix, convert(nvarchar,Dogumtarixi,104) Dogumtarixi, Unvan, Esasvesait, Malmaterial," +
                                                  " Pulformasinda, Esasvesait+Malmaterial+Pulformasinda Cemi, DaxiletmeTarixi, DeyishmeTarixi from IQAlinmisIaneler where Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and PartiyaID=" + Session["PartiyaID"].ToString());
        DataList14.DataBind();


        DataList15.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQPulvesait c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=15 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList15.DataBind();
    }
示例#15
0
        protected void Page_Load(object sender, EventArgs e)

        {
            SqlCommand    komut = new SqlCommand("Select *From Tbl_Kategoriler ", bgl.baglanti());
            SqlDataReader oku   = komut.ExecuteReader();

            DataList5.DataSource = oku;
            DataList5.DataBind();

            Kahveid = Request.QueryString["Kahveid"];
            SqlCommand komut2 = new SqlCommand("Select Kahvead From Tbl_kahveler where Kahveid = @p1 ", bgl.baglanti());

            komut2.Parameters.AddWithValue("@p1", Kahveid);
            SqlDataReader dr = komut2.ExecuteReader();

            while (dr.Read())

            {
                baslik.Text = dr[0].ToString();
            }
            SqlCommand komut3 = new SqlCommand("Select KahveMalzeme From Tbl_kahveler where Kahveid=@p1 ", bgl.baglanti());

            komut3.Parameters.AddWithValue("@p1", Kahveid);
            SqlDataReader dr1 = komut3.ExecuteReader();

            while (dr1.Read())


            {
                malze.Text = dr1[0].ToString();
            }

            bgl.baglanti().Close();
            SqlCommand komut6 = new SqlCommand("Select KahveTarif From Tbl_kahveler where Kahveid=@p1 ", bgl.baglanti());

            komut6.Parameters.AddWithValue("@p1", Kahveid);
            SqlDataReader dr6 = komut6.ExecuteReader();

            while (dr6.Read())


            {
                yapilis.Text = dr6[0].ToString();
            }

            bgl.baglanti().Close();

            SqlCommand komut5 = new SqlCommand("Select KahveResim From Tbl_kahveler where Kahveid=@p1 ", bgl.baglanti());

            komut5.Parameters.AddWithValue("@p1", Kahveid);
            SqlDataReader dr5 = komut5.ExecuteReader();

            while (dr5.Read())


            {
                Image1.ImageUrl = dr5[0].ToString();
            }
            bgl.baglanti().Close();



            SqlCommand komut4 = new SqlCommand("Select * From Tbl_Yorumlar where Kahveid=@p2 ", bgl.baglanti());

            komut4.Parameters.AddWithValue("@p2", Kahveid);
            SqlDataReader dr2 = komut4.ExecuteReader();

            DataList6.DataSource = dr2;
            DataList6.DataBind();
        }
示例#16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlCommand    komut = new SqlCommand("Select *From Tbl_Kategoriler ", bgl.baglanti());
            SqlDataReader oku   = komut.ExecuteReader();

            DataList1.DataSource = oku;
            DataList1.DataBind();

            SqlCommand    komutt = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=1 ", bgl.baglanti());
            SqlDataReader okuu   = komutt.ExecuteReader();

            DataList3.DataSource = okuu;
            DataList3.DataBind();

            SqlCommand    komut2 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=6 ", bgl.baglanti());
            SqlDataReader oku2   = komut2.ExecuteReader();

            DataList4.DataSource = oku2;
            DataList4.DataBind();

            SqlCommand    komut3 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=9 ", bgl.baglanti());
            SqlDataReader oku3   = komut3.ExecuteReader();

            DataList5.DataSource = oku3;
            DataList5.DataBind();

            SqlCommand    komut4 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=11 ", bgl.baglanti());
            SqlDataReader oku4   = komut4.ExecuteReader();

            DataList6.DataSource = oku4;
            DataList6.DataBind();

            SqlCommand    komut5 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=8 ", bgl.baglanti());
            SqlDataReader oku5   = komut5.ExecuteReader();

            DataList7.DataSource = oku5;
            DataList7.DataBind();

            SqlCommand    komut6 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=10 ", bgl.baglanti());
            SqlDataReader oku6   = komut6.ExecuteReader();

            DataList8.DataSource = oku6;
            DataList8.DataBind();

            SqlCommand    komut7 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=7 ", bgl.baglanti());
            SqlDataReader oku7   = komut7.ExecuteReader();

            DataList9.DataSource = oku7;
            DataList9.DataBind();

            SqlCommand    komut8 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=2 ", bgl.baglanti());
            SqlDataReader oku8   = komut8.ExecuteReader();

            DataList10.DataSource = oku8;
            DataList10.DataBind();

            SqlCommand    komut9 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=9 ", bgl.baglanti());
            SqlDataReader oku9   = komut9.ExecuteReader();

            DataList11.DataSource = oku9;
            DataList11.DataBind();

            SqlCommand    komut10 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=7 ", bgl.baglanti());
            SqlDataReader oku10   = komut10.ExecuteReader();

            DataList12.DataSource = oku10;
            DataList12.DataBind();
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        Data_con      dc  = new Data_con();
        SqlConnection con = dc.SQL_con();

        con.Open();
        SqlDataAdapter da1 = new SqlDataAdapter("SELECT top 7 *  FROM [Down_1] where soft_type='热门专题' ", con);
        DataSet        ds1 = new DataSet();

        da1.Fill(ds1, "Down_1");
        con.Close();
        DataList1.DataSource = ds1;
        DataList1.DataBind();



        con.Open();
        SqlDataAdapter da2 = new SqlDataAdapter("SELECT top 7 *  FROM [Down_1] where soft_type='热门专题1' ", con);
        DataSet        ds2 = new DataSet();

        da2.Fill(ds2, "Down_1");
        con.Close();
        DataList2.DataSource = ds2;
        DataList2.DataBind();


        con.Open();
        SqlDataAdapter da3 = new SqlDataAdapter("SELECT top 7 *  FROM [Down_1] where soft_type='软件专题' ", con);
        DataSet        ds3 = new DataSet();

        da3.Fill(ds3, "Down_1");
        con.Close();
        DataList3.DataSource = ds3;
        DataList3.DataBind();



        con.Open();
        SqlDataAdapter da4 = new SqlDataAdapter("SELECT top 7 *  FROM [Down_1] where soft_type='热门专题1' ", con);
        DataSet        ds4 = new DataSet();

        da4.Fill(ds4, "Down_1");
        con.Close();
        DataList4.DataSource = ds4;
        DataList4.DataBind();


        con.Open();
        SqlDataAdapter da5 = new SqlDataAdapter("SELECT top 7 *  FROM [Down_1] where soft_type='游戏专题' ", con);
        DataSet        ds5 = new DataSet();

        da5.Fill(ds5, "Down_1");
        con.Close();
        DataList5.DataSource = ds5;
        DataList5.DataBind();



        con.Open();
        SqlDataAdapter da6 = new SqlDataAdapter("SELECT top 7 *  FROM [Down_1] where soft_type='热门专题1' ", con);
        DataSet        ds6 = new DataSet();

        da6.Fill(ds6, "Down_1");
        con.Close();
        DataList6.DataSource = ds6;
        DataList6.DataBind();
    }