Пример #1
0
        public ActionResult Index()
        {
            var registerItemDataSource = new RegisterItemDataSource();
            var items = registerItemDataSource.GetItemsInRegister();

            return View(items);
        }
Пример #2
0
        public void AddBarCode(string barCode)
        {
            var registerItemDataSource = new RegisterItemDataSource();
            var item = registerItemDataSource.AddToRegister(barCode);
            if (item == null)
                return;

            Clients.Others.addToRegister(item);
        }
Пример #3
0
 public void Buy(int productId)
 {
     var registerItemDataSource = new RegisterItemDataSource();
     registerItemDataSource.SellItem(productId);
     Clients.All.setSold(productId);
 }
 public IEnumerable<RegisterItem> GetItemsInRegister()
 {
     var registerItemDataSource = new RegisterItemDataSource();
     return registerItemDataSource.GetItemsInRegister();
 }