Пример #1
0
 public ProductDetailsVc(IProduct prodRepository, ISubCategory subCatRepository, IAttributeGroup attrGroupRepository, IOneAttribute oneAttrRepository)
 {
     prodRepo         = prodRepository;
     subCatRepo       = subCatRepository;
     attrGroupRepo    = attrGroupRepository;
     OneAttributeRepo = oneAttrRepository;
 }
Пример #2
0
 public SubCategoryController(ICategory Categoryrepo, ICoreBase coreRepo, ISubCategory SubCategoryrepo, IWebHostEnvironment webHostEnvironment)
 {
     _coreRepo           = coreRepo;
     _SubCategoryrepo    = SubCategoryrepo;
     _webHostEnvironment = webHostEnvironment;
     _Categoryrepo       = Categoryrepo;
 }
Пример #3
0
 public SubCategoryStat(ISubCategory subcat)
 {
     Name                = subcat.Name;
     this.subcat         = subcat;
     optionStats         = new List <PercentualStat>();
     localPlayersStats   = new Dictionary <string, List <PlayersStats> >();
     visitorPlayersStats = new Dictionary <string, List <PlayersStats> >();
 }
Пример #4
0
 public ProductController(IProduct prodRepository, ISubCategory subCatRepository, IAttributeGroup attrGrRepository, IProductOneAttributeValues prodOneattrValRepository, IPredefinedAttrList predefAttrListRepository, IPredefinedAttributeListOptions predefAttrListOptionsRepository)
 {
     prodRepo                  = prodRepository;
     subCatRepo                = subCatRepository;
     attrGrRepo                = attrGrRepository;
     prodOneAttrValRepo        = prodOneattrValRepository;
     predefAttrListRepo        = predefAttrListRepository;
     predefAttrListOptionsRepo = predefAttrListOptionsRepository;
 }
Пример #5
0
        public void FilterSubCategory(Category cat, ISubCategory subcat, string option, bool filtered)
        {
            SubCategoryTags tsub = categoriesFilter[cat].Find(s => s.SubCategory == subcat);

            if (filtered)
            {
                tsub.Add(option);
            }
            else
            {
                tsub.Remove(option);
            }
        }
Пример #6
0
 public UnitOfWork(DbContext context)
 {
     this.context = context;
     category     = new CategoryRepo(context);
     chair        = new ChairRepo(context);
     consumer     = new ConsumerRepo(context);
     customer     = new CustomerRepo(context);
     theater      = new HomeTheaterRepo(context);
     product      = new ProductRepo(context);
     subCategory  = new SubCategoryRepo(context);
     table        = new TableRepo(context);
     tv           = new TVRepo(context);
     user         = new UserRepo(context);
 }
Пример #7
0
        void MigrateCat_2_0(Categories cats)
        {
            /*
             * Migrate templates: in this version game periods are a common
             * tag for all sub-categories. We need to remove the old Period
             * string tag from all categories and add a GamePeriod string list
             * with the same values
             */
            List <string> periods = null;

            Log.Information("Migrating categories template " + cats.Name + " to 2.1");
            foreach (Category cat in cats)
            {
                ISubCategory toDelete = null;

                foreach (ISubCategory subcat in cat.SubCategories)
                {
                    TagSubCategory tagSubcat = subcat as TagSubCategory;

                    if (tagSubcat == null)
                    {
                        continue;
                    }

                    if (subcat.Name == Catalog.GetString("Period"))
                    {
                        if (periods == null)
                        {
                            periods = new List <string>();
                            foreach (string tag in tagSubcat)
                            {
                                periods.Add(tag);
                            }
                        }
                        toDelete = subcat;
                        Log.Debug("Migrated Period for category " + cat.Name);
                        break;
                    }
                }
                if (toDelete != null)
                {
                    cat.SubCategories.Remove(toDelete);
                }
            }
            cats.Version = new Version(2, 1);
            templates.CategoriesTemplateProvider.Update(cats);
            Log.Information("Migration to 2.1 done");
        }
Пример #8
0
        protected override bool OnButtonPressEvent(EventButton evnt)
        {
            if ((evnt.Type == EventType.ButtonPress) && (evnt.Button == 3))
            {
                TreePath path;

                GetPathAtPos((int)evnt.X, (int)evnt.Y, out path);
                if (path != null)
                {
                    Model.GetIter(out selectedIter, path);
                    selectedSubcat = (ISubCategory)Model.GetValue(selectedIter, 0);
                    edit.Sensitive = selectedSubcat is TagSubCategory;
                    menu.Popup();
                }
            }
            return(base.OnButtonPressEvent(evnt));
        }
Пример #9
0
        public void SetUp()
        {
            subCategoryList = new List <SubCategory>
            {
                new SubCategory(23, "Test1", 1),
                new SubCategory(24, "Test2", 1),
                new SubCategory(25, "Test3", 1)
            };

            subcatListAdmin = new List <SubCategoryAdmin>
            {
                new SubCategoryAdmin(26, "Test1", 1, "Test1"),
                new SubCategoryAdmin(27, "Test2", 1, "Test2"),
                new SubCategoryAdmin(28, "Test3", 1, "Test3")
            };

            validation            = Substitute.For <ISubCategory>();
            subCategoryController = new SubCategoryController(validation);
        }
Пример #10
0
        protected override void RenderColumn(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
        {
            object obj  = store.GetValue(iter, 0);
            string text = "";

            if (obj is Category)
            {
                Category cat = obj as Category;
                text = cat.Name;
            }
            else if (obj is ISubCategory)
            {
                ISubCategory subCat = obj as ISubCategory;
                text = subCat.Name;
            }
            else if (obj is StringObject)
            {
                text = (obj as StringObject).Value;
            }

            (cell as CellRendererText).Text = text;
        }
Пример #11
0
 public void RemoveBySubcategory(ISubCategory subcat)
 {
     tagsList.RemoveAll(t => t.SubCategory == subcat);
 }
 public SubCategoryApiController(ICoreBase repoCore, ISubCategory SubCategory)
 {
     _repoCore    = repoCore;
     _SubCategory = SubCategory;
 }
Пример #13
0
 public SubCategoriesController(ISubCategory repo, IMapper mapper)
 {
     _repo   = repo;
     _mapper = mapper;
 }
Пример #14
0
 public SubCategoryController(ISubCategory subCategoryService)
 {
     _subCategoryService = subCategoryService;
 }
Пример #15
0
 public SubCategoryController(ISubCategory blsubcategory)
 {
     _blsubcategory = blsubcategory;
 }
Пример #16
0
 public AttributeGroupController(IAttributeGroup attrGroupRepository, ISubCategory subCatRepository, IOneAttribute oneAttrRepository)
 {
     attrGroupRepo = attrGroupRepository;
     subCatRepo    = subCatRepository;
     oneAttrRepo   = oneAttrRepository;
 }
Пример #17
0
 public SubCategoryController(ISubCategory subCategory, IMapper mapper)
 {
     _subCategoryServices = subCategory;
     _mapper = mapper;
 }
Пример #18
0
 // GET: SubCategory
 public SubCategoryController(ISubCategory subCategory, ICategory category)
 {
     _db      = subCategory;
     Category = category;
 }
Пример #19
0
 protected virtual void OnSubcategorySelected(ISubCategory subcat)
 {
     EditSubCategoryTags((TagSubCategory)subcat, false);
 }
Пример #20
0
 protected virtual void OnSubcategorySelected(ISubCategory subcat)
 {
     EditSubCategoryTags((TagSubCategory)subcat, false);
 }
Пример #21
0
 public List <T> GetTags(ISubCategory subCategory)
 {
     return((from tag in tagsList
             where tag.SubCategory.Equals(subCategory)
             select tag).ToList());
 }
 public SubCategoryController(ILogger <SubCategoryController> logger, ISubCategory subSubCategoryService)
 {
     _logger = logger;
     _subSubCategoryService = subSubCategoryService;
 }
Пример #23
0
 public SubCategoryCrudVc(ISubCategory subCatRepository)
 {
     subCatRepo = subCatRepository;
 }
Пример #24
0
 public SubCategoryController(ISubCategory subCatRepository, ICategory catRepository, IAttributeGroup attrGroupRepository)
 {
     subCatrepo    = subCatRepository;
     catRepo       = catRepository;
     attrGroupRepo = attrGroupRepository;
 }
 public SubCategoryController()
 {
     repo = new SubCategoryRepo();
 }
        protected override bool OnButtonPressEvent(EventButton evnt)
        {
            if((evnt.Type == EventType.ButtonPress) && (evnt.Button == 3))
            {
                TreePath path;

                GetPathAtPos((int)evnt.X,(int)evnt.Y,out path);
                if(path!=null) {
                    Model.GetIter(out selectedIter,path);
                    selectedSubcat = (ISubCategory) Model.GetValue(selectedIter, 0);
                    edit.Sensitive = selectedSubcat is TagSubCategory;
                    menu.Popup();
                }
            }
            return base.OnButtonPressEvent(evnt);
        }