Пример #1
0
        public void GetCtrDbChain()
        {
            var chainCtr = new ChainCtr(new DbChain());
            var chain    = chainCtr.GetChain(1);

            Assert.IsNotNull(chain);
        }
Пример #2
0
 /// <summary>
 /// Initialize all Controllers
 /// </summary>
 public BestilNemtService()
 {
     LoginCtr       = new LoginCtr(new DbLogin());
     CustomerCtr    = new CustomerCtr(new DbCustomer());
     ShopController = new ShopCtr(new DbShop());
     ChainCtr       = new ChainCtr(new DbChain());
     AdminCtr       = new AdminCtr(new DbAdmin());
     ProductCtr     = new ProductCtr(new DbProduct());
     CartCtr        = new CartCtr(new DbCart());
     PartOrderCtr   = new PartOrderCtr(new DbPartOrder());
     SavingCtr      = new SavingCtr(new DbSaving());
     WarehouseCtr   = new WarehouseCtr(new DbWarehouse());
 }
Пример #3
0
        public void GetAllCtrDbChain()
        {
            var chainCtr = new ChainCtr(new DbChain());

            Assert.AreNotEqual(0, chainCtr.GetAllChains().Count);
        }
Пример #4
0
        public void ChainCtrInitialize()
        {
            var chainCtr = new ChainCtr(new ChainCtrTestClass());

            Assert.IsNotNull(chainCtr);
        }
Пример #5
0
 /// <summary>
 /// Get a Chain DataTable
 /// </summary>
 /// <returns>
 /// DataTable
 /// </returns>
 public DataTable GetChainData()
 {
     return(ChainCtr.GetChainData());
 }
Пример #6
0
 /// <summary>
 /// Get all Chains
 /// </summary>
 /// <returns>
 /// List of Chain
 /// </returns>
 public List <Chain> GetAllChains()
 {
     return(ChainCtr.GetAllChains());
 }
Пример #7
0
        ///// <summary>
        ///// Add a Chain
        ///// </summary>
        ///// <param name="chain"></param>
        ///// <returns>
        ///// id of Chain if added, else 0
        ///// </returns>
        //public int AddChain(Chain chain)
        //{
        //    return ChainCtr.AddChain(chain);
        //}

        /// <summary>
        /// Get a Chain by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns>
        /// Chain if found, else null
        /// </returns>
        public Chain GetChain(int id)
        {
            return(ChainCtr.GetChain(id));
        }