Пример #1
0
        /// <summary>
        /// Fa il bind dei dati in base allo step (SOLO FORWARD, in BACK non viene aggiornato!!!)
        /// </summary>
        /// <param name="Step"></param>
        public void BindStep(Domain.Enums.CategoryDeleteSteps Step)
        {
            if ((int)Step <= (int)View.StartStep)
            {
                return;
            }

            switch (Step)
            {
            case Domain.Enums.CategoryDeleteSteps.Step2_Ticket:

                break;

            case Domain.Enums.CategoryDeleteSteps.Step3a_ReassignAll:
                Domain.DTO.DTO_CategoryTree cate = service.CategoryGetTreeDLLSingle(View.CommunityId, View.CategoryId);
                if (cate == null)
                {
                    //ATTENZIONE: GESTIONE ERRORI!!!
                    return;
                }
                View.SetReassignCategory(cate, service.CategoriesGetTreeDLLForDelete(View.CommunityId, View.CategoryId, false));
                break;

            case Domain.Enums.CategoryDeleteSteps.Step3b_ReassignSingle:

                View.SetReassignCategories(
                    service.CategoriesGetFromCategory(true, View.CommunityId, View.CategoryId),
                    service.CategoriesGetTreeDLLForDelete(View.CommunityId, View.CategoryId, false));

                break;
            }
        }
Пример #2
0
        public void ReBindDDLCategory(Int64 SelectedCategoryId)
        {
            if (!CheckSessionAccess())
            {
                return;
            }

            Domain.DTO.DTO_CategoryTree SelectedCate = new Domain.DTO.DTO_CategoryTree();
            SelectedCate.Id = -1;

            SelectedCate = service.CategoryGetDTOCatTree(SelectedCategoryId);

            BindDLLCategories(SelectedCate);
        }
Пример #3
0
        /// <summary>
        /// Carica le categorie e controlla che l'utente sia manager o resolver.
        /// </summary>
        /// <param name="SelectedCate"></param>
        private void BindDLLCategories(Domain.DTO.DTO_CategoryTree SelectedCate)
        {
            //IList<Domain.DTO.DTO_CategoryTree> Categories = service.CategoryGetDDLFilter_ManResCurrent(CurrentCommunityId);
            Int32 ComID = CurrentCommunityId;
            IList <Domain.DTO.DTO_CategoryTree> Categories;

            //if (ComID > 0)
            //{
            //    Categories = service.CategoryGetDDLFilter_ManResCurrent(ComID);
            //}
            //else
            //{
            Categories = service.CategoryGetDDLManRes_Filters();
            //}

            if (Categories == null || !Categories.Any())
            {
                View.ShowNoPermission();
            }

            View.BindCategoriesFilter(
                Categories,
                SelectedCate);
        }