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)); }
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 })); }
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 })); }
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 })); }
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()); }
public List <DocumentRequisite> GetFiles([FromUri] int fileListId = 0, [FromUri] List <int> types = null) { return(ArchiveManager.GetFilesInfo(fileListId, types)); }