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; } }
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; } }