Пример #1
0
        private void accordionControlElement5_Click(object sender, EventArgs e)
        {
            try
            {
                bunifuCustomDataGrid4.Columns.Clear();
                _book = new MusicBook();
                if (_book.GetShort().Rows.Count > 0)
                {
                    bunifuCustomDataGrid4.DataSource = _book.GetShort();
                    //AddButton(bunifuCustomDataGrid4);
                    label16.Text = _book.GetShort().Rows[0][4].ToString();
                    label24.Text = _book.GetShort().Rows[0][0].ToString();
                    label28.Text = _book.GetShort().Rows[0][3].ToString();
                    label14.Text = _book.GetShort().Rows[0][1].ToString();
                    label25.Text = _book.GetShort().Rows[0][2].ToString();

                    byte[] img;
                    if (_book.GetByName(label24.Text, "MusicBook").Rows[0][8].ToString() != "NULL")
                    {
                        img = (byte[])(_book.GetByName(label24.Text, "MusicBook").Rows[0][8]);
                        if (img == null)
                        {
                            pictureBox19.Image = null;
                        }
                        else
                        {
                            var ms = new MemoryStream(img);
                            pictureBox19.Image = Image.FromStream(ms);
                        }
                    }
                }

                xtraTabPage8.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }