コード例 #1
0
        private void Delete()
        {
            int universityId = int.Parse(Helper.GetParameterFromRequest("universityId"));

            //判断高校下是否存在专业
            IEntityRepository Repo      = factory.Create("major");
            IMajorRepository  majorRepo = Repo as IMajorRepository;
            int count = majorRepo.GetCountInUniversity(universityId);

            if (count > 0)
            {
                Helper.ResponseError(605);
                return;
            }

            //删除高校
            Repo = factory.Create("university");
            int result = Repo.Delete(universityId);

            if (string.IsNullOrEmpty(Repo.ErrorMessage))
            {
                Helper.Response("1");
            }
            else
            {
                Helper.ResponseError(Repo.ErrorMessage);
            }
        }
コード例 #2
0
 public ManagingStudentService()
 {
     studentRepository      = new StudentRepository();
     rankingRepository      = new RankingRepository();
     learningModeRepository = new LearningModeRepository();
     majorRepository        = new MajorRepository();
     ethnicRepository       = new EthnicRepository();
 }
コード例 #3
0
 public ProjectServices(IProjectRepository projectRepository, IMajorRepository majorRepository, IClassRepository classRepository, IPeriodRepository periodRepository, ISectionProjectRepository sectionProjectRepository)
 {
     _projectRepository        = projectRepository;
     _majorRepository          = majorRepository;
     _classRepository          = classRepository;
     _periodRepository         = periodRepository;
     _sectionProjectRepository = sectionProjectRepository;
 }
コード例 #4
0
 public FacultiesServices(IFacultyRepository facultyRepository, IMajorRepository majorRepository, IProjectRepository projectRepository, IStudentRepository studentRepository)
 {
     _facultyRepository = facultyRepository;
     _majorRepository   = majorRepository;
     _projectRepository = projectRepository;
     _studentRepository = studentRepository;
     Periods            = new List <int>();
     Periods.Add(1);
     Periods.Add(2);
     Periods.Add(3);
     Periods.Add(5);
 }
コード例 #5
0
 public ProjectController(ApplicationDbContext context, IMapper mapper, IUnitOfWork unitOfWork,
                          IProjectRepository projectRepository, IMajorRepository majorRepository,
                          IHostingEnvironment host, IExcelRepository excelRepository, ILecturerRepository lecturerRepository)
 {
     this.context           = context;
     this.mapper            = mapper;
     this.unitOfWork        = unitOfWork;
     this.projectRepository = projectRepository;
     this.majorRepository   = majorRepository;
     this.host               = host;
     this.excelRepository    = excelRepository;
     this.lecturerRepository = lecturerRepository;
 }
コード例 #6
0
ファイル: GroupController.cs プロジェクト: GedeonHuy/PMS
 public GroupController(IMapper mapper, IUnitOfWork unitOfWork,
                        IGroupRepository groupRepository, ILecturerRepository lecturerRepository,
                        IProjectRepository projectRepository, IMajorRepository majorRepository,
                        IQuarterRepository quarterRepository, IEnrollmentRepository enrollmentRepository)
 {
     this.mapper               = mapper;
     this.unitOfWork           = unitOfWork;
     this.groupRepository      = groupRepository;
     this.lecturerRepository   = lecturerRepository;
     this.projectRepository    = projectRepository;
     this.majorRepository      = majorRepository;
     this.quarterRepository    = quarterRepository;
     this.enrollmentRepository = enrollmentRepository;
 }
コード例 #7
0
 public LecturerController(ApplicationDbContext context, IMapper mapper,
                           ILecturerRepository lecturerRepository, IUnitOfWork unitOfWork,
                           UserManager <ApplicationUser> userManager, IMajorRepository majorRepository,
                           IHostingEnvironment host, IExcelRepository excelRepository)
 {
     this.userManager        = userManager;
     this.context            = context;
     this.mapper             = mapper;
     this.lecturerRepository = lecturerRepository;
     this.majorRepository    = majorRepository;
     this.unitOfWork         = unitOfWork;
     this.host            = host;
     this.excelRepository = excelRepository;
 }
コード例 #8
0
ファイル: StudentController.cs プロジェクト: GedeonHuy/PMS
 public StudentController(IHubContext <PMSHub> hubContext, ApplicationDbContext context,
                          IMapper mapper, IStudentRepository studentRepository,
                          IUnitOfWork unitOfWork, UserManager <ApplicationUser> userManager,
                          IMajorRepository majorRepository, IHostingEnvironment host, IExcelRepository excelRepository)
 {
     this.userManager       = userManager;
     this.context           = context;
     this.mapper            = mapper;
     this.studentRepository = studentRepository;
     this.majorRepository   = majorRepository;
     this.unitOfWork        = unitOfWork;
     this.hubContext        = hubContext;
     this.host            = host;
     this.excelRepository = excelRepository;
 }
コード例 #9
0
 public ProjectServices(IProjectRepository projectRepository, ISectionRepository sectionRepository,
                        IStudentRepository studentRepository, ITextDocumentServices textDocumentServices, IMajorRepository majorRepository, IClassRepository classRepository, IPeriodRepository periodRepository, ISectionProjectRepository sectionProjectRepository)
 {
     _projectRepository        = projectRepository;
     _sectionRepository        = sectionRepository;
     _studentRepository        = studentRepository;
     _textDocumentServices     = textDocumentServices;
     _majorRepository          = majorRepository;
     _classRepository          = classRepository;
     _periodRepository         = periodRepository;
     _sectionProjectRepository = sectionProjectRepository;
     _periods.Add(1);
     _periods.Add(2);
     _periods.Add(3);
     _periods.Add(5);
 }
コード例 #10
0
ファイル: MajorHandler.cs プロジェクト: renkaifei/University
        private void GetList()
        {
            IEntityRepository Repo      = factory.Create("major");
            IMajorRepository  MajorRepo = Repo as IMajorRepository;
            string            majorName = Helper.GetParameterFromRequest("majorName");
            int      universityId       = int.Parse(Helper.GetParameterFromRequest("universityId"));
            Entities entities           = MajorRepo.GetList(majorName, universityId);

            if (string.IsNullOrEmpty(Repo.ErrorMessage))
            {
                Helper.Response(entities.Serialize());
            }
            else
            {
                Helper.ResponseError(Repo.ErrorMessage);
            }
        }
コード例 #11
0
ファイル: MajorHandler.cs プロジェクト: renkaifei/University
        private void GetListInRecurit()
        {
            int companyId               = int.Parse(Helper.GetParameterFromRequest("companyId"));
            int year                    = int.Parse(Helper.GetParameterFromRequest("year"));
            int universityId            = int.Parse(Helper.GetParameterFromRequest("universityId"));
            IEntityRepository Repo      = factory.Create("major");
            IMajorRepository  MajorRepo = Repo as IMajorRepository;
            Entities          entities  = MajorRepo.GetList(companyId, year, universityId);

            if (string.IsNullOrEmpty(Repo.ErrorMessage))
            {
                Helper.Response(entities.Serialize());
            }
            else
            {
                Helper.ResponseError(Repo.ErrorMessage);
            }
        }
 public CollegeService(IMajorRepository majorRepository, IMajorCollegeRepository majorCollegeRepository, ICollegeRepository collegeRepository)
 {
     this._majorRepository        = majorRepository;
     this._majorCollegeRepository = majorCollegeRepository;
     this._collegeRepository      = collegeRepository;
 }
コード例 #13
0
 public MajorService(IMajorRepository majorRepository)
 {
     _majorRepository = majorRepository;
 }
コード例 #14
0
 public MajorController(ILogger <MajorController> logger, IMajorRepository majorRepository)
 {
     this.logger          = logger;
     this.majorRepository = majorRepository;
 }
コード例 #15
0
ファイル: MajorsController.cs プロジェクト: kuroza/UBD-TABS
 public MajorsController(IMapper mapper, IMajorRepository repository, IUnitOfWork unitOfWork)
 {
     this.unitOfWork = unitOfWork;
     this.repository = repository;
     this.mapper     = mapper;
 }
コード例 #16
0
 public MajorCache(ICacheManagerProvider cacheManagerProvider, IMajorRepository repository)
     : base(cacheManagerProvider.GetCacheManager(), repository, "Major")
 {
 }
コード例 #17
0
ファイル: MajorsController.cs プロジェクト: khorshidis68/cms
 public MajorsController(IMajorRepository majorRepository, IGradeRepository gradeRepository)
 {
     _majorRepository = majorRepository;
     _gradeRepository = gradeRepository;
 }
コード例 #18
0
 public MajorService(IMapper mapper, IMajorRepository majorRepository) : base(mapper)
 {
     _majorRepository = majorRepository;
 }
コード例 #19
0
 public MajorBusinessLogic(IMajorRepository majorRepository)
 {
     this.majorRepository = majorRepository;
 }
コード例 #20
0
ファイル: MajorService.cs プロジェクト: nocoah/MatrixService
 public MajorService(IMajorCache majorCache, IMajorRepository majorRepository)
 {
     this._majorCache      = majorCache;
     this._majorRepository = majorRepository;
 }
コード例 #21
0
 public MajorsController(
     IMajorRepository majorRepository)
 {
     _majorRepository = majorRepository;
 }
コード例 #22
0
ファイル: MajorController.cs プロジェクト: his9989/Allcle
        private IMajorRepository _repo;   // ISubjectRepository class의 객체 _repo 생성.


        // 의존성 주입: ISubjectRepository의 인스턴스를 SubjectRepository의 인스턴스로
        // Startup.cs에서 설정한 DI를 생성자를 이용하여 받는 코드 구현이다.
        public MajorController(IMajorRepository repo) // private _repo에 데이터를 넣는 메소드.
        {
            _repo = repo;
        }
コード例 #23
0
ファイル: MajorsServices.cs プロジェクト: horasunitec/backend
 public MajorsServices(IMajorRepository majorRepository)
 {
     _majorRepository = majorRepository;
 }