Beispiel #1
0
        private void ObtenerNotas()
        {
            DataTable dt_notas = OpBD.SeleccionarNotas(id_negocio);

            if (dt_notas != null && dt_notas.Rows.Count > 0)
            {
                tileBar_notas.Groups.Add(new DevExpress.XtraEditors.TileGroup());

                foreach (DataRow row_n in dt_notas.Rows)
                {
                    string id_nota = row_n[0].ToString();
                    string nota    = row_n[2].ToString();

                    DevExpress.XtraBars.Navigation.TileBarItem item1 = new DevExpress.XtraBars.Navigation.TileBarItem()
                    {
                        Text = nota, Tag = id_nota
                    };
                    item1.AppearanceItem.Normal.TextOptions.Trimming = DevExpress.Utils.Trimming.None;
                    item1.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.TopLeft;
                    item1.AppearanceItem.Normal.BackColor = vector_colores[cont_color];
                    item1.AppearanceItem.Normal.ForeColor = Color.Black;
                    item1.ItemClick += Item1_ItemClick;
                    tileBar_notas.Groups[0].Items.Add(item1);

                    cont_color++;
                    if (cont_color == 8)
                    {
                        cont_color = 0;
                    }
                }
            }
        }