Esempio n. 1
0
    public List <Order> getOrdersByType(Order.State state, Product.Type type)
    {
        Console.WriteLine("getOrdersByType(state,type) called.");
        List <Order> res = new List <Order>();

        foreach (Order order in orders)
        {
            if (order.StateProperty.Equals(state) && type.Equals(order.Product.TypeProperty))
            {
                res.Add(order);
            }
        }
        return(res);
    }
Esempio n. 2
0
        public KitchenBarForm(KitchenBarForm.Type type)
        {
            RemotingConfiguration.Configure("KitchenBar.exe.config", false);
            InitializeComponent();
            listServer = (IListSingleton)RemoteNew.New(typeof(IListSingleton));

            if (type.Equals(Type.KITCHEN))
            {
                this.ProductType = Product.Type.FOOD;
                this.Text        = "Kitchen";
            }
            else if (type.Equals(Type.BAR))
            {
                this.ProductType = Product.Type.DRINK;
                this.Text        = "Bar";
            }

            updateOrdersListView();
            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            listServer.alterEvent += new AlterDelegate(evRepeater.Repeater);
        }