Exemplo n.º 1
0
        public OrderBuyArr Filter(Client client)
        {
            OrderBuyArr orderBuyArr = new OrderBuyArr();

            for (int i = 0; i < this.Count; i++)
            {
                OrderBuy orderBuy = (this[i] as OrderBuy);
                if
                (
                    ((client == null) || (orderBuy.Client.Id == client.Id))
                )
                {
                    orderBuyArr.Add(orderBuy);
                }
            }
            return(orderBuyArr);
        }
Exemplo n.º 2
0
        public OrderBuyArr Filter(Product product)
        {
            OrderBuyArr orderBuyArr = new OrderBuyArr();

            for (int i = 0; i < this.Count; i++)
            {
                OrderBuy orderBuy = (this[i] as OrderBuy);
                if
                (
                    ((product == null) || (orderBuy.Product.Id == product.Id))
                )
                {
                    orderBuyArr.Add(orderBuy);
                }
            }
            return(orderBuyArr);
        }
Exemplo n.º 3
0
        public OrderBuyArr Filter(Employee employee, DateTime dateTime)
        {
            OrderBuyArr orderBuyArr = new OrderBuyArr();

            for (int i = 0; i < this.Count; i++)
            {
                OrderBuy orderBuy = (this[i] as OrderBuy);
                if
                (
                    ((employee == null) || (orderBuy.Employee.Id == employee.Id)) &&
                    ((orderBuy.DateOfBuy.Month == dateTime.Month) && (orderBuy.DateOfBuy.Year == dateTime.Year))
                )
                {
                    orderBuyArr.Add(orderBuy);
                }
            }
            return(orderBuyArr);
        }
Exemplo n.º 4
0
        public OrderBuyArr Filter(DateTime dt)
        {
            OrderBuyArr orderBuyArr = new OrderBuyArr();

            for (int i = 0; i < this.Count; i++)
            {
                OrderBuy orderBuy = (this[i] as OrderBuy);
                if
                (
                    (orderBuy.DateOfBuy.Year == dt.Year) &&
                    (orderBuy.DateOfBuy.Month == dt.Month)
                )
                {
                    orderBuyArr.Add(orderBuy);
                }
            }
            return(orderBuyArr);
        }
Exemplo n.º 5
0
        public OrderBuyArr Filter(Car car, DateTime dt)
        {
            OrderBuyArr orderBuyArr = new OrderBuyArr();

            for (int i = 0; i < this.Count; i++)
            {
                OrderBuy orderBuy = (this[i] as OrderBuy);
                if
                (
                    ((car == null) || (orderBuy.Product.Model.Id == car.Id)) &&
                    (orderBuy.DateOfBuy >= dt)
                )
                {
                    orderBuyArr.Add(orderBuy);
                }
            }
            return(orderBuyArr);
        }
Exemplo n.º 6
0
        public OrderBuyArr Filter(int id, string Client, DateTime Form, DateTime To)
        {
            OrderBuyArr orderBuyArr = new OrderBuyArr();

            for (int i = 0; i < this.Count; i++)
            {
                OrderBuy orderBuy = (this[i] as OrderBuy);
                if
                (
                    (id <= 0 || orderBuy.Id == id) &&
                    orderBuy.Client.Fullname.Contains(Client) &&
                    (orderBuy.DateOfBuy >= Form) &&
                    (orderBuy.DateOfBuy <= To)
                )
                {
                    orderBuyArr.Add(orderBuy);
                }
            }
            return(orderBuyArr);
        }