コード例 #1
0
ファイル: RepositoryItem.cs プロジェクト: EdutechSRL/Adevico
        private static RepositoryItem CreateBaseItem(long idFather, dtoUploadedItem dto, Boolean isDownloadable, DisplayMode mode, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryIdentifier identifier)
        {
            RepositoryItem item = RepositoryItem.CreateBaseItem(idFather, dto.Type, dto.Name, dto.Extension, "", isDownloadable, mode, dto.IsVisible, person, date, ipAddress, proxyIpAddress, identifier);

            item.UniqueId        = dto.UniqueId;
            item.UniqueIdVersion = dto.UniqueId;
            item.Size            = dto.Size;
            item.ContentType     = dto.ContentType;
            item.IsDownloadable  = isDownloadable;
            item.Type            = dto.Type;
            switch (dto.Type)
            {
            case ItemType.Multimedia:
            case ItemType.ScormPackage:
                item.Availability = ItemAvailability.transfer;
                item.Status       = ItemStatus.Active;
                break;

            default:
                item.Availability = ItemAvailability.available;
                item.Status       = ItemStatus.Active;
                break;
            }
            return(item);
        }
コード例 #2
0
ファイル: RepositoryItem.cs プロジェクト: EdutechSRL/Adevico
        public static RepositoryItem CreateFolder(long idFather, dtoFolderName dto, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryType type, Int32 idCommunity)
        {
            RepositoryItem folder = RepositoryItem.CreateBaseItem(idFather, ItemType.Folder, dto.Name, "", "", true, DisplayMode.downloadOrPlay, dto.IsVisible, person, date, ipAddress, proxyIpAddress, type, idCommunity);

            folder.AllowUpload = dto.AllowUpload;
            return(folder);
        }
コード例 #3
0
ファイル: RepositoryItem.cs プロジェクト: EdutechSRL/Adevico
        public static RepositoryItem CreateFile(dtoUploadedItem dto, Boolean isDownloadable, DisplayMode mode, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryIdentifier identifier, Object obj, long idObject, Int32 idObjectType, Int32 idModule, String moduleCode, Int32 idModuleAjaxAction, Int32 idModuleAction = 0)
        {
            RepositoryItem item = RepositoryItem.CreateBaseItem(0, dto, isDownloadable, mode, person, date, ipAddress, proxyIpAddress, identifier.Type, identifier.IdCommunity);

            item.IsInternal                = true;
            item.Module                    = new ItemModuleSettings();
            item.Module.ModuleCode         = moduleCode;
            item.Module.IdObjectType       = idObjectType;
            item.Module.IdObject           = idObject;
            item.Module.IdModuleAction     = idModuleAction;
            item.Module.FullyQualifiedName = obj.GetType().FullName;
            item.Module.IdModuleAjaxAction = idModuleAjaxAction;
            return(item);
        }
コード例 #4
0
ファイル: RepositoryItem.cs プロジェクト: EdutechSRL/Adevico
 public static RepositoryItem CreateFile(long idFather, dtoUploadedItem dto, Boolean isDownloadable, DisplayMode mode, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryIdentifier identifier)
 {
     return(RepositoryItem.CreateBaseItem(idFather, dto, isDownloadable, mode, person, date, ipAddress, proxyIpAddress, identifier));
 }
コード例 #5
0
ファイル: RepositoryItem.cs プロジェクト: EdutechSRL/Adevico
 public static RepositoryItem CreateLink(long idFather, dtoUrlItem dto, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryType type, Int32 idCommunity)
 {
     return(RepositoryItem.CreateBaseItem(idFather, ItemType.Link, dto.Name, "", dto.Address, true, DisplayMode.downloadOrPlay, dto.IsVisible, person, date, ipAddress, proxyIpAddress, type, idCommunity));
 }