// GET: AuctionsAdmin/Create public ActionResult Create() { //ViewBag.Path = "~/Images/"; ltRollDescription rol = new ltRollDescription(); DefaultSetup defaultSetup = db.DefaultSetups.FirstOrDefault(t => t.Active == true); rol.BackgroundColor = defaultSetup.BackgroundColor; rol.FontColor = defaultSetup.FontColor; rol.RefreshTime = defaultSetup.RefreshTime; rol.StartDate = DateTime.Now; rol.EndDate = DateTime.Now; rol.AuctionDelayTime = 5; rol.LogoPath = defaultSetup.LogoPath; rol.LogoName = defaultSetup.LogoName; rol.SmallLogoName = defaultSetup.SmallLogoName; rol.RollImagesPath = defaultSetup.RollImagesPath; rol.SmsNotification = true; rol.LogoBackgroundColor = defaultSetup.LogoBackgroundColor; rol.smsOutBidder = defaultSetup.smsOutBidder; rol.RollImagesBackColor = defaultSetup.BackgroundColor; rol.HomePeriodDescriptionBackColor = defaultSetup.HomePeriodDescriptionBackColor; rol.ActionBackColor = defaultSetup.ActionBackColor; rol.RollActionBidColor = defaultSetup.RollActionBidColor; rol.RollActionBackIndexColor = defaultSetup.RollActionBackIndexColor; return(View(rol)); }
public ActionResult DeleteConfirmed(int id) { DefaultSetup defaultSetup = db.DefaultSetups.Find(id); db.DefaultSetups.Remove(defaultSetup); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Description,Active,BackgroundColor,FontColor,RefreshTime,AuctionDelayTime,LogoPath,LogoName,SmallLogoName,RollImagesPath,SmsNotification,LogoBackgroundColor,SMSAllFunctionality,SMSCustRegistration,SMSConfirmationLoginRequired,emailConfirmRegistration,emailConfirmationLoginRequired,BackgroundColorHome, DefaultAuction, smsOutBidder, PageSize, DispLines, DispColumns, RollDispRefreshRate, HomePeriodDescription, HomePeriodDescriptionTextColor, HomePeriodDescriptionBackColor, ActionTextColor, ActionBackColor, RollActionBidColor, RollActionBackIndexColor")] DefaultSetup defaultSetup) { if (ModelState.IsValid) { db.Entry(defaultSetup).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DefaultAuction = new SelectList(db.ltRollDescriptions, "ID", "Description", defaultSetup.DefaultAuction); return(View(defaultSetup)); }
// GET: DefaultSetups/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DefaultSetup defaultSetup = db.DefaultSetups.Find(id); if (defaultSetup == null) { return(HttpNotFound()); } return(View(defaultSetup)); }
// GET: DefaultSetups/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DefaultSetup defaultSetup = db.DefaultSetups.Find(id); if (defaultSetup == null) { return(HttpNotFound()); } ViewBag.DefaultAuction = new SelectList(db.ltRollDescriptions, "ID", "Description", defaultSetup.DefaultAuction); return(View(defaultSetup)); }
public static IAppBuilder MapCore(this IAppBuilder app, X509Certificate2 signingCertificate) { app.Map(Constants.Routes.Core, coreApp => { var efConfig = new EntityFrameworkServiceOptions { ConnectionString = Constants.ConnectionStringName }; var factory = new IdentityServerServiceFactory(); factory.RegisterConfigurationServices(efConfig); factory.RegisterOperationalServices(efConfig); factory.RegisterClientStore(efConfig); factory.RegisterScopeStore(efConfig); factory.Register(new Registration <UserManager>()); factory.Register(new Registration <UserStore>()); factory.Register(new Registration <Context>(resolver => new Context(Constants.ConnectionStringName))); factory.UserService = new Registration <IUserService, UserService>(); DefaultSetup.Configure(efConfig); coreApp.UseIdentityServer(new IdentityServerOptions { Factory = factory, SigningCertificate = signingCertificate, SiteName = "IdentityServer3 Starter Kit", LoggingOptions = new LoggingOptions { EnableKatanaLogging = true }, EventsOptions = new EventsOptions { RaiseFailureEvents = true, RaiseInformationEvents = true, RaiseSuccessEvents = true, RaiseErrorEvents = true } }); }); return(app); }
public UnitTestBase()//bool defaultSetup = true) //Func<IDbConnection>? connectionBuilder = null) { MasterConnectionString = $"Data Source=master_{Guid.NewGuid().ToString().Replace("-", "")};Mode=Memory;Cache=Shared"; MasterBackupConnectionString = MasterConnectionString.Replace("master", "master_backup"); baseCollection = new ServiceCollection(); cancelSource = new CancellationTokenSource(); safetySource = new CancellationTokenSource(); safetySource.CancelAfter(5000); baseCollection.AddLogging(builder => { builder.AddDebug(); builder.SetMinimumLevel(LogLevel.Debug); }); DefaultSetup.OneTimeSetup(); DefaultSetup.AddDefaultServices(baseCollection, () => new SqliteConnection(MasterConnectionString)); DefaultSetup.AddSecurity(baseCollection, SecretKey); baseProvider = baseCollection.BuildServiceProvider(); logger = GetService <ILogger <UnitTestBase> >(); }
public DefaultSetupModel LoadDefs(int?AuctionID) { DefaultSetupModel ds = new DefaultSetupModel(); // Laai eers alles vanaf DefaultSetup table. DefaultSetup defaultSetup = db.DefaultSetups.FirstOrDefault(t => t.Active == true); if (defaultSetup != null) // het gekry. { ds.ID = AuctionID; // Het gekry en rollID is dus reg. ds.Description = defaultSetup.Description; ds.BackgroundColor = defaultSetup.BackgroundColor; ds.FontColor = defaultSetup.FontColor; ds.LogoBackgroundColor = defaultSetup.LogoBackgroundColor; ds.RefreshTime = defaultSetup.RefreshTime.ToString(); ds.RollImagePath = defaultSetup.RollImagesPath; ds.Active = defaultSetup.Active; ds.LogoPath = defaultSetup.LogoPath; ds.LogoName = defaultSetup.LogoName; ds.SmallLogoName = defaultSetup.LogoPath; ds.RollImagePath = defaultSetup.RollImagesPath; ds.AuctionDelayTime = defaultSetup.AuctionDelayTime.ToString(); ds.SMSNewBidder = defaultSetup.SmsNotification; ds.SMSAllFunctionality = defaultSetup.SMSAllFunctionality; ds.SMSCustRegistration = defaultSetup.SMSCustRegistration; ds.SMSConfirmationLoginRequired = defaultSetup.SMSConfirmationLoginRequired; ds.emailConfirmRegistration = defaultSetup.emailConfirmRegistration; ds.emailConfirmationLoginRequired = defaultSetup.emailConfirmationLoginRequired; ds.BackgroundColorHome = defaultSetup.BackgroundColorHome; ds.DispLines = defaultSetup.DispLines; ds.DispColumns = defaultSetup.DispColumns; ds.pageSize = ds.DispLines * ds.DispColumns; ds.RollDispRefreshRate = defaultSetup.RollDispRefreshRate; ds.HomePeriodDescription = defaultSetup.HomePeriodDescription; ds.HomePeriodDescriptionTextColor = defaultSetup.HomePeriodDescriptionTextColor; ds.HomePeriodDescriptionBackColor = defaultSetup.HomePeriodDescriptionBackColor; ds.ActionTextColor = defaultSetup.ActionTextColor; ds.ActionBackColor = defaultSetup.ActionBackColor; if (defaultSetup.DefaultAuction != null) { ds.DefaultAuction = defaultSetup.DefaultAuction; } else { ds.DefaultAuction = 0; } ds.SMSOutBidder = defaultSetup.smsOutBidder; ds.message = "Please select an Auction"; } if (AuctionID != 0) // Laai rol spesifieke inligting { ltRollDescription ltRollDescriptions = db.ltRollDescriptions.Find(AuctionID); if (ltRollDescriptions != null) // het gekry. { ds.ID = AuctionID; // Het gekry en rollID is dus reg. ds.AuctionID = AuctionID.ToString(); // String van ID ds.Description = ltRollDescriptions.Description; ds.BackgroundColor = ltRollDescriptions.BackgroundColor; ds.FontColor = ltRollDescriptions.FontColor; ds.LogoBackgroundColor = ltRollDescriptions.LogoBackgroundColor; ds.RefreshTime = ltRollDescriptions.RefreshTime.ToString(); ds.RollImagePath = ltRollDescriptions.RollImagesPath; ds.Active = ltRollDescriptions.Active; ds.LogoPath = ltRollDescriptions.LogoPath; ds.LogoName = ltRollDescriptions.LogoName; ds.SmallLogoName = ltRollDescriptions.LogoPath; ds.RollImagePath = ltRollDescriptions.RollImagesPath; ds.AuctionDelayTime = ltRollDescriptions.AuctionDelayTime.ToString(); ds.SMSNewBidder = ltRollDescriptions.SmsNotification; ds.SMSOutBidder = ltRollDescriptions.smsOutBidder; ds.RollImagesBackColor = ltRollDescriptions.RollImagesBackColor; ds.RollActionBidColor = ltRollDescriptions.RollActionBidColor; ds.RollActionBackIndexColor = ltRollDescriptions.RollActionBackIndexColor; ds.HomePeriodDescription = ltRollDescriptions.HomePeriodDescription; ds.HomePeriodDescriptionTextColor = ltRollDescriptions.HomePeriodDescriptionTextColor; ds.HomePeriodDescriptionBackColor = ltRollDescriptions.HomePeriodDescriptionBackColor; ds.ActionTextColor = ltRollDescriptions.ActionTextColor; ds.ActionBackColor = ltRollDescriptions.ActionBackColor; ds.message = "Roll not loaded yet. Will be available soon!"; } } return(ds); }
public void WriteTo(DataStreamWriter writer, ref ProjectileExplodedEndReason baseline, DefaultSetup setup, SerializeClientData jobData) { var quantized = new QuantizedFloat3(); quantized.Set(100, normal); for (var i = 0; i != 3; i++) { writer.WritePackedInt(quantized[i], jobData.NetworkCompressionModel); } }