private void EditPersonalizedGreeting(WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsRow pgRow) { // Get our localized greeting WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = ManagementInterfaceClient.ManagementInterface.GetLocalizedGreetingInDefaultLanguage(ManagementInterfaceClient.AuthInfo, pgRow.PersonalizedGreetingID); if (lgTable.Count == 0) { // If no localized greeting exists, add a new one WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow = lgTable.NewLocalizedGreetingsRow(); lgRow.LocalizedGreetingID = Guid.NewGuid(); lgRow.GreetingID = pgRow.PersonalizedGreetingID; lgRow.LanguageID = ManagementInterfaceClient.ManagementInterface.GetDefaultLanguage(ManagementInterfaceClient.AuthInfo); lgRow.Type = (short)WOSI.CallButler.Data.GreetingType.SoundGreeting; lgTable.AddLocalizedGreetingsRow(lgRow); } Forms.PersonalizedGreetingForm pgForm = new CallButler.Manager.Forms.PersonalizedGreetingForm(pgRow, callButlerDataset.Extensions); pgForm.GreetingControl.LoadGreeting(lgTable[0], WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); if (pgForm.ShowDialog(this) == DialogResult.OK) { pgForm.GreetingControl.SaveGreeting(WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); // Persist remotely ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, Utils.TableUtils <WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsDataTable> .CreateTableFromRow(pgRow)); ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable); // Send our localized greeting sound file Utils.GreetingUtils.PersistLocalizedGreetingSound(lgTable[0]); callButlerDataset.AcceptChanges(); } }
internal void AddPersonalizedGreeting() { // Create a new personalized greeting row and table WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsDataTable pgTable = new WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsDataTable(); WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsRow pgRow = pgTable.NewPersonalizedGreetingsRow(); pgRow.PersonalizedGreetingID = Guid.NewGuid(); pgRow.Type = (short)WOSI.CallButler.Data.PersonalizedGreetingType.Continue; pgTable.AddPersonalizedGreetingsRow(pgRow); // Create a new localized greeting row and table WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable(); WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow = lgTable.NewLocalizedGreetingsRow(); lgRow.LocalizedGreetingID = Guid.NewGuid(); lgRow.GreetingID = pgRow.PersonalizedGreetingID; lgRow.LanguageID = ManagementInterfaceClient.ManagementInterface.GetDefaultLanguage( ManagementInterfaceClient.AuthInfo ); lgRow.Type = (short)WOSI.CallButler.Data.GreetingType.SoundGreeting; lgTable.AddLocalizedGreetingsRow(lgRow); Forms.PersonalizedGreetingForm pgForm = new CallButler.Manager.Forms.PersonalizedGreetingForm(pgRow, callButlerDataset.Extensions); pgForm.GreetingControl.LoadGreeting(lgRow, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); if (pgForm.ShowDialog(this) == DialogResult.OK) { pgForm.GreetingControl.SaveGreeting(WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); // Add remotely ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, pgTable); ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable); // Send our localized greeting sound file Utils.GreetingUtils.PersistLocalizedGreetingSound(lgRow); // Add locally callButlerDataset.PersonalizedGreetings.ImportRow(pgRow); callButlerDataset.AcceptChanges(); } }
internal void AddPersonalizedGreeting() { // Create a new personalized greeting row and table WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsDataTable pgTable = new WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsDataTable(); WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsRow pgRow = pgTable.NewPersonalizedGreetingsRow(); pgRow.PersonalizedGreetingID = Guid.NewGuid(); pgRow.Type = (short)WOSI.CallButler.Data.PersonalizedGreetingType.Continue; pgTable.AddPersonalizedGreetingsRow(pgRow); // Create a new localized greeting row and table WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable(); WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow = lgTable.NewLocalizedGreetingsRow(); lgRow.LocalizedGreetingID = Guid.NewGuid(); lgRow.GreetingID = pgRow.PersonalizedGreetingID; lgRow.LanguageID = ManagementInterfaceClient.ManagementInterface.GetDefaultLanguage(ManagementInterfaceClient.AuthInfo); lgRow.Type = (short)WOSI.CallButler.Data.GreetingType.SoundGreeting; lgTable.AddLocalizedGreetingsRow(lgRow); Forms.PersonalizedGreetingForm pgForm = new CallButler.Manager.Forms.PersonalizedGreetingForm(pgRow, callButlerDataset.Extensions); pgForm.GreetingControl.LoadGreeting(lgRow, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); if (pgForm.ShowDialog(this) == DialogResult.OK) { pgForm.GreetingControl.SaveGreeting(WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); // Add remotely ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, pgTable); ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable); // Send our localized greeting sound file Utils.GreetingUtils.PersistLocalizedGreetingSound(lgRow); // Add locally callButlerDataset.PersonalizedGreetings.ImportRow(pgRow); callButlerDataset.AcceptChanges(); } }
private void EditPersonalizedGreeting(WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsRow pgRow) { // Get our localized greeting WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = ManagementInterfaceClient.ManagementInterface.GetLocalizedGreetingInDefaultLanguage(ManagementInterfaceClient.AuthInfo, pgRow.PersonalizedGreetingID); if (lgTable.Count == 0) { // If no localized greeting exists, add a new one WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow = lgTable.NewLocalizedGreetingsRow(); lgRow.LocalizedGreetingID = Guid.NewGuid(); lgRow.GreetingID = pgRow.PersonalizedGreetingID; lgRow.LanguageID = ManagementInterfaceClient.ManagementInterface.GetDefaultLanguage(ManagementInterfaceClient.AuthInfo); lgRow.Type = (short)WOSI.CallButler.Data.GreetingType.SoundGreeting; lgTable.AddLocalizedGreetingsRow(lgRow); } Forms.PersonalizedGreetingForm pgForm = new CallButler.Manager.Forms.PersonalizedGreetingForm(pgRow, callButlerDataset.Extensions); pgForm.GreetingControl.LoadGreeting(lgTable[0], WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); if (pgForm.ShowDialog(this) == DialogResult.OK) { pgForm.GreetingControl.SaveGreeting(WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache)); // Persist remotely ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, Utils.TableUtils<WOSI.CallButler.Data.CallButlerDataset.PersonalizedGreetingsDataTable>.CreateTableFromRow(pgRow)); ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable); // Send our localized greeting sound file Utils.GreetingUtils.PersistLocalizedGreetingSound(lgTable[0]); callButlerDataset.AcceptChanges(); } }