Exemple #1
0
        public JsonResult GetComputerRoles()
        {
            CatalogsService catalogsService = new CatalogsService();

            List <object> computerRolesList = catalogsService.GetComputerRoles().ToList();

            return(Json(new { computerRoles = computerRolesList }, JsonRequestBehavior.AllowGet));
        }
 public TestApiController()
 {
     controller   = new ApiController();
     _catalogs    = new CatalogsService();
     _products    = new ProductsSerice();
     _cRepo       = new CatalogRepo();
     _pRepo       = new ProductsRepo();
     _testCatalog = new Catalog {
         Name = "Тест"
     };
     _testProduct = new Product {
         Name = "Тест", CatalogId = 1, Price = 0, Quantity = 0
     };
 }
Exemple #3
0
        public JsonResult GetAdDomains()
        {
            CatalogsService catalogsService = new CatalogsService();

            return(Json(new { domains = catalogsService.GetAdDomains() }, JsonRequestBehavior.AllowGet));
        }
Exemple #4
0
 public ApiController()
 {
     catalogs = new CatalogsService();
     products = new ProductsSerice();
 }