예제 #1
0
 //----------------------------------------------------------
 public void AddCategories(ItemsModulesOptions ItemsModule, int ParentID, ModuleBaseTypes ModuleBaseType)
 {
     //-------------------------------------------------------------
     InitialCategory.ParentID     = ParentID;
     InitialCategory.ModuleTypeID = ItemsModule.ModuleTypeID;
     //-------------------------------------------------------------
     for (int i = 0; i < 3; i++)
     {
         if (SiteSettings.Languages_HasArabicLanguages)
         {
             InitialCategory.Details[Languages.Ar] = InitialCategoryArDetails;
         }
         if (SiteSettings.Languages_HasEnglishLanguages)
         {
             InitialCategory.Details[Languages.En] = InitialCategoryEnDetails;
         }
         ExecuteCommandStatus status = ItemCategoriesFactory.Create(InitialCategory, ItemsModule);
         if (status == ExecuteCommandStatus.Done)
         {
             if (ModuleBaseType == ModuleBaseTypes.Items)
             {
                 AddItems(ItemsModule, InitialCategory.CategoryID);
             }
             else if (ModuleBaseType == ModuleBaseTypes.Messages)
             {
                 AddMessages(ItemsModule.ModuleTypeID, InitialCategory.CategoryID);
             }
         }
     }
 }
예제 #2
0
 //----------------------------------------------------------
 public void AddComments(int ModuleTypeID, int itemID, ModuleBaseTypes ModuleBaseType)
 {
     //-------------------------------------------------------------
     InitialArComment.ItemID         = itemID;
     InitialArComment.BaseModuleType = ModuleBaseType;
     InitialArComment.ModuleTypeID   = ModuleTypeID;
     //-------------------------------------------------------------
     InitialEnComment.ItemID         = itemID;
     InitialEnComment.BaseModuleType = ModuleBaseType;
     InitialEnComment.ModuleTypeID   = ModuleTypeID;
     //-------------------------------------------------------------
     for (int i = 0; i < 2; i++)
     {
         if (SiteSettings.Languages_HasArabicLanguages)
         {
             ExecuteCommandStatus ArStatus = ItemsCommentsFactory.Create(InitialArComment);
         }
         if (SiteSettings.Languages_HasEnglishLanguages)
         {
             ExecuteCommandStatus EnStatus = ItemsCommentsFactory.Create(InitialEnComment);
         }
     }
 }
예제 #3
0
 //----------------------------------------------------------
 #endregion
 public void AddParentCategories(ItemsModulesOptions itemsModule, ModuleBaseTypes ModuleBaseType)
 {
     //-------------------------------------------------------------
     InitialCategoryParent.ParentID     = 0;
     InitialCategoryParent.ModuleTypeID = itemsModule.ModuleTypeID;
     //-------------------------------------------------------------
     for (int i = 0; i < 3; i++)
     {
         if (SiteSettings.Languages_HasArabicLanguages)
         {
             InitialCategoryParent.Details[Languages.Ar] = InitialCategoryArDetails;
         }
         if (SiteSettings.Languages_HasEnglishLanguages)
         {
             InitialCategoryParent.Details[Languages.En] = InitialCategoryEnDetails;
         }
         ExecuteCommandStatus status = ItemCategoriesFactory.Create(InitialCategoryParent, itemsModule);
         if (status == ExecuteCommandStatus.Done)
         {
             AddCategories(itemsModule, InitialCategoryParent.CategoryID, ModuleBaseType);
         }
     }
 }