Ejemplo n.º 1
0
 public static SccmRule CreateNewSccmRuleWithDefaults(ref Product product, SccmRuleType sccmRuleType,
     SccmRuleConnector sccmRuleConnector = SccmRuleConnector.Null)
 {
     SccmRule sccmRule;
     if (sccmRuleType.Equals(SccmRuleType.FileFolder))
     {
         sccmRule = CreateNewFileFolderRuleWithDefaults();
     }
     else if (sccmRuleType.Equals(SccmRuleType.Registry))
     {
         sccmRule = CreateNewRegistryRuleWithDefaults();
     }
     else
     {
         sccmRule = CreateNewWindowsInstallerRuleWithDefaults();
     }
     if (product.SccmRules.Count == 0)
     {
         sccmRule.SccmRuleOrder = 0;
     }
     else
     {
         sccmRule.SccmRuleOrder = product.SccmRules.Count + 1;
     }
     sccmRule.SccmRuleConnector = sccmRuleConnector;
     sccmRule.SccmRuleType = sccmRuleType;
     return sccmRule;
 }
Ejemplo n.º 2
0
 public ProductViewModel(Product product)
 {
     Id = product.ProductId;
     Name = product.ProductName;
     Manufacturer = product.ProductManufacturer;
     Description = product.ProductDescription;
     Version = product.ProductVersion;
     CreatedOnDate = product.CreatedOnDate;
     Status = product.ProductStatus.ToString();
     ProductType = product.ProductType == null ? string.Empty : product.ProductType.ProductTypeName;
     Category = product.ProductCategory == null ? string.Empty : product.ProductCategory.ProductCategoryName;
     ProductCode = product.ProductCode;
     UpgradeCode = product.ProductUpgradeCode;
     SoftwarePolicyType = product.SoftwarePolicy.SoftwarePolicyType.ToString().ToUpper();
     ElevatedRightsRequired = product.ProductsPermissions != null && product.ProductsPermissions.ElevatedRightsRequired;
     RequiresAdminRightsAdvanced = product.ProductsPermissions != null && product.ProductsPermissions.RequiresAdminRightsAdvanced;
     RequiresAdminRightsBasic = product.ProductsPermissions != null && product.ProductsPermissions.RequiresAdminRightsBasic;
     RequiresAdminRightsUpdate = product.ProductsPermissions != null && product.ProductsPermissions.RequiresAdminRightsUpdates;
     LocalAccountVerificationComplete = product.LocalAccountVerification != null && product.LocalAccountVerification.LocalAdminVerificationComplete;
     WorksWithLocalAccount = product.LocalAccountVerification != null && product.LocalAccountVerification.WorksWithLocalAdminAccount;
     DoesNotWorkWithLocalAccount = WorksWithLocalAccount != true;
 }