public void katlafishListMethod()
 {
     for (int i = 1; i <= 100; i++)
     {
         string        katlaname     = "katla";
         String        katlaweight   = "3kg";
         KatlaFishType katlafishtype = new KatlaFishType(katlaname, katlaweight);
         //katlafishList.Add(katlafishtype);
         //katlarepo.add(katlafishtype);
         GRKatla.add(katlafishtype);
     }
     // Console.WriteLine("katla fish list amount : " + katlafishListRepo.Count);
     Console.WriteLine("katla fish list amount : " + GRKatla.getall().Count);
 }
        public void SaleKatlaAmount(Object ob, Sales s)
        {
            int cnt2 = GRKatla.getall().Count;

            //Console.WriteLine("Count : " + cnt);
            listkatla = GRKatla.getall().Count - s.fishAmount;
            //Console.WriteLine("Count : " + cnt + " " + "listui : " + listrui);



            for (int i = cnt2 - 1; i >= (cnt2 - s.fishAmount); i--)
            {
                //katlafishList.RemoveAt(i);

                //katlarepo.remove(i);
                // Console.WriteLine("remove rui fish from list : " + i);
                GRKatla.remove("katla", i);
            }

            Console.WriteLine("Available in market inventory katla fish : " + GRKatla.getall().Count);


            if (listkatla <= 50)
            {
                //int temp = listrui + HatcheryInventory.hatcheryfishrui;
                hatchery.BuyKatlaAmount(s.fishAmount);
                int temp = listkatla + HatcheryInventory.hatcheryfishkatla;

                Console.WriteLine("Market Inventory Buy from hatchery amount : " + HatcheryInventory.hatcheryfishkatla);
                Console.WriteLine("Now available in Marketinventory : " + temp);
                for (int i = listkatla + 1; i <= temp; i++)
                {
                    string        ruiname       = "Katlaui";
                    String        ruiweight     = "3kg";
                    KatlaFishType katlafishtype = new KatlaFishType(ruiname, ruiweight);
                    //katlafishList.Add(katlafishtype);
                    // katlarepo.add(katlafishtype);
                    GRKatla.add(katlafishtype);
                }
                Console.WriteLine("New Katla COunt: " + GRKatla.getall().Count);
            }
        }
示例#3
0
 public void add(KatlaFishType katlaFishType)
 {
     MarketInventory.katlafishListRepo.Add(katlaFishType);
 }