示例#1
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();
            }
        }
    }
示例#2
0
    private void BindData(int subclass)
    {
        selectStar();
        //連線資料庫
        SqlConnection conn = new SqlConnection("Data Source=mywedding.cqb8null5yfs.ap-northeast-1.rds.amazonaws.com;Initial Catalog=myWedding;User Id=iiiSouth9402;Password=marcoLeonPower9402");

        //SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=myWedding;User Id=sa;Password=as");
        conn.Open();

        //SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM tGallery AS a INNER JOIN  tGalleryPhoto AS b ON a.fIdPhotoCover = b.fIdPhoto INNER JOIN tServicesSubClass as c  ON c.fIdServicesSubClass = a.fIdServicesSubClass inner Join tServicesClass as d ON d.fIdServicesClass = c.fIdServicesClass WHERE c.fIdServicesClass = 2" + (subclass == 0 ? "" : " and  a.fIdServicesSubClass=" + Request["subClass"]), conn);

        SqlDataAdapter da = new SqlDataAdapter("SELECT a.fIdServices,a.fIdStores,c.fIdGallery,c.fPhoto,a.fName,a.fDescription,a.fMaxMoney,a.fMinMoney,d.fPhoto as StorePhoto,d.fName as StoreName FROM tServices AS a inner join tServicesPic as b on a.fIdServices = b.fIdServices inner join tGalleryPhoto as c on c.fIdPhoto = b.fIdPhoto inner join tMember as d on a.fIdStores = d.fIdMember inner join tStores as e on d.fIdMember = e.fIdStores inner join tServicesSubClass as f on a.fIdSubServicesClass = f.fIdServicesSubClass inner join tServicesClass as g on f.fIdServicesClass = g.fIdServicesClass WHERE a.fDelete is null and g.fIdServicesClass = 2" + (subclass == 0 ? " order by fUploadTime asc" : " and  a.fIdSubServicesClass=" + Request["subClass"] + " order by fUploadTime asc"), conn);



        DataTable dt = new DataTable();

        da.Fill(dt);


        //判斷是否有資料
        if (dt != null && dt.Rows.Count > 0)
        {
            DataView dv = dt.DefaultView;
            pg.DataSource = dv;

            pg.AllowPaging      = true;
            pg.PageSize         = 12;
            pg.CurrentPageIndex = int.Parse(ViewState["pageindex"].ToString());

            if (!pg.IsFirstPage)
            {
                lkPre.Enabled   = true;
                lkfirst.Enabled = true;
            }
            else
            {
                lkPre.Enabled   = false;
                lkfirst.Enabled = false;
            }
            if (!pg.IsLastPage)
            {
                lkNext.Enabled = true;
                lklast.Enabled = true;
            }
            else
            {
                lkNext.Enabled = false;
                lklast.Enabled = false;
            }
            int a = Convert.ToInt16(ViewState["pageindex"]);
            a           = a + 1;
            Label1.Text = (a).ToString();
            //Label2.Text = (pg.PageCount).ToString();
            DataList5.DataSource = pg;
            DataList5.DataBind();
            conn.Dispose();
            conn.Close();
        }
    }
示例#3
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();
    }
示例#4
0
        void OnButtonFind5Click(Object sender, EventArgs e)
        {
            //есть ли владельцы машин, которые привозят товар на свой склад
            SQLDataService ds         = (SQLDataService)DataServiceProvider.DataService;
            var            result     = new List <Личность>();
            var            supplyList = ds.Query <Поступления>(Поступления.Views.ПоступленияL).ToList();

            var whList  = supplyList.Select(k => k.Склад).Distinct().ToList();
            var carList = supplyList.Select(k => k.Машина).Distinct().ToList();

            foreach (var wh in whList)
            {
                var car = carList.Where(k => k.ВладелецМашины.__PrimaryKey == wh.ВладелецСклада.__PrimaryKey).ToList();
                if (car.Count() > 0)
                {
                    var person  = car.Select(k => k.ВладелецМашины).First();
                    var perList = ds.Query <Личность>(Личность.Views.ЛичностьL).Where(k => k.__PrimaryKey == person.__PrimaryKey).First();
                    result.Add(perList);
                }
            }



            DataList5.DataSource = result;
            DataList5.DataBind();
        }
示例#5
0
 public void getdata()
 {
     DataList1.DataBind();
     DataList2.DataBind();
     DataList3.DataBind();
     DataList4.DataBind();
     DataList5.DataBind();
     DataList6.DataBind();
     DataList7.DataBind();
 }
示例#6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string komut = "Select * From Tbl_Hakkimizda";
         dt = bgl.baglanti(komut);
         DataList5.DataSource = dt;
         DataList5.DataBind();
     }
 }
示例#7
0
    private void BindAllChGroupSi()//绑定华语组合/乐队
    {
        DataTable dt = SingerManager.selectAllCgroupsi();

        if (dt != null && dt.Rows.Count != 0)
        {
            DataList5.DataSource = dt;
            DataList5.DataBind();
        }
    }
    private void BindData排序(int subclass)
    {
        //連線資料庫
        SqlConnection conn = new SqlConnection("Data Source=mywedding.cqb8null5yfs.ap-northeast-1.rds.amazonaws.com;Initial Catalog=myWedding;User Id=iiiSouth9402;Password=marcoLeonPower9402");

        conn.Open();

        SqlDataAdapter da = new SqlDataAdapter("SELECT a.fIdGallery,a.fIdStores,a.fName as galleryName,a.fDescription,b.fPhoto,f.fPhoto as memberPhoto,f.fName as memberName From tGallery as a inner join tGalleryPhoto as b on a.fIdGallery = b.fIdGallery inner join tStores as c on a.fIdStores = c.fIdStores inner join tServicesSubClass as e on a.fIdServicesSubClass = e.fIdServicesSubClass inner join tServicesClass as d on d.fIdServicesClass = e.fIdServicesClass inner join tMember as f on f.fIdMember = a.fIdStores where a.fDelete is null and a.fIdPhotoCover = b.fIdPhoto" + (subclass == 0 ? "  and d.fIdServicesClass=3 order by fUploadTime desc" : " and  a.fIdServicesSubClass = " + Request["subClass"] + " order by fUploadTime desc"), conn);

        DataTable dt = new DataTable();

        da.Fill(dt);

        //判斷是否有資料
        if (dt != null && dt.Rows.Count > 0)
        {
            DataView dv = dt.DefaultView;
            pg.DataSource = dv;

            pg.AllowPaging      = true;
            pg.PageSize         = 12;
            pg.CurrentPageIndex = int.Parse(ViewState["pageindex"].ToString());

            if (!pg.IsFirstPage)
            {
                lkPre.Enabled   = true;
                lkfirst.Enabled = true;
            }
            else
            {
                lkPre.Enabled   = false;
                lkfirst.Enabled = false;
            }
            if (!pg.IsLastPage)
            {
                lkNext.Enabled = true;
                lklast.Enabled = true;
            }
            else
            {
                lkNext.Enabled = false;
                lklast.Enabled = false;
            }
            int a = Convert.ToInt16(ViewState["pageindex"]);
            a           = a + 1;
            Label1.Text = (a).ToString();
            //Label2.Text = (pg.PageCount).ToString();
            DataList5.DataSource = pg;
            DataList5.DataBind();

            conn.Dispose();
            conn.Close();
        }
    }
 public void loaddata()
 {
     try
     {
         string mablog = Request.QueryString["MaBlog"].ToString();
         string sql    = "SELECT [MaBlog], [HinhAnh], [TieuDe], [NoiDung], [NgayDang], [MaTK] FROM [BLOG] Where MaBlog=" + mablog;
         DataList5.DataSource = XLDL.GetData(sql);
         DataList5.DataBind();
     }
     catch
     {
     }
 }
    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();
    }
    public void bingdate()
    {
        Datacon       dc  = new Datacon();
        SqlConnection con = dc.SQL_con();

        con.Open();
        SqlDataAdapter da = new SqlDataAdapter("SELECT *  FROM [shine_sucai_zan]  ", con);
        DataSet        ds = new DataSet();

        da.Fill(ds, "shine_sucai_zan");
        con.Close();
        DataList5.DataSource = ds;
        DataList5.DataBind();
    }
示例#12
0
    public void DisPlayMusic()
    {
        string matheloai = Request.QueryString["L"].ToString();
        string sql       = "select * from Music Where MaTheLoai='" + matheloai + "'";

        con.Open();
        SqlDataAdapter da = new SqlDataAdapter(sql, con);
        DataSet        ds = new DataSet();

        da.Fill(ds);
        DataList5.DataSource = ds;
        DataList5.DataBind();
        con.Close();
    }
示例#13
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();
 }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Panel2.Visible = false;
            Panel5.Visible = false;
            SqlCommand    cmd = new SqlCommand("Select *from Tbl_Yorumlar where YorumOnay=1", bgl.baglanti());
            SqlDataReader dr  = cmd.ExecuteReader();

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

            SqlCommand    cmd2 = new SqlCommand("Select *from Tbl_Yorumlar where YorumOnay=0", bgl.baglanti());
            SqlDataReader dr2  = cmd2.ExecuteReader();

            DataList5.DataSource = dr2;
            DataList5.DataBind();
        }
示例#15
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();
    }
示例#16
0
        private void hotel()
        {
            String        mycon  = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            String        myq    = "select * from [dbo].[HotelInfo] where PlaceName=@PlaceName";
            SqlConnection sqlcon = new SqlConnection(mycon);
            SqlCommand    sqlcmd = new SqlCommand(myq, sqlcon);

            sqlcmd.CommandText = myq;
            sqlcmd.Connection  = sqlcon;
            sqlcmd.Parameters.AddWithValue("@PlaceName", Request.QueryString["PlaceName"]);
            sqlcon.Open();
            SqlDataReader sdr = sqlcmd.ExecuteReader();

            if (sdr.HasRows)
            {
                sdr.Close();
                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = sqlcmd;
                DataSet ds = new DataSet();
                da.Fill(ds);
                y = ds.Tables[0].Rows.Count;
                DataTable       dt  = ds.Tables[0];
                PagedDataSource pg1 = new PagedDataSource();
                pg1.DataSource       = dt.DefaultView;
                pg1.AllowPaging      = true;
                pg1.CurrentPageIndex = x;
                pg1.PageSize         = 4;
                Button1.Visible      = true;
                Button2.Visible      = true;
                Button7.Visible      = true;
                Button8.Visible      = true;
                if (pg1.IsFirstPage)
                {
                    Button1.BackColor = System.Drawing.Color.Gray;
                    Button1.ForeColor = System.Drawing.Color.White;
                    Button2.BackColor = System.Drawing.Color.Gray;
                    Button2.ForeColor = System.Drawing.Color.White;
                }
                else
                {
                    Button1.BackColor = System.Drawing.Color.FromArgb(0xd00040);
                    Button1.ForeColor = System.Drawing.Color.White;
                    Button2.BackColor = System.Drawing.Color.FromArgb(0xd00040);
                    Button2.ForeColor = System.Drawing.Color.White;
                }
                if (pg1.IsLastPage)
                {
                    Button7.BackColor = System.Drawing.Color.Gray;
                    Button7.ForeColor = System.Drawing.Color.White;
                    Button8.BackColor = System.Drawing.Color.Gray;
                    Button8.ForeColor = System.Drawing.Color.White;
                }
                else
                {
                    Button7.BackColor = System.Drawing.Color.FromArgb(0xd00040);
                    Button7.ForeColor = System.Drawing.Color.White;
                    Button8.BackColor = System.Drawing.Color.FromArgb(0xd00040);
                    Button8.ForeColor = System.Drawing.Color.White;
                }
                Button1.Enabled = !pg1.IsFirstPage;
                Button2.Enabled = !pg1.IsFirstPage;
                Button7.Enabled = !pg1.IsLastPage;
                Button8.Enabled = !pg1.IsLastPage;
                //Binding pg to datalist
                DataList5.DataSource = pg1;//dl is datalist
                DataList5.DataBind();

                hotellabel.Text = "Nearby Hotels in " + ds.Tables[0].Rows[0]["PlaceName"].ToString();
                sqlcon.Close();
            }
            else
            {
                Button1.Visible    = false;
                Button2.Visible    = false;
                Button7.Visible    = false;
                Button8.Visible    = false;
                hotellabel.Visible = false;
                sqlcon.Close();
            }

            sqlcon.Close();
        }
示例#17
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;
            }
        }
示例#18
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();
        }
示例#19
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();
        }
示例#20
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();
    }
    private void ProveriLattestVesti()
    {
        // Izminuvanje na novite neprocitani vesti i odreduvanje na nivniot broj:
        SqlConnection konekcija = new SqlConnection();

        konekcija.ConnectionString = ConfigurationManager.ConnectionStrings["Konekcija"].ConnectionString;
        string sqlString = @"SELECT COUNT(Vest_Id) AS Broj, V.Tip
                             FROM Vest AS V
                             WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                             AND V.Tip=1 AND V.Vest_Id NOT IN
                             (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                              WHERE Tip = 1 AND MAC_Add='" + Session["MAC"] + @"' 
                              ) GROUP BY V.Tip 

                            UNION SELECT COUNT(Vest_Id) AS Broj, V.Tip
                             FROM Vest AS V
                             WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                             AND V.Tip=2 AND V.Vest_Id NOT IN
                             (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                              WHERE Tip = 2 AND MAC_Add='" + Session["MAC"] + @"' 
                              ) GROUP BY V.Tip 

                            UNION SELECT COUNT(Vest_Id) AS Broj, V.Tip
                             FROM Vest AS V
                             WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                             AND V.Tip=3 AND V.Vest_Id NOT IN
                             (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                              WHERE Tip = 3 AND MAC_Add='" + Session["MAC"] + @"' 
                              ) GROUP BY V.Tip 

                            UNION SELECT COUNT(Vest_Id) AS Broj, V.Tip
                             FROM Vest AS V
                             WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                             AND V.Tip=4 AND V.Vest_Id NOT IN
                             (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                              WHERE Tip = 4 AND MAC_Add='" + Session["MAC"] + @"' 
                              ) GROUP BY V.Tip ";

        SqlCommand komanda = new SqlCommand(sqlString, konekcija);

        try
        {
            konekcija.Open();
            SqlDataReader citac = komanda.ExecuteReader();
            while (citac.Read())
            {
                // Zapisuvanje na brojot na neprocitani vesti:
                if (citac["Tip"].ToString() == "1")
                {
                    lblFudbalLattest.Text = citac["Broj"].ToString();
                }
                if (citac["Tip"].ToString() == "2")
                {
                    lblKosarkaLattest.Text = citac["Broj"].ToString();
                }
                if (citac["Tip"].ToString() == "3")
                {
                    lblRakometLattest.Text = citac["Broj"].ToString();
                }
                if (citac["Tip"].ToString() == "4")
                {
                    lblOstanatoLattest.Text = citac["Broj"].ToString();
                }
            }
            citac.Close();

            // Fudbal - Disabled ako nema novi
            if (lblFudbalLattest.Text == "0")
            {
                pnlFudbalLattest.Visible  = false;
                lblFudbalDDLInfo.Visible  = true;
                imgFudbalLattest.ImageUrl = "~/Images/fudbal_topka-disabled.png";
            }
            else
            {
                // Fudbal - Ispolnuvanje samo so novite vesti :
                sqlDSFudbalDDL.SelectCommand = @"SELECT *
                FROM Vest AS V
                WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                AND V.Tip=1 AND V.Vest_Id NOT IN
                (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                WHERE Tip = 1 AND MAC_Add='" + Session["MAC"] + @"' 
                )";
                DataList2.DataSource         = sqlDSFudbalDDL;
                DataList2.DataBind();
            }

            // Kosarka - Disabled ako nema novi
            if (lblKosarkaLattest.Text == "0")
            {
                pnlKosarkaLattest.Visible  = false;
                lblKosarkaDDLInfo.Visible  = true;
                imgKosarkaLattest.ImageUrl = "~/Images/basket_topka_disabled.png";
            }
            else
            {
                // Kosarka - Ispolnuvanje samo so novite vesti :
                sqlDSKosarkaDDL.SelectCommand = @"SELECT *
                FROM Vest AS V
                WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                AND V.Tip=2 AND V.Vest_Id NOT IN
                (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                WHERE Tip = 2 AND MAC_Add='" + Session["MAC"] + @"' 
                )";
                DataList3.DataSource          = sqlDSKosarkaDDL;
                DataList3.DataBind();
            }

            // Rakomet - Disabled ako nema novi
            if (lblRakometLattest.Text == "0")
            {
                pnlRakometLattest.Visible  = false;
                lblRakometDDLInfo.Visible  = true;
                imgRakometLattest.ImageUrl = "~/Images/rakomet_topka_disabled.png";
            }
            else
            {
                // Rakomet - Ispolnuvanje samo so novite vesti :
                sqlDSRakometDDL.SelectCommand = @"SELECT *
                FROM Vest AS V
                WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                AND V.Tip = 3 AND V.Vest_Id NOT IN
                (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                WHERE Tip = 3 AND MAC_Add='" + Session["MAC"] + @"' 
                )";
                DataList4.DataSource          = sqlDSRakometDDL;
                DataList4.DataBind();
            }

            // Ostanato - Disabled ako nema novi
            if (lblOstanatoLattest.Text == "0")
            {
                pnlOstanatoLattest.Visible  = false;
                lblOstanatoDDLInfo.Visible  = true;
                imgOstanatoLattest.ImageUrl = "~/Images/ostanati_sportovi_disabled.png";
            }
            else
            {
                // Ostanato - Ispolnuvanje samo so novite vesti :
                sqlDSOstanatoDDL.SelectCommand = @"SELECT *
                FROM Vest AS V
                WHERE V.Datum_Objava > '" + DateTime.Now.AddDays(-2).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture) + @"' 
                AND V.Tip = 4 AND V.Vest_Id NOT IN
                (SELECT Vest_Id FROM Vest_MAC_Poseta AS VMP
                WHERE Tip = 4 AND MAC_Add='" + Session["MAC"] + @"' 
                )";
                DataList5.DataSource           = sqlDSOstanatoDDL;
                DataList5.DataBind();
            }
        }
        catch (Exception err) { }
        finally
        {
            konekcija.Close();
        }
    }
    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();
    }
示例#23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string    MALOAI = Request.QueryString["MALOAI"];
            DataTable dt     = new DataTable();

            if (MALOAI == null)
            {
                dt = x.GetData("select* from SANPHAM WHERE MALOAI=1");
                if (dt.Rows.Count > 0)
                {
                    DataList.DataSource = dt;
                    DataList.DataBind();

                    dt.Clear();
                    dt = x.GetData("SELECT TEN FROM LOAI WHERE MALOAI=1");
                    title.DataSource = dt;
                    title.DataBind();
                }

                dt.Clear();
                dt = x.GetData("select* from SANPHAM WHERE MALOAI=2");
                if (dt.Rows.Count > 0)
                {
                    DataList1.DataSource = dt;
                    DataList1.DataBind();

                    dt.Clear();
                    dt = x.GetData("SELECT TEN FROM LOAI WHERE MALOAI=2");
                    title1.DataSource = dt;
                    title1.DataBind();
                }

                dt.Clear();
                dt = x.GetData("select* from SANPHAM WHERE MALOAI=3");
                if (dt.Rows.Count > 0)
                {
                    DataList2.DataSource = dt;
                    DataList2.DataBind();

                    dt.Clear();
                    dt = x.GetData("SELECT TEN FROM LOAI WHERE MALOAI=3");
                    title2.DataSource = dt;
                    title2.DataBind();
                }

                dt.Clear();
                dt = x.GetData("select* from SANPHAM WHERE MALOAI=4");
                if (dt.Rows.Count > 0)
                {
                    DataList3.DataSource = dt;
                    DataList3.DataBind();

                    dt.Clear();
                    dt = x.GetData("SELECT TEN FROM LOAI WHERE MALOAI=4");
                    title3.DataSource = dt;
                    title3.DataBind();
                }

                dt.Clear();
                dt = x.GetData("select* from SANPHAM WHERE MALOAI=5");
                if (dt.Rows.Count > 0)
                {
                    DataList4.DataSource = dt;
                    DataList4.DataBind();

                    dt.Clear();
                    dt = x.GetData("SELECT TEN FROM LOAI WHERE MALOAI=5");
                    title4.DataSource = dt;
                    title4.DataBind();
                }

                dt.Clear();
                dt = x.GetData("select* from SANPHAM WHERE MALOAI=6");
                if (dt.Rows.Count > 0)
                {
                    DataList5.DataSource = dt;
                    DataList5.DataBind();

                    dt.Clear();
                    dt = x.GetData("SELECT TEN FROM LOAI WHERE MALOAI=6");
                    title5.DataSource = dt;
                    title5.DataBind();
                }
            }

            else
            {
                dt = x.GetData("select* from SANPHAM WHERE MALOAI=" + MALOAI);
                if (dt.Rows.Count > 0)
                {
                    DataList.DataSource = dt;
                    DataList.DataBind();

                    dt.Clear();
                    dt = x.GetData("SELECT TEN FROM LOAI WHERE MALOAI=" + MALOAI);
                    title.DataSource = dt;
                    title.DataBind();
                }
            }

            /*
             * if (dt.Rows.Count > 0)
             * {
             *  DataList.DataSource = dt;
             *  DataList.DataBind();
             * }*/
        }
    }
示例#24
0
 private void NoDefineDataBinding_P(DataTable dataTable)
 {
     DataList5.DataSource = DataTypeUtility.FilterSortDataTable(dataTable, "Q_DFN_ID = ''", null);
     DataList5.DataBind();
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            //class       obj       class
            SqlConnection con22 = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str22;
            str22 = "select * from User_Book_Seats ";

            SqlCommand cmd22 = new SqlCommand(str22, con22);

            con22.Open();

            SqlDataReader dr22;
            dr22 = cmd22.ExecuteReader();
            // to get one or more rows from table...

            while (dr22.Read())
            {
                a11.Add(dr22["SeatId"]);
            }
            SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str;
            str = "select * from Screen_managment,TheatreMaster where Screen_managment.movieid = " + Session["movieid"] + "  and Screen_managment.TheatreId=TheatreMaster.TheatreId ";

            SqlCommand cmd = new SqlCommand(str, con);

            con.Open();

            SqlDataReader dr;
            dr = cmd.ExecuteReader();

            lblMoviesDate.Text = Convert.ToString(System.DateTime.Now.Date.ToShortDateString());
            while (dr.Read())
            {
                lbltheatre.Text        = dr["TheatreName"].ToString();
                lblMoviName.Text       = dr["moviename"].ToString();
                lblShowtime.Text       = dr["timing"].ToString();
                ViewState["TheatreId"] = dr["TheatreId"];
                lblScreen.Text         = dr["screenname"].ToString();
            }
            if (lblScreen.Text == "Screen_1")
            {
                lblSid.Text = "1";
            }
            if (lblScreen.Text == "Screen_2")
            {
                lblSid.Text = "2";
            }
            if (lblScreen.Text == "Screen_3")
            {
                lblSid.Text = "3";
            }
            if (lblScreen.Text == "Screen_4")
            {
                lblSid.Text = "4";
            }

            //class       obj       class
            SqlConnection con1 = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str1;
            str1 = "select * from Screen_managment where movieid = " + Session["movieid"] + " ";


            SqlCommand cmd1 = new SqlCommand(str1, con1);

            con1.Open();

            SqlDataReader dr1;
            dr1 = cmd1.ExecuteReader();
            ArrayList a1 = new ArrayList();
            while (dr1.Read())
            {
                //   a1.Add(dr1["Seat_Id"]);
            }

            Session["a1"] = a1;


            //class       obj       class
            SqlConnection con2 = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str2;
            str2 = "select * from Seat_Master,Screen_managment where Seat_Master.Seattype = 'Club' and Screen_managment.movieid=" + Session["movieid"] + " and Screen_managment.TheatreId=Seat_Master.TheatreId";

            SqlCommand cmd2 = new SqlCommand(str2, con2);

            con2.Open();

            SqlDataReader dr2;
            dr2 = cmd2.ExecuteReader();
            // to get one or more rows from table...


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



            SqlConnection con21 = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str21;
            str21 = "select * from Seat_Master,Screen_managment where Seat_Master.Seattype = 'Gold' and Screen_managment.movieid=" + Session["movieid"] + " and Screen_managment.TheatreId=Seat_Master.TheatreId";

            SqlCommand cmd21 = new SqlCommand(str21, con21);

            con21.Open();

            SqlDataReader dr21;
            dr21 = cmd21.ExecuteReader();
            // to get one or more rows from table...


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



            SqlConnection con23 = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str23;
            str23 = "select * from Seat_Master,Screen_managment where Seat_Master.Seattype = 'Silver' and Screen_managment.movieid=" + Session["movieid"] + " and Screen_managment.TheatreId=Seat_Master.TheatreId";

            SqlCommand cmd23 = new SqlCommand(str23, con23);

            con23.Open();

            SqlDataReader dr23;
            dr23 = cmd23.ExecuteReader();
            // to get one or more rows from table...


            DataList8.DataSource = dr23;
            DataList8.DataBind();
            // lblSeatType.Text = "210";
            // lblRate.Text = "210";

            DataList5.Visible = false;
            DataList8.Visible = false;
        }
    }