예제 #1
0
 public IActionResult delete(long faculty_id)
 {
     try
     {
         _facultyService.delete(faculty_id);
         AlertHelper.setMessage(this, "Faculty deleted successfully.", messageType.success);
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
     }
     return(RedirectToAction(nameof(Index)));
 }
예제 #2
0
 public IActionResult disable(long menu_id)
 {
     try
     {
         _menuService.disable(menu_id);
         AlertHelper.setMessage(this, "Item disabled successfully.", messageType.success);
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
     }
     return(RedirectToAction(nameof(Index)));
 }
 public IActionResult delete(long menu_category_id)
 {
     try
     {
         _menuCategoryService.delete(menu_category_id);
         AlertHelper.setMessage(this, "Item Category deleted successfully.");
         return(RedirectToAction("index"));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
 public IActionResult edit(long testimonial_id)
 {
     try
     {
         var            testimonial = _testimonialRepo.getById(testimonial_id);
         TestimonialDto dto         = _mapper.Map <TestimonialDto>(testimonial);
         return(View(dto));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
예제 #5
0
 public IActionResult edit(long file_upload_id)
 {
     try
     {
         CMS.Core.Entity.FileUpload fileUpload      = _fileUploadRepo.getById(file_upload_id);
         FileUploadModel            fileUploadModel = _mapper.Map <FileUploadModel>(fileUpload);
         return(View(fileUploadModel));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
 public IActionResult Index()
 {
     try
     {
         var classes = _classRepository.getQueryable().Where(e => e.is_active == true).Take(3).ToList();
         ViewBag.classs = new SelectList(classes, "class_id", "name");
         return(View());
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
 public IActionResult edit(long career_id)
 {
     try
     {
         var       career = _careerRepo.getById(career_id);
         CareerDto dto    = _mapper.Map <CareerDto>(career);
         return(View(dto));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
 public IActionResult edit(long page_category_id)
 {
     try
     {
         PageCategory      pageCategory      = _pageCategoryRepo.getById(page_category_id);
         PageCategoryModel pageCategoryModel = _mapper.Map <PageCategoryModel>(pageCategory);
         return(View(pageCategoryModel));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
예제 #9
0
 public IActionResult add()
 {
     try
     {
         RoleModel roleModel = new RoleModel();
         roleModel.permission_datas = Constants.Permissions.getPermissions();
         return(View(roleModel));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
 public IActionResult edit(long gallery_id)
 {
     try
     {
         CMS.Core.Entity.Gallery gallery      = _galleryRepository.getById(gallery_id);
         GalleryModel            galleryModel = _mapper.Map <GalleryModel>(gallery);
         return(View(galleryModel));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
 public IActionResult add()
 {
     try
     {
         PageModel pageModel      = new PageModel();
         var       pageCategories = _pageCategoryRepo.getQueryable().ToList();
         ViewBag.categories = new SelectList(pageCategories, "page_category_id", "name");
         return(View(pageModel));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
        public IActionResult edit(long details_id)
        {
            try
            {
                Details      details      = _detailsRepository.getById(details_id);
                DetailsModel detailsModel = _mapper.Map <DetailsModel>(details);

                return(View(detailsModel));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #13
0
        public IActionResult edit(long event_id)
        {
            try
            {
                Event      events     = _eventRepository.getById(event_id);
                EventModel eventModel = _mapper.Map <EventModel>(events);

                return(View(eventModel));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #14
0
        public IActionResult Index()
        {
            try
            {
                var faq = _faqRepository.getQueryable();

                var faqs = faq.ToList();
                return(View(faqs));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(Redirect("index"));
            }
        }
예제 #15
0
        public IActionResult blogComment(long blog_id)
        {
            try
            {
                var blogsComment  = _blogCommentRepo.getQueryable().Where(a => a.blog_id == blog_id).ToList();
                var blogCommentVM = getViewModelFromBlog(blogsComment);

                return(View(blogCommentVM));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #16
0
        public IActionResult blogCommentEdit(long blog_comment_id)
        {
            try
            {
                var            blogComment    = _blogCommentRepo.getById(blog_comment_id);
                BlogCommentDto blogCommentDto = _mapper.Map <BlogCommentDto>(blogComment);

                return(View(blogCommentDto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
        public IActionResult edit(long service_id)
        {
            try
            {
                var         video1 = _servicesRepository.getById(service_id);
                ServicesDto dto    = _mapper.Map <ServicesDto>(video1);

                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #18
0
        public IActionResult edit(long blog_id)
        {
            try
            {
                var     blogs   = _blogRepository.getById(blog_id);
                BlogDto blogDto = _mapper.Map <BlogDto>(blogs);

                return(View(blogDto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
 public IActionResult add()
 {
     try
     {
         var fiscalYearList  = _fiscalYearRepository.getQueryable().ToList();
         var designationList = _designationRepository.getQueryable().ToList();
         ViewBag.designations = new SelectList(designationList, "Designation_id", "name");
         ViewBag.fiscalYears  = new SelectList(fiscalYearList, "fiscal_year_id", "name");
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
     }
     return(View());
 }
 public IActionResult edit(long page_id)
 {
     try
     {
         var pageCategories = _pageCategoryRepo.getQueryable().ToList();
         ViewBag.categories = new SelectList(pageCategories, "page_category_id", "name");
         CMS.Core.Entity.Page page      = _pageRepo.getById(page_id);
         PageModel            pageModel = _mapper.Map <PageModel>(page);
         return(View(pageModel));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(RedirectToAction("index"));
     }
 }
예제 #21
0
        public IActionResult edit(long news_id)
        {
            try
            {
                var     news = _newsRepository.getById(news_id);
                NewsDto dto  = _mapper.Map <NewsDto>(news);

                RouteData.Values.Remove("news_id");
                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
        public IActionResult edit(long doctor_id)
        {
            try
            {
                var        doctor = _doctorsRepository.getById(doctor_id);
                DoctorsDto dto    = _mapper.Map <DoctorsDto>(doctor);

                RouteData.Values.Remove("doctor_id");
                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
        public IActionResult edit(long gallery_image_id)
        {
            try
            {
                ViewBag.image = new SelectList(_galleryRepository.getAll(), "gallery_id", "name");

                CMS.Core.Entity.GalleryImage gallery           = _galleryImageRepo.getById(gallery_image_id);
                GalleryImageModel            galleryImageModel = _mapper.Map <GalleryImageModel>(gallery);
                return(View(galleryImageModel));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #24
0
        public IActionResult edit(long faq_id)
        {
            try
            {
                var    faq    = _faqRepository.getById(faq_id);
                FaqDto faqDto = _mapper.Map <FaqDto>(faq);

                RouteData.Values.Remove("faq_id");
                return(View(faqDto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #25
0
        public IActionResult edit(long exam_term_id)
        {
            try
            {
                var         examterm = _examTermRepository.getById(exam_term_id);
                ExamtermDto dto      = _mapper.Map <ExamtermDto>(examterm);

                // RouteData.Values.Remove("exam_term_id");
                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #26
0
 public IActionResult Index()
 {
     try
     {
         var role        = _roleRepo.getQueryable();
         var roles       = role.ToList();
         var roleIndexVM = getViewModelFrom(roles);
         ViewBag.pagerInfo = _paginatedMetaService.GetMetaData(50, 2, 6);
         return(View(roleIndexVM));
     }
     catch (Exception ex)
     {
         AlertHelper.setMessage(this, ex.Message, messageType.error);
         return(Redirect("/home"));
     }
 }
예제 #27
0
        public IActionResult edit(long notice_id)
        {
            try
            {
                var       notice = _noticeRepo.getById(notice_id);
                NoticeDto dto    = _mapper.Map <NoticeDto>(notice);

                RouteData.Values.Remove("notice_id");
                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
예제 #28
0
        public IActionResult edit(long class_id)
        {
            try
            {
                var        classes = _classesRepository.getById(class_id);
                ClassesDto dto     = _mapper.Map <ClassesDto>(classes);

                // RouteData.Values.Remove("class_id");
                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
        public IActionResult edit(long FiscalYear_id)
        {
            try
            {
                var           fiscalYear = _fiscalYearRepository.getById(FiscalYear_id);
                FiscalYearDto dto        = _mapper.Map <FiscalYearDto>(fiscalYear);

                // RouteData.Values.Remove("FiscalYear_id");
                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }
        public IActionResult edit(long product_id)
        {
            try
            {
                ViewBag.faculty = new SelectList(_facultyRepository.getAll(), "faculty_id", "name");
                var        product = _productRepo.getById(product_id);
                CoursesDto dto     = _mapper.Map <CoursesDto>(product);

                RouteData.Values.Remove("product_id");
                return(View(dto));
            }
            catch (Exception ex)
            {
                AlertHelper.setMessage(this, ex.Message, messageType.error);
                return(RedirectToAction("index"));
            }
        }