Exemplo n.º 1
0
        private void ShowReportOnRow(DataGridViewRow row, WaitingCommandInfo record)
        {
            row.Tag = record;
            EntranceInfo entrance = ParkBuffer.Current.GetEntrance(record.EntranceID);

            row.Cells["colEntrance"].Value             = entrance == null ? string.Empty : entrance.EntranceName;
            row.Cells["colCommandType"].Value          = CommandTypeDescription.GetDescription(record.Command);
            row.Cells["colCardID"].Value               = record.CardID;
            row.Cells["colWaitingCommandStatus"].Value = WaitingCommandStatusDescription.GetDescription(record.Status);
        }
Exemplo n.º 2
0
        public void Init()
        {
            var items = new[] {
                new TextValueItem <CommandType?> (),
                new TextValueItem <CommandType?>(CommandType.AddCard, CommandTypeDescription.GetDescription(CommandType.AddCard)),
                new TextValueItem <CommandType?>(CommandType.UpateCard, CommandTypeDescription.GetDescription(CommandType.UpateCard)),
                new TextValueItem <CommandType?>(CommandType.DeleteCard, CommandTypeDescription.GetDescription(CommandType.DeleteCard)),
                new TextValueItem <CommandType?>(CommandType.DownloadAccesses, CommandTypeDescription.GetDescription(CommandType.DownloadAccesses)),
                new TextValueItem <CommandType?>(CommandType.DownloadHolidays, CommandTypeDescription.GetDescription(CommandType.DownloadHolidays)),
                new TextValueItem <CommandType?>(CommandType.DownloadKeySetting, CommandTypeDescription.GetDescription(CommandType.DownloadKeySetting)),
                new TextValueItem <CommandType?>(CommandType.DownloadTariffs, CommandTypeDescription.GetDescription(CommandType.DownloadTariffs))
            };

            this.DataSource    = items;
            this.DisplayMember = "Text";
            this.ValueMember   = "Value";
            this.DropDownStyle = ComboBoxStyle.DropDownList;
        }