Exemple #1
0
 public SalesController()
 {
     categoriesB        = new CategoriesB();
     subCategoriesB     = new SubCategoriesB();
     accountB           = new AccountsB();
     userB              = new UsersB();
     saleB              = new SalesB();
     assetsLiabilitiesB = new AssetsLiabilitiesB();
     clientsB           = new ClientsB();
     productsB          = new ProductsB();
     detailsB           = new DetailsB();
     invoicesB          = new InvoicesB();
     providersB         = new ProvidersB();
 }
Exemple #2
0
        // GET: api/Product/5
        public IHttpActionResult Get(int id)
        {
            Products product = null;

            ProductsB productB = new ProductsB();

            product = productB.GetById(id);

            if (product == null)
            {
                return(Ok(false));
            }

            return(Ok(product));
        }
Exemple #3
0
        // GET: api/Product
        public IHttpActionResult Get()
        {
            IList <Products> product = null;

            ProductsB productB = new ProductsB();

            product = productB.GetAll();

            if (product == null)
            {
                return(Ok(false));
            }

            return(Ok(product));
        }
Exemple #4
0
 public ProductsSMController()
 {
     productsB = new ProductsB();
 }
Exemple #5
0
 public ProductsController()
 {
     productsProvidersB = new ProductsProvidersB();
     productsB          = new ProductsB();
 }