示例#1
0
        public EmployeeArr FilterUsername(string Username, string Password)
        {
            EmployeeArr employeeArr = new EmployeeArr();

            for (int i = 0; i < this.Count; i++)
            {
                Employee employee = (this[i] as Employee);

                if (employee.Username == Username && employee.Password == Password)
                {
                    employeeArr.Add(employee);
                }
            }
            return(employeeArr);
        }
示例#2
0
        public EmployeeArr GetEmployeeArr()
        {
            EmployeeArr employeeArr = new EmployeeArr();

            OrderBuy orderBuy;

            for (int i = 0; i < this.Count; i++)
            {
                orderBuy = (this[i] as OrderBuy); //מוסיפים רק פריטים שלא קיימים כבר באוסף
                if (!employeeArr.IsContains(orderBuy.Employee))
                {
                    employeeArr.Add(orderBuy.Employee);
                }
            }

            return(employeeArr);
        }
示例#3
0
        public EmployeeArr GetEmployeeArr()
        {
            EmployeeArr employeeArr = new EmployeeArr();

            OrderRent orderRent;

            for (int i = 0; i < this.Count; i++)
            {
                orderRent = (this[i] as OrderRent);
                if (!employeeArr.IsContains(orderRent.Employee))
                {
                    employeeArr.Add(orderRent.Employee);
                }
            }

            return(employeeArr);
        }
示例#4
0
        public EmployeeArr Filter(int id, string Name, string PhoneNumber)
        {
            EmployeeArr employeeArr = new EmployeeArr();

            for (int i = 0; i < this.Count; i++)
            {
                Employee employee = (this[i] as Employee);
                if
                (
                    (id <= 0 || employee.Id == id) &&
                    employee.Fullname.Contains(Name) &&
                    (employee.Phonenumber.Contains(PhoneNumber))
                )
                {
                    employeeArr.Add(employee);
                }
            }
            return(employeeArr);
        }