Esempio n. 1
0
 public FrontMenuController(IMenuCategoryServices menuCategoryService, IMenuServices menuService, IPageMetaServices pageMetaService, IMapper mapper, IQNZDbContext db)
 {
     _menuService         = menuService;
     _menuCategoryService = menuCategoryService;
     _pageMetaService     = pageMetaService;
     _mapper = mapper;
     _db     = db;
 }
Esempio n. 2
0
 public ArticleController(IQNZDbContext db, IMapper mapper)
 {
     //_categoryServices = categoryServices;
     //_articleServices = articleServices;
     //_pageMetaServices = pageMetaServices;
     //_templateServices = templateServices;
     _mapper = mapper;
     _db     = db;
 }
Esempio n. 3
0
        public async Task SetPageMetaAsync(IQNZDbContext db, short modelType, string objectId, string objectTitle, string title, string keywords, string description)
        {
            var pageMeta = await db.PageMetas.FirstOrDefaultAsync(d => d.ModelType == modelType && d.ObjectId == objectId);

            if (pageMeta != null)
            {
                if (!string.IsNullOrEmpty(title) || !string.IsNullOrEmpty(keywords) || !string.IsNullOrEmpty(description))
                {
                    pageMeta.ObjectId    = objectId;
                    pageMeta.Title       = string.IsNullOrEmpty(title) ? objectTitle : title;
                    pageMeta.Keyword     = string.IsNullOrEmpty(keywords) ? objectTitle : keywords.Replace(',', ',');
                    pageMeta.Description = description;
                    pageMeta.ModelType   = modelType;

                    db.Entry(pageMeta).State = EntityState.Modified;
                }
                else
                {
                    db.PageMetas.Remove(pageMeta);
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(title) || !string.IsNullOrEmpty(keywords) || !string.IsNullOrEmpty(description))
                {
                    pageMeta = new PageMeta()
                    {
                        ObjectId    = objectId,
                        Title       = string.IsNullOrEmpty(title) ? objectTitle : title,
                        Keyword     = string.IsNullOrEmpty(keywords) ? objectTitle : keywords.Replace(',', ','),
                        Description = description,
                        ModelType   = modelType
                    };
                    db.PageMetas.Add(pageMeta);
                }
            }
            await db.SaveChangesAsync();
        }
Esempio n. 4
0
 public OutletController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
        public ContactController(TZGCMS.Infrastructure.Email.IEmailService emailService, IQNZDbContext db)
        {
            _emailService = emailService;

            _db = db;
        }
Esempio n. 6
0
 public JoinController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 7
0
 public PhotosController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 8
0
 public AchievementCategoriesController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 9
0
 public InstituteController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 10
0
 public LaboratoriesController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 11
0
 public ProductController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 12
0
 public ProductsController(IMapper mapper, ICacheService cacheService, IQNZDbContext db)
 {
     _cacheService = cacheService;
     _db           = db;
     _mapper       = mapper;
 }
 public AlbumsController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 14
0
 public SearchController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 15
0
 public ArticleController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }
 public MenuController(ICacheService cacheService, IQNZDbContext db)
 {
     _cacheService = cacheService;
     _db           = db;
 }
 public CooperationController(IMapper mapper, IQNZDbContext db)
 {
     _db     = db;
     _mapper = mapper;
 }