public ScriptScheduleForm(WOSI.CallButler.Data.CallButlerDataset.ScriptSchedulesRow scriptSchedule) { InitializeComponent(); this.scriptSchedule = scriptSchedule; timeUtils = new WOSI.Utilities.TimeUtils(); cboTimeZone.DataSource = timeUtils.TimeZones; cboTimeZone.SelectedIndex = timeUtils.CurrentTimeZoneIndex; // Load our data txtName.Text = scriptSchedule.Name; txtScriptFile.Text = scriptSchedule.ScriptLocation; cbEnabled.Checked = scriptSchedule.Enabled; cbHasHours.Checked = scriptSchedule.HasHoursOfOperation; scheduleControl.DeserializeSelection(scriptSchedule.HoursOfOperation); if (!scriptSchedule.IsHoursOfOperationUTCOffsetNull()) { int tzIndex = timeUtils.GetTimeZoneIndexFromStandardOffset(scriptSchedule.HoursOfOperationUTCOffset); if (tzIndex >= 0) { cboTimeZone.SelectedIndex = tzIndex; } } wizard.PageIndex = 0; txtName.Select(); Utils.PrivateLabelUtils.ReplaceProductNameControl(this); }
public ScriptScheduleForm(WOSI.CallButler.Data.CallButlerDataset.ScriptSchedulesRow scriptSchedule) { InitializeComponent(); this.scriptSchedule = scriptSchedule; timeUtils = new WOSI.Utilities.TimeUtils(); cboTimeZone.DataSource = timeUtils.TimeZones; cboTimeZone.SelectedIndex = timeUtils.CurrentTimeZoneIndex; // Load our data txtName.Text = scriptSchedule.Name; txtScriptFile.Text = scriptSchedule.ScriptLocation; cbEnabled.Checked = scriptSchedule.Enabled; cbHasHours.Checked = scriptSchedule.HasHoursOfOperation; scheduleControl.DeserializeSelection(scriptSchedule.HoursOfOperation); if (!scriptSchedule.IsHoursOfOperationUTCOffsetNull()) { int tzIndex = timeUtils.GetTimeZoneIndexFromStandardOffset(scriptSchedule.HoursOfOperationUTCOffset); if (tzIndex >= 0) { cboTimeZone.SelectedIndex = tzIndex; } } wizard.PageIndex = 0; txtName.Select(); Utils.PrivateLabelUtils.ReplaceProductNameControl(this); }
public FindMeNumberDiagramShape(WOSI.CallButler.Data.CallButlerDataset.ExtensionsDataTable extensions, WOSI.CallButler.Data.CallButlerDataset.ExtensionContactNumbersRow contactRow) { this.contactRow = contactRow; this.extensions = extensions; InitializeComponent(); Expanded = false; WOSI.Utilities.TimeUtils timeUtils = new WOSI.Utilities.TimeUtils(); cboTimeZone.DataSource = timeUtils.TimeZones; cboTimeZone.SelectedIndex = timeUtils.CurrentTimeZoneIndex; numTimeout.Value = contactRow.Timeout; cbExtensionHours.Checked = contactRow.HasHoursOfOperation; scheduleControl.DeserializeSelection(contactRow.HoursOfOperation); // For compatibility with old data model if (contactRow.CallPBXPhone) { contactRow.CallPBXPhone = false; SelectIPPhone(); } else { switch ((WOSI.CallButler.Data.ExtensionContactNumberType)contactRow.Type) { case WOSI.CallButler.Data.ExtensionContactNumberType.TelephoneNumber: SelectTelephone(); txtContactNumber.Text = contactRow.ContactNumber; break; case WOSI.CallButler.Data.ExtensionContactNumberType.Extension: SelectExtension(); // Select the proper extension try { Guid extensionID = new Guid(contactRow.ContactNumber); foreach (global::Controls.ListBoxExItem item in cboExtension.Items) { WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension = (WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow)item.Tag; if (extension.ExtensionID == extensionID) { cboExtension.SelectedItem = item; } } } catch { } break; case WOSI.CallButler.Data.ExtensionContactNumberType.IPPhone: SelectIPPhone(); txtContactNumber.Text = ""; break; } } // Select the proper time zone if (!contactRow.IsHoursOfOperationUTCOffsetNull()) { int tzIndex = timeUtils.GetTimeZoneIndexFromStandardOffset(contactRow.HoursOfOperationUTCOffset); if (tzIndex >= 0) { cboTimeZone.SelectedIndex = tzIndex; } } loading = false; }
public FindMeNumberDiagramShape(WOSI.CallButler.Data.CallButlerDataset.ExtensionsDataTable extensions, WOSI.CallButler.Data.CallButlerDataset.ExtensionContactNumbersRow contactRow) { this.contactRow = contactRow; this.extensions = extensions; InitializeComponent(); Expanded = false; WOSI.Utilities.TimeUtils timeUtils = new WOSI.Utilities.TimeUtils(); cboTimeZone.DataSource = timeUtils.TimeZones; cboTimeZone.SelectedIndex = timeUtils.CurrentTimeZoneIndex; numTimeout.Value = contactRow.Timeout; cbExtensionHours.Checked = contactRow.HasHoursOfOperation; scheduleControl.DeserializeSelection(contactRow.HoursOfOperation); // For compatibility with old data model if (contactRow.CallPBXPhone) { contactRow.CallPBXPhone = false; SelectIPPhone(); } else { switch ((WOSI.CallButler.Data.ExtensionContactNumberType)contactRow.Type) { case WOSI.CallButler.Data.ExtensionContactNumberType.TelephoneNumber: SelectTelephone(); txtContactNumber.Text = contactRow.ContactNumber; break; case WOSI.CallButler.Data.ExtensionContactNumberType.Extension: SelectExtension(); // Select the proper extension try { Guid extensionID = new Guid(contactRow.ContactNumber); foreach (global::Controls.ListBoxExItem item in cboExtension.Items) { WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension = (WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow)item.Tag; if (extension.ExtensionID == extensionID) { cboExtension.SelectedItem = item; } } } catch { } break; case WOSI.CallButler.Data.ExtensionContactNumberType.IPPhone: SelectIPPhone(); txtContactNumber.Text = ""; break; } } // Select the proper time zone if (!contactRow.IsHoursOfOperationUTCOffsetNull()) { int tzIndex = timeUtils.GetTimeZoneIndexFromStandardOffset(contactRow.HoursOfOperationUTCOffset); if (tzIndex >= 0) { cboTimeZone.SelectedIndex = tzIndex; } } loading = false; }