public void GenerateNumber() { Debug.Assert(User != null, "User has not been set!"); var frm = new AutoNumberOptions(User, AutoNumberCategory, AutoNumberTable, AutoNumberField); frm.Owner = this.FindParentWindow(); if (frm.GenerateNumber()) { txt.Text = frm.AutoNumber; } }
public AutoNumberGenerator(string connectionString, string containerName, int batchSize, int maxWriteAttempts) { var blobStorageAccount = CloudStorageAccount.Parse(connectionString); var blobOptimisticDataStore = new BlobOptimisticDataStore(blobStorageAccount, containerName); var options = new AutoNumberOptions { BatchSize = batchSize, MaxWriteAttempts = maxWriteAttempts }; IOptions <AutoNumberOptions> optionsProvider = new OptionsWrapper <AutoNumberOptions>(options); generator = new UniqueIdGenerator(blobOptimisticDataStore, optionsProvider); }
private void ShowAutoNumber() { Debug.Assert(User != null, "User has not been set!"); var frm = new AutoNumberOptions(User, AutoNumberCategory, AutoNumberTable, AutoNumberField); frm.Owner = this.FindParentWindow(); if (frm.ShowDialog().ValueOrFalse()) { txt.Text = frm.AutoNumber; } }