示例#1
0
        public ResponseMessage UpdateSiteDispatchVendorDocuments(SiteDispatchUpload uploadDocs, int dispatchRequestSubContractorId)
        {
            ResponseMessage responseMessage = new ResponseMessage();

            try {
                DispSubcontDocuments doc = new DispSubcontDocuments();
                doc.FileName      = uploadDocs.FileName;
                doc.FileType      = uploadDocs.FileType;
                doc.Path          = uploadDocs.Path;
                doc.DispSubcontId = dispatchRequestSubContractorId;
                _context.DispSubcontDocuments.Add(doc);
                _context.SaveChanges();
                responseMessage.Message = "File uploaded successfully";
                return(responseMessage);
            } catch (Exception ex) {
                throw ex;
            }
        }
示例#2
0
 public ResponseMessage SaveSubContractorComponentDocuments(int dispSubContractorId, string fileName, string fileType, string filePath)
 {
     try {
         ResponseMessage      responseMessage      = new ResponseMessage();
         DispSubcontDocuments dispSubContDocuments = new DispSubcontDocuments()
         {
             DispSubcontId = dispSubContractorId,
             FileName      = fileName,
             FileType      = fileType,
             Path          = filePath
         };
         _context.DispSubcontDocuments.Add(dispSubContDocuments);
         _context.SaveChanges();
         responseMessage.Message = "Sub Contractor Component Documents uploaded successfully";
         return(responseMessage);
     } catch (Exception ex) {
         throw ex;
     }
 }