Ejemplo n.º 1
0
        public void NewOrder()
        {
            int   end   = GetEndWork();
            Order order = new Order(SomeMaster, SomeJewelry, Today.AddDays(SomeMaster.Busy + 1),
                                    Today.AddDays(end + SomeMaster.Busy), "Заказ обрабатывается");

            for (int i = 0; i < Clients.Count; ++i)
            {
                if (Clients[i].Equals(Client))
                {
                    Clients[i].Orders.Add(order);
                    Clients[i].Basket.Remove(SomeJewelry);
                    JewelryType.Remove(SomeJewelry);
                }
            }
            for (int i = 0; i < Masters.Count; ++i)
            {
                if (Masters[i].Equals(SomeMaster))
                {
                    Masters[i].Busy += end;
                }
            }
            GetOrders();
            SaveChanges();
        }
Ejemplo n.º 2
0
 public void RemoveJewelry()
 {
     Jewelries.Remove(SomeJewelry);
     GetCollections();
     if ((JewelryType.Count > 0 && SomeJewelry.Type.NameOfJewerly == JewelryType[0].Type.NameOfJewerly) ||
         JewelryType.Equals(Jewelries))
     {
         JewelryType.Remove(SomeJewelry);
     }
 }
Ejemplo n.º 3
0
 public void RemoveJewelryFromBasket()
 {
     for (int i = 0; i < Client.Basket.Count; ++i)
     {
         if (Client.Basket[i] == SomeJewelry)
         {
             Client.Basket.RemoveAt(i);
             JewelryType.Remove(SomeJewelry);
             break;
         }
     }
 }