Example #1
0
        private void Form29_Load(object sender, EventArgs e)
        {
            i = 0;
            Form23         lec = new Form23();
            SqlDataAdapter sda = new SqlDataAdapter("select Titlu,Text,ImagineP,i1,i2,i3,i4 from Lectii ", Form1.con);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);


            if (i < dt.Rows.Count)
            {
                bunifuTileButton1.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton2.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton9.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton8.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton7.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton10.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton3.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton4.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton6.LabelText = dt.Rows[i][0].ToString(); i++;
            }
            if (i < dt.Rows.Count)
            {
                bunifuTileButton5.LabelText = dt.Rows[i][0].ToString();
            }
            i = 0;
            if (bunifuTileButton9.LabelText != "")
            {
                bunifuTileButton9.Visible = true;
            }
            if (bunifuTileButton8.LabelText != "")
            {
                bunifuTileButton8.Visible = true;
            }
            if (bunifuTileButton7.LabelText != "")
            {
                bunifuTileButton7.Visible = true;
            }
            if (bunifuTileButton10.LabelText != "")
            {
                bunifuTileButton10.Visible = true;
            }
            if (bunifuTileButton3.LabelText != "")
            {
                bunifuTileButton3.Visible = true;
            }
            if (bunifuTileButton4.LabelText != "")
            {
                bunifuTileButton4.Visible = true;
            }
            if (bunifuTileButton6.LabelText != "")
            {
                bunifuTileButton6.Visible = true;
            }
            if (bunifuTileButton5.LabelText != "")
            {
                bunifuTileButton5.Visible = true;
            }
        }