コード例 #1
0
        private void btnPreBuilt_Click(object sender, EventArgs e)
        {
            Forms.PrebuiltConfigForm pbForm = new CallButler.Manager.Forms.PrebuiltConfigForm();

            if (pbForm.ShowDialog(this) == DialogResult.OK)
            {
                ManagementInterfaceClient.ManagementInterface.PersistExtension(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Extensions);
                ManagementInterfaceClient.ManagementInterface.PersistDepartment(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Departments);
                ManagementInterfaceClient.ManagementInterface.PersistExtensionContactNumbers(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.ExtensionContactNumbers);

                WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable();

                // Persist our greeting sounds
                foreach (WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow in pbForm.ConfigurationData.LocalizedGreetings)
                {
                    lgTable.Clear();
                    lgTable.ImportRow(lgRow);
                    ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable);
                    Utils.GreetingUtils.PersistLocalizedGreetingSound(lgRow);
                }

                ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.PersonalizedGreetings);
                ManagementInterfaceClient.ManagementInterface.PersistProviders(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Providers);
                ManagementInterfaceClient.ManagementInterface.PersistScriptSchedule(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.ScriptSchedules);

                LoadData();
            }
        }
コード例 #2
0
        private void PersistDepartmentGreeting(WOSI.CallButler.Data.CallButlerDataset.DepartmentsRow department, WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow localizedGreeting, Forms.DepartmentForm dpForm)
        {
            // If the department is a greeting, add a new localized greeting
            if (department.Type == (short)WOSI.CallButler.Data.DepartmentTypes.Greeting)
            {
                WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable localizedGreetingTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable();

                bool newRowCreated = false;
                if (localizedGreeting == null)
                {
                    localizedGreeting = localizedGreetingTable.NewLocalizedGreetingsRow();
                    localizedGreeting.LocalizedGreetingID = Guid.NewGuid();
                    localizedGreeting.GreetingID          = department.DepartmentID;
                    localizedGreeting.LanguageID          = GetCurrentLanguage();

                    localizedGreetingTable.AddLocalizedGreetingsRow(localizedGreeting);
                    newRowCreated = true;
                }
                //else


                dpForm.GreetingControl.SaveGreeting(WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache), localizedGreeting);
                if (newRowCreated == false)
                {
                    localizedGreetingTable.ImportRow(localizedGreeting);
                }

                ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, localizedGreetingTable);

                // Send our greeting sound file
                Utils.GreetingUtils.PersistLocalizedGreetingSound(localizedGreeting);
            }
        }
コード例 #3
0
        private void btnHeadStart_Click(object sender, EventArgs e)
        {
            Forms.PrebuiltConfigForm pbForm = new CallButler.Manager.Forms.PrebuiltConfigForm();

            if (pbForm.ShowDialog(this) == DialogResult.OK)
            {
                WOSI.CallButler.Data.CallButlerDataset.ExtensionsDataTable extensions = new WOSI.CallButler.Data.CallButlerDataset.ExtensionsDataTable();
                extensions.Merge(pbForm.ConfigurationData.Extensions);
                ManagementInterfaceClient.ManagementInterface.PersistExtension(ManagementInterfaceClient.AuthInfo, extensions);

                WOSI.CallButler.Data.CallButlerDataset.ExtensionContactNumbersDataTable contactNumbers = new WOSI.CallButler.Data.CallButlerDataset.ExtensionContactNumbersDataTable();
                contactNumbers.Merge(pbForm.ConfigurationData.ExtensionContactNumbers);
                ManagementInterfaceClient.ManagementInterface.PersistExtensionContactNumbers(ManagementInterfaceClient.AuthInfo, contactNumbers);

                ManagementInterfaceClient.ManagementInterface.PersistDepartment(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Departments);

                WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable();

                // Persist our greeting sounds
                foreach (WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow in pbForm.ConfigurationData.LocalizedGreetings)
                {
                    lgTable.Clear();
                    lgTable.ImportRow(lgRow);
                    ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable);
                    Utils.GreetingUtils.PersistLocalizedGreetingSound(lgRow);
                }

                ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.PersonalizedGreetings);
                ManagementInterfaceClient.ManagementInterface.PersistProviders(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Providers);
                ManagementInterfaceClient.ManagementInterface.PersistScriptSchedule(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.ScriptSchedules);

                // Send us back to the try it now page
                Wizard.NextTo(pgTest);
            }
        }
コード例 #4
0
        private void btnPreBuilt_Click(object sender, EventArgs e)
        {
            Forms.PrebuiltConfigForm pbForm = new CallButler.Manager.Forms.PrebuiltConfigForm();

            if (pbForm.ShowDialog(this) == DialogResult.OK)
            {
                ManagementInterfaceClient.ManagementInterface.PersistExtension(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Extensions);
                ManagementInterfaceClient.ManagementInterface.PersistDepartment(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Departments);
                ManagementInterfaceClient.ManagementInterface.PersistExtensionContactNumbers(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.ExtensionContactNumbers);

                WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable();

                // Persist our greeting sounds
                foreach (WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow in pbForm.ConfigurationData.LocalizedGreetings)
                {
                    lgTable.Clear();
                    lgTable.ImportRow(lgRow);
                    ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable);
                    Utils.GreetingUtils.PersistLocalizedGreetingSound(lgRow);
                }

                ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.PersonalizedGreetings);
                ManagementInterfaceClient.ManagementInterface.PersistProviders(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Providers);
                ManagementInterfaceClient.ManagementInterface.PersistScriptSchedule(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.ScriptSchedules);

                LoadData();
            }
        }
コード例 #5
0
ファイル: CallFlowView.cs プロジェクト: hostitherepc/Fork-1
        private void PersistDepartmentGreeting(WOSI.CallButler.Data.CallButlerDataset.DepartmentsRow department, WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow localizedGreeting, Forms.DepartmentForm dpForm)
        {
            // If the department is a greeting, add a new localized greeting
            if (department.Type == (short)WOSI.CallButler.Data.DepartmentTypes.Greeting)
            {
                WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable localizedGreetingTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable();

                bool newRowCreated = false;
                if (localizedGreeting == null)
                {
                    localizedGreeting = localizedGreetingTable.NewLocalizedGreetingsRow();
                    localizedGreeting.LocalizedGreetingID = Guid.NewGuid();
                    localizedGreeting.GreetingID = department.DepartmentID;
                    localizedGreeting.LanguageID = GetCurrentLanguage();

                    localizedGreetingTable.AddLocalizedGreetingsRow(localizedGreeting);
                    newRowCreated = true;
                }
                //else

                dpForm.GreetingControl.SaveGreeting(WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache), localizedGreeting);
                if (newRowCreated == false)
                {
                    localizedGreetingTable.ImportRow(localizedGreeting);
                }

                ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, localizedGreetingTable);

                // Send our greeting sound file
                Utils.GreetingUtils.PersistLocalizedGreetingSound(localizedGreeting);
            }
        }
コード例 #6
0
ファイル: QuickStartForm.cs プロジェクト: hostitherepc/Fork-1
        private void btnHeadStart_Click(object sender, EventArgs e)
        {
            Forms.PrebuiltConfigForm pbForm = new CallButler.Manager.Forms.PrebuiltConfigForm();

            if (pbForm.ShowDialog(this) == DialogResult.OK)
            {
                WOSI.CallButler.Data.CallButlerDataset.ExtensionsDataTable extensions = new WOSI.CallButler.Data.CallButlerDataset.ExtensionsDataTable();
                extensions.Merge(pbForm.ConfigurationData.Extensions);
                ManagementInterfaceClient.ManagementInterface.PersistExtension(ManagementInterfaceClient.AuthInfo, extensions);

                WOSI.CallButler.Data.CallButlerDataset.ExtensionContactNumbersDataTable contactNumbers = new WOSI.CallButler.Data.CallButlerDataset.ExtensionContactNumbersDataTable();
                contactNumbers.Merge(pbForm.ConfigurationData.ExtensionContactNumbers);
                ManagementInterfaceClient.ManagementInterface.PersistExtensionContactNumbers(ManagementInterfaceClient.AuthInfo, contactNumbers);

                ManagementInterfaceClient.ManagementInterface.PersistDepartment(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Departments);

                WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable lgTable = new WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsDataTable();

                // Persist our greeting sounds
                foreach (WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow lgRow in pbForm.ConfigurationData.LocalizedGreetings)
                {
                    lgTable.Clear();
                    lgTable.ImportRow(lgRow);
                    ManagementInterfaceClient.ManagementInterface.PersistLocalizedGreeting(ManagementInterfaceClient.AuthInfo, lgTable);
                    Utils.GreetingUtils.PersistLocalizedGreetingSound(lgRow);
                }

                ManagementInterfaceClient.ManagementInterface.PersistPersonalizedGreeting(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.PersonalizedGreetings);
                ManagementInterfaceClient.ManagementInterface.PersistProviders(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.Providers);
                ManagementInterfaceClient.ManagementInterface.PersistScriptSchedule(ManagementInterfaceClient.AuthInfo, pbForm.ConfigurationData.ScriptSchedules);

                // Send us back to the try it now page
                Wizard.NextTo(pgTest);
            }
        }