コード例 #1
0
        public ActionResult _ReadAdvertisementPercent([DataSourceRequest] DataSourceRequest request)
        {
            AdvertisementsRepository modelRepo = new AdvertisementsRepository();
            DataSourceResult         result    = modelRepo.Read_Dashboard().ToDataSourceResult(request);

            return(Json(result));
        }
コード例 #2
0
        public static SelectList GetAdvertisements(long?AdvertisementID)
        {
            List <SelectListItem> _ListOfObjects = new List <SelectListItem>();

            AdvertisementsRepository modelRepo = new AdvertisementsRepository();

            foreach (var item in modelRepo.ReadAll())
            {
                SelectListItem itr = new SelectListItem();
                itr.Text     = item.Advertisement;
                itr.Value    = item.AdvertisementID.ToString();
                itr.Selected = false;

                _ListOfObjects.Add(itr);
            }

            return(new SelectList(_ListOfObjects, "Value", "Text", AdvertisementID));
        }
コード例 #3
0
        public async Task RepositoryConnectionTest()
        {
            IRepository <User, int>                  usersRepository              = new UsersRepository(con);
            IRepository <Advertisement, int>         advertisementsRepository     = new AdvertisementsRepository(con);
            IRepository <AdvertisementFile, int>     advertisementFilesRepository = new AdvertisementFilesRepository(con);
            IViewRepository <AdvertisementView, int> advertisementViewsRepository = new AdvertisementViewsRepository(con);
            IRepository <DebtorFile, int>            debtorFilesRepository        = new DebtorFilesRepository(con);
            IRepository <Choise, int>                choisesRepository            = new ChoisesRepository(con);
            IRepository <Document, int>              documentsRepository          = new DocumentsRepository(con);
            IViewRepository <DocumentView, int>      documentViewsRepository      = new DocumentViewsRepository(con);
            IRepository <Post, int>                  postsRepository              = new PostsRepository(con);
            IViewRepository <PostView, int>          postViewsRepository          = new PostViewsRepository(con);
            IRepository <Question, int>              questionsRepository          = new QuestionsRepository(con);
            IViewRepository <QuestionView, int>      questionViewsRepository      = new QuestionViewsRepository(con);
            IRepository <Legislation, int>           legislationsRepository       = new LegislationsRepository(con);
            IRepository <Role, int>                  rolesRepository              = new RolesRepository(con);
            IRepository <UserToChoise, int>          userToChoisesRepository      = new UserToChoisesRepository(con);
            IRepository <UserToRole, int>            userToRolesRepository        = new UserToRolesRepository(con);
            IRepository <ValuePair, int>             valuePairsRepository         = new ValuePairsRepository(con);

            int id = 1;
            await usersRepository.GetAsync(id);

            await advertisementsRepository.GetAsync(id);

            await advertisementFilesRepository.GetAsync(id);

            await advertisementViewsRepository.GetAsync(id);

            await debtorFilesRepository.GetAsync(id);

            await choisesRepository.GetAsync(id);

            await documentsRepository.GetAsync(id);

            await documentViewsRepository.GetAsync(id);

            await postsRepository.GetAsync(id);

            await postViewsRepository.GetAsync(id);

            await questionsRepository.GetAsync(id);

            await questionViewsRepository.GetAsync(id);

            await legislationsRepository.GetAsync(id);

            await rolesRepository.GetAsync(id);

            await userToChoisesRepository.GetAsync(id);

            await userToRolesRepository.GetAsync(id);

            await valuePairsRepository.GetAsync(id);

            await usersRepository.GetAsync("WHERE id = 1");

            await advertisementsRepository.GetAsync("WHERE id = 1");

            await advertisementFilesRepository.GetAsync("WHERE id = 1");

            await advertisementViewsRepository.GetAsync("WHERE id = 1");

            await debtorFilesRepository.GetAsync("WHERE id = 1");

            await choisesRepository.GetAsync("WHERE id = 1");

            await documentsRepository.GetAsync("WHERE id = 1");

            await documentViewsRepository.GetAsync("WHERE id = 1");

            await postsRepository.GetAsync("WHERE id = 1");

            await postViewsRepository.GetAsync("WHERE id = 1");

            await questionsRepository.GetAsync("WHERE id = 1");

            await questionViewsRepository.GetAsync("WHERE id = 1");

            await legislationsRepository.GetAsync("WHERE id = 1");

            await rolesRepository.GetAsync("WHERE id = 1");

            await userToChoisesRepository.GetAsync("WHERE id = 1");

            await userToRolesRepository.GetAsync("WHERE id = 1");

            await valuePairsRepository.GetAsync("WHERE id = 1");
        }
コード例 #4
0
        public override T CreateProcessor()
        {
            switch (typeof(T).Name)
            {
            case "IAuthRepository":
                IAuthRepository _processor = new AuthRepository(config);
                return((T)_processor);

            case "IJobPostRepository":
                IJobPostRepository _jobPostprocessor = new JobPostRepository(config);
                return((T)_jobPostprocessor);

            case "IHomeRepositories":
                IHomeRepositories _homeRepositories = new HomeRepositories(config);
                return((T)_homeRepositories);

            case "ISearchJobRepository":
                ISearchJobRepository _searchJobRepository = new SearchJobRepository(config);
                return((T)_searchJobRepository);

            case "IUserProfileRepository":
                IUserProfileRepository _userProfileRepository = new UserProfileRepository(config);
                return((T)_userProfileRepository);

            case "ISearchResumeRepository":
                ISearchResumeRepository _searchResumeRepository = new SearchResumeRepository(config);
                return((T)_searchResumeRepository);

            case "IManageUserRepository":
                IManageUserRepository _manageUserRepository = new ManageUsersRepository(config);
                return((T)_manageUserRepository);

            case "IEmpProfileRepository":
                IEmpProfileRepository _empProfileRepository = new EmpProfileRepository(config);
                return((T)_empProfileRepository);

            case "IJobIndustryAreaRepository":
                IJobIndustryAreaRepository _jobIndustryAreaRepository = new JobIndustryAreaRepositroy(config);
                return((T)_jobIndustryAreaRepository);

            case "IJobTitleRepositroy":
                IJobTitleRepositroy _jobTitleRepositroy = new JobTitleRepository(config);
                return((T)_jobTitleRepositroy);

            case "IDesignationRepository":
                IDesignationRepository _designationRepository = new DesignationRepository(config);
                return((T)_designationRepository);

            case "IResumeBuilderRepository":
                IResumeBuilderRepository rBuilderRepository = new ResumeBuilderRepository(config);
                return((T)rBuilderRepository);

            case "IMasterDataRepository":
                IMasterDataRepository masterDataRepository = new MasterDataRepository(config);
                return((T)masterDataRepository);

            case "ISuccessStoryVideoRepository":
                ISuccessStoryVideoRepository successStoryVideoRepository = new SuccessStoryVideoRepository(config);
                return((T)successStoryVideoRepository);

            case "IBulkJobPostRepository":
                IBulkJobPostRepository bulkJobRepository = new BulkJobPostRepository(config);
                return((T)bulkJobRepository);

            case "IEmailRepository":
                IEmailRepository _emailRepository = new EmailRepository(config);
                return((T)_emailRepository);

            case "IUsersReviewsRepository":
                IUsersReviewsRepository usersReviewsRepository = new UsersReviewsRepository(config);
                return((T)usersReviewsRepository);

            case "IManageJobsRepository":
                IManageJobsRepository manageJobsRepository = new ManageJobsRepository(config);
                return((T)manageJobsRepository);

            case "IDashboardRepository":
                switch (typeof(T).FullName)
                {
                case "JobPortal.Data.Interfaces.Employer.IDashboardRepository":
                    Data.Interfaces.Employer.IDashboardRepository employerDashboard = new Data.Repositories.Employer.DashboardRepository(config);
                    return((T)employerDashboard);

                case "JobPortal.Data.Interfaces.TrainingPartner.IDashboardRepository":
                    Data.Interfaces.TrainingPartner.IDashboardRepository tpDashboard = new Data.Repositories.TrainingPartner.DashboardRepository(config);
                    return((T)tpDashboard);

                case "JobPortal.Data.Interfaces.Admin.IDashboardRepository":
                    Data.Interfaces.Admin.IDashboardRepository adminDashboard = new Data.Repositories.Admin.DashboardRepository(config);
                    return((T)adminDashboard);

                default:
                    throw new Exception("Can not create object");
                }

            case "ITrainingPartnerProfileRepository":
                ITrainingPartnerProfileRepository trainingPartnerProfileRepository = new TrainingPartnerProfileRepository(config);
                return((T)trainingPartnerProfileRepository);

            case "IManageCityStateRepository":
                IManageCityStateRepository manageCityStateRepository = new ManageCityStateRepository(config);
                return((T)manageCityStateRepository);

            case "INotificationRepository":
                INotificationRepository nRepository = new NotificationRepository(config);
                return((T)nRepository);

            case "IPlacedCandidateRepository":
                IPlacedCandidateRepository placedCandidateRepository = new PlacedCandidateRepository(config);
                return((T)placedCandidateRepository);

            case "IAdvertisementsRepository":
                IAdvertisementsRepository advertisementsRepository = new AdvertisementsRepository(config);
                return((T)advertisementsRepository);

            case "IEmailTemplateRepository":
                IEmailTemplateRepository emailTemplateRepository = new EmailTemplateRepository(config);
                return((T)emailTemplateRepository);

            default:
                throw new Exception("Can not create object");
            }
        }
コード例 #5
0
 public AdvertisementsController(ApiContext context)
 {
     advertisementsRepository = new AdvertisementsRepository(context);
 }
コード例 #6
0
        public ActionResult OtherDetails()
        {
            AdvertisementsRepository modelRepo = new AdvertisementsRepository();

            return(View(modelRepo.ReadAll_OtherDetailsList()));
        }