Ejemplo n.º 1
0
 public ShopItem(int id, ICurrency price, ISellableItem item, List <ShopItemOption> shopItemOptions)
 {
     Id              = id;
     Price           = price;
     Item            = item;
     ShopItemOptions = shopItemOptions;
 }
Ejemplo n.º 2
0
 public ShopItem(int id, ICurrency price, ISellableItem item)
 {
     Id              = id;
     Price           = price;
     Item            = item;
     ShopItemOptions = new List <ShopItemOption>();
 }
Ejemplo n.º 3
0
 public Disposal(IShift shift, ISellableItem item)
 {
     ShiftID  = shift.ID;
     ItemID   = item.ID;
     Basis    = string.Empty;
     Quantity = 0;
 }
Ejemplo n.º 4
0
 public ReceiptItem(ISellableItem item)
 {
     this.ItemID   = item.ID;
     this.ItemName = item.Name;
     this.Quantity = 1;
     this.Price    = item.Price;
     this.Discount = item.Discount;
     this.Item     = item as Item;
 }
Ejemplo n.º 5
0
 public Supply(IShift shift, ISellableItem item)
 {
     this.ShiftID  = shift.ID;
     this.ItemID   = item.ID;
     this.Basis    = string.Empty;
     this.Quantity = 0;
     this.Price    = 0;
     this.SupplyDT = default;
 }
Ejemplo n.º 6
0
 public async Task Register(ISellableItem item)
 {
     try
     {
         using (CashRegisterContext ctx = new CashRegisterContext())
         {
             DisposalDT = DateTime.Now;
             await ctx.RegisterDisposal(this, item);
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Ejemplo n.º 7
0
        public override void Reload()
        {
            if (Reloading)
            {
                return;
            }
            Reloading = true;

            int i;

            if (ItemList == null || (i = ItemList.IndexOf(ShopItem)) == -1)
            {
                Owner.LeaveWorld(this);
                return;
            }

            if (ShopItem.Count == 0)
            {
                ItemList.Remove(ShopItem);
                if (ItemList.Count <= 0)
                {
                    Owner.LeaveWorld(this);
                    return;
                }
            }

            i++;
            if (ItemList.Count <= i)
            {
                i = 0;
            }

            var nextItem = ItemList[i];

            ShopItem = nextItem;
            Item     = nextItem.ItemId;
            Price    = nextItem.Price;
            Count    = nextItem.Count;
            //TimeLeft = Rand.Next(30000, 60000);

            Reloading = false;
        }
Ejemplo n.º 8
0
 public CustomShopItem(int id, ICurrency price, ISellableItem item, Player.Player seller) : base(id, price, item)
 {
     Seller = seller;
 }
Ejemplo n.º 9
0
 public GenericShopItem(int id, string articleNumber, ICurrency price, ISellableItem item) : base(id, price, item)
 {
     ArticleNumber = articleNumber;
 }
Ejemplo n.º 10
0
 public Reward(ISellableItem shopReward)
 {
     ShopReward = shopReward;
 }