Ejemplo n.º 1
0
        public override void UpdatePackage()
        {
            bool        bUpdateSupportedFeatures = Null.NullBoolean;
            PackageInfo _Package = PackageController.GetPackage(PackageID);

            //Update module settings
            if (desktopModuleForm.IsValid)
            {
                var desktopModule = desktopModuleForm.DataSource as DesktopModuleInfo;
                if (desktopModule != null && _Package != null)
                {
                    desktopModule.Shareable    = (ModuleSharing)Enum.Parse(typeof(ModuleSharing), Shareable.ComboBox.SelectedValue.ToString());
                    desktopModule.FriendlyName = _Package.FriendlyName;
                    desktopModule.Version      = Globals.FormatVersion(_Package.Version);
                    if (string.IsNullOrEmpty(desktopModule.BusinessControllerClass))
                    {
                        desktopModule.SupportedFeatures = 0;
                        //If there is no BusinessControllerClass, then there is no any implementation
                    }
                    else
                    {
                        DesktopModuleController controller = new DesktopModuleController();
                        controller.UpdateModuleInterfaces(ref desktopModule);
                    }
                    DesktopModuleController.SaveDesktopModule(desktopModule, false, true);
                }
            }
        }
Ejemplo n.º 2
0
        public override void UpdatePackage()
        {
            bool        bUpdateSupportedFeatures = Null.NullBoolean;
            PackageInfo _Package = PackageController.GetPackage(PackageID);

            //Update module settings
            if (desktopModuleForm.IsValid)
            {
                var desktopModule = desktopModuleForm.DataSource as DesktopModuleInfo;
                if (desktopModule != null && _Package != null)
                {
                    desktopModule.FriendlyName = _Package.FriendlyName;
                    desktopModule.Version      = Globals.FormatVersion(_Package.Version);
                    if (string.IsNullOrEmpty(desktopModule.BusinessControllerClass))
                    {
                        desktopModule.SupportedFeatures = 0;
                    }
                    else
                    {
                        bUpdateSupportedFeatures = true;
                    }
                    DesktopModuleController.SaveDesktopModule(desktopModule, false, true);
                }

                if (bUpdateSupportedFeatures)
                {
                    DesktopModuleController controller = new DesktopModuleController();
                    controller.UpdateModuleInterfaces(ref desktopModule);
                }
            }
        }