public override void DataBind() { ServiceLock service = ServiceLock; if (service != null) { // only rebind the data if the dialog has been closed if (ModalDialog.State == ModalDialog.ShowState.Hide) { Type.Text = ServerEnumDescription.GetLocalizedDescription(service.ServiceLockTypeEnum); Description.Text = ServerEnumDescription.GetLocalizedLongDescription(service.ServiceLockTypeEnum); Enabled.Checked = service.Enabled; if (service.FilesystemKey != null) { FileSystemDataAdapter adaptor = new FileSystemDataAdapter(); Model.Filesystem fs = adaptor.Get(service.FilesystemKey); FileSystem.Text = fs.Description; } else { FileSystem.Text = string.Empty; } CalendarExtender.SelectedDate = service.ScheduledTime; AddCustomTime(service.ScheduledTime); } } base.DataBind(); }
public static void Main(string[] args) { const string _dataFolder = @"C:\Dev\gameshow-demo\gameshow-backend\Data\Games"; ILogger logger = new LoggerFactory().CreateLogger("QuestionBuilder"); IDataAdapter dataAdapter = new FileSystemDataAdapter(_dataFolder, new DeserializationHelper(logger), logger); var builder = new DummyDataBuilder(); var game = new Game() { Id = dataAdapter.GetNextGameId(), Round1 = builder.GetConnectionRound(ConnectionType.CONNECTION), Round2 = builder.GetConnectionRound(ConnectionType.SEQUENCE), Round3 = new WallRound() { Wall1 = builder.GetWallRound(), Wall2 = builder.GetWallRound() }, Round4 = new MissingVowelRound() }; dataAdapter.SaveGame(game); game.Id = 2; dataAdapter.SaveGame(game); game.Id = 3; dataAdapter.SaveGame(game); }
public override void DataBind() { ServiceLock service = ServiceLock; if (service != null) { // only rebind the data if the dialog has been closed if (ModalDialog.State == ModalDialog.ShowState.Hide) { Type.Text = ServerEnumDescription.GetLocalizedDescription(service.ServiceLockTypeEnum); Description.Text = ServerEnumDescription.GetLocalizedLongDescription(service.ServiceLockTypeEnum); Enabled.Checked = service.Enabled; if (service.FilesystemKey != null) { FileSystemDataAdapter adaptor = new FileSystemDataAdapter(); Model.Filesystem fs = adaptor.Get(service.FilesystemKey); FileSystem.Text = fs.Description; } else FileSystem.Text = string.Empty; CalendarExtender.SelectedDate = service.ScheduledTime; AddCustomTime(service.ScheduledTime); } } base.DataBind(); }