Пример #1
0
        public SaleListViewModel GetCurrentSaleList()
        {
            SaleListViewModel currentSaleList = null;
            var sales = salesDBDao.GetOnGoingSaleList();

            if (sales.Rows.Count == 0)
            {
                currentSaleList = new SaleListViewModel()
                {
                    SheetID   = Guid.NewGuid(),
                    Change    = 0,
                    PayValue  = 0,
                    SaleValue = 0,
                    DiscValue = 0,
                    //TO DO: update to login user
                    CashierID = "Tester",
                    ShopID    = "A001"
                };
                salesDBDao.NewSaleList(
                    currentSaleList.SheetID.ToString(),
                    currentSaleList.CashierID,
                    currentSaleList.ShopID,
                    currentSaleList.PayValue,
                    currentSaleList.SaleValue,
                    currentSaleList.DiscValue);
            }
            else
            {
                currentSaleList = SaleListDTConverter.GetModel(sales).First();
            }
            return(currentSaleList);
        }
Пример #2
0
        public List <SaleListViewModel> GetOnHoldSaleList()
        {
            var salesOnHold = salesDBDao.GetOnHoldSaleList();

            return(SaleListDTConverter.GetModel(salesOnHold));
        }