コード例 #1
0
        public List <DocumentRequisite> GetReports(int auctionId)
        {
            var auction = DataManager.GetAuction(auctionId);

            if (auction == null || auction.CustomerId != CurrentUser.CustomerId)
            {
                throw new AltaHttpResponseException(System.Net.HttpStatusCode.Forbidden, "Not found auction");
            }

            return(ArchiveManager.GetFilesInfo(auction.FilesListId, AltaBO.specifics.DocumentTypeEnum.CustomerReport));
        }
コード例 #2
0
        public List <DocumentRequisite> getOtherDocumentsForCompany(int supplierId)
        {
            var company = DataManager.GetCompanySupplier(supplierId);

            if (company == null)
            {
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return(ArchiveManager.GetFilesInfo(company.filesListId, new List <int>()
            {
                (int)DocumentTypeEnum.Other
            }));
        }
コード例 #3
0
        public List <DocumentRequisite> getContractsDocuments()
        {
            var company = DataManager.GetCompany(CurrentUser.CompanyId);

            if (company == null)
            {
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return(ArchiveManager.GetFilesInfo(company.filesListId, new List <int>()
            {
                (int)DocumentTypeEnum.Contract
            }));
        }
コード例 #4
0
        public List <DocumentRequisite> GetCommerticals(int companyId)
        {
            var company = DataManager.GetCompany(companyId);

            if (company == null)
            {
                throw new AltaHttpResponseException(HttpStatusCode.NotFound, "Not found \"company\".");
            }

            return(ArchiveManager.GetFilesInfo(company.filesListId, new List <int>()
            {
                (int)DocumentTypeEnum.CommercialOffer
            }));
        }
コード例 #5
0
        public DocumentRequisite GetProtocol(int auctionId)
        {
            var auction = DataManager.GetAuction(auctionId);

            if (auction == null || auction.CustomerId != CurrentUser.CustomerId)
            {
                throw new AltaHttpResponseException(System.Net.HttpStatusCode.Forbidden, "Not found auction");
            }

            var protocols = ArchiveManager.GetFilesInfo(auction.FilesListId, AltaBO.specifics.DocumentTypeEnum.Protocol);

            if (protocols.Count == 0)
            {
                throw new AltaHttpResponseException(System.Net.HttpStatusCode.NotFound, "Not found procolol");
            }
            return(protocols.First());
        }
コード例 #6
0
 public List <DocumentRequisite> GetFiles([FromUri] int fileListId = 0, [FromUri] List <int> types = null)
 {
     return(ArchiveManager.GetFilesInfo(fileListId, types));
 }