示例#1
0
        public async Task DeleteProduct(int id)
        {
            var product = await GetProduct(id);

            if (product != null)
            {
                product.IsActive = false;
                _context.Update(product);
                await _context.SaveChangesAsync();
            }
        }
示例#2
0
        public async Task DeleteVessel(int id)
        {
            var vessel = await GetVessel(id);

            if (vessel != null)
            {
                vessel.IsActive = false;
                _context.Update(vessel);
                await _context.SaveChangesAsync();
            }
        }
示例#3
0
        public async Task DeleteCompany(int id)
        {
            var company = await GetCompany(id);

            if (company != null)
            {
                company.IsActive = false;
                _context.Update(company);
                await _context.SaveChangesAsync();
            }
        }
示例#4
0
        public async Task DeleteUser(int id)
        {
            var user = await GetUser(id);

            if (user != null)
            {
                user.IsActive = false;
                _context.Update(user);
                await _context.SaveChangesAsync();
            }
        }
示例#5
0
        public async Task DeleteFreigth(int id)
        {
            var freigth = await GetFreigth(id);

            if (freigth != null)
            {
                freigth.IsActive = false;
                _context.Update(freigth);
                await _context.SaveChangesAsync();
            }
        }
示例#6
0
        public async Task DeleteContainer(int id)
        {
            var container = await GetContainer(id);

            if (container != null)
            {
                container.IsActive = false;
                _context.Update(container);
                await _context.SaveChangesAsync();
            }
        }
示例#7
0
        public async Task UpdateDocument(int id, Document document)
        {
            var updateDocument = await GetDocument(id);

            if (updateDocument != null)
            {
                updateDocument.DocumentTitle       = document.DocumentTitle;
                updateDocument.DocumentDescription = document.DocumentDescription;
                updateDocument.DocumentImage       = document.DocumentImage;
                _context.Update(updateDocument);
                await _context.SaveChangesAsync();
            }
        }