private void menuitemDeviceChangeDeviceGroup_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new ChangeDeviceGroupWindow();

            dialog.Owner = this;
            dialog.CurrentTenantModel = this.CurrTenant;
            dialog.CurrDevice         = this.gridDevices.SelectedItem as DeviceModel;

            var dialogResult = dialog.ShowDialog();

            dialog = null;
        }
        private void menuitemDeviceChangeDeviceGroup_Click(object sender, RoutedEventArgs e)
        {
            if (this.gridDevices.Items.Count <= 0)
            {
                MessageBox.Show("Device is not exists", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            if (this.gridDeviceGroups.Items.Count <= 0)
            {
                MessageBox.Show("DeviceGroup is not exists", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            var dialog = new ChangeDeviceGroupWindow();

            dialog.Owner = this;
            dialog.CurrentTenantModel = this.CurrentTenantModel;

            dialog.CurrDevice = this.gridDevices.SelectedItem as DeviceModel;
            var dialogResult = dialog.ShowDialog();

            dialog = null;
        }