Beispiel #1
0
        private void cardView_CustomCardCaptionImage(object sender, DevExpress.XtraGrid.Views.Card.CardCaptionImageEventArgs e)
        {
            WorldDetailElement row = cardView.GetRow(e.RowHandle) as WorldDetailElement;

            if (row != null)
            {
                if (context != null && context.TakeStoreWorld != null)
                {
                    StoreToWorld s_t_w = context.TakeStoreWorld.GetWorld(row.StoreWorldId);
                    if (s_t_w != null)
                    {
                        switch (s_t_w.WorldTypeID)
                        {
                        case WorldType.Administration:
                            e.ImageIndex = 0;
                            break;

                        case WorldType.CashDesk:
                            e.ImageIndex = 1;
                            break;

                        case WorldType.World:
                            e.ImageIndex = 2;
                            break;

                        default:
                            break;
                        }
                    }
                }
            }
        }
Beispiel #2
0
        private void cardView_CustomDrawCardCaption(object sender, DevExpress.XtraGrid.Views.Card.CardCaptionCustomDrawEventArgs e)
        {
            WorldDetailElement row = cardView.GetRow(e.RowHandle) as WorldDetailElement;

            e.CardCaption = (row != null) ? row.WorldName : string.Empty;
        }