Пример #1
0
        public bool Delete(ProductDetailDTO entity)
        {
            PRODUCT product = new PRODUCT();

            product.ID = entity.ProductID;
            dao.Delete(product);
            SALE sales = new SALE();

            sales.ProductID = entity.ProductID;
            salesdao.Delete(sales);
            return(true);
        }
Пример #2
0
        public bool Delete(CustomerDetailDTO entity)
        {
            CUSTOMER customer = new CUSTOMER();

            customer.CustomerName = entity.CustomerName;
            dao.Delete(customer);
            SALES sales = new SALES();

            sales.CustomerID = entity.ID;
            salesdao.Delete(sales);
            return(true);
        }
Пример #3
0
        public bool Delete(SalesDetailDTO entity)
        {
            SALE sales = new SALE();

            sales.ID = entity.SalesID;
            dao.Delete(sales);
            PRODUCT product = new PRODUCT();

            product.ID          = entity.ProductID;
            product.StockAmount = entity.StockAmount + entity.SalesAmount;
            productdao.Update(product);
            return(true);
        }