Esempio n. 1
0
 public AdminPanelController(ILogger <AdminPanelController> logger,
                             WebUserContext context,
                             UserManager <WebUser> userManager,
                             RoleManager <IdentityRole> roleManager,
                             StoreService stores,
                             UserService uUsers,
                             GoodsService goodsService,
                             OrderService orderService
                             )
 {
     _logger       = logger;
     _context      = context;
     _userManager  = userManager;
     _roleManager  = roleManager;
     _stores       = stores;
     _uUsers       = uUsers;
     _goodsService = goodsService;
     _orderService = orderService;
 }
        private static object GetProjects(int applicationId, string collectionId)
        {
            WebUserContext.ValidatePrivileges(SecuredTask.Applications_EditApplication, applicationId: applicationId);

            var application = StoredProcs.Applications_GetApplication(applicationId)
                              .Execute()
                              .Applications_Extended
                              .First();

            using (var provider = (TfsIssueTrackingProvider)Util.Providers.CreateProviderFromId <IssueTrackingProviderBase>(application.IssueTracking_Provider_Id.Value))
            {
                return(from p in provider.GetProjects(Guid.Parse(collectionId))
                       orderby p.Name
                       select new
                {
                    id = p.Name,
                    text = p.Name
                });
            }
        }
Esempio n. 3
0
 public ProductsController(WebUserContext context)
 {
     _context = context;
 }
Esempio n. 4
0
 public UsersController(WebUserContext context)
 {
     _context = context;
 }