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); } }
public ManagingStudentService() { studentRepository = new StudentRepository(); rankingRepository = new RankingRepository(); learningModeRepository = new LearningModeRepository(); majorRepository = new MajorRepository(); ethnicRepository = new EthnicRepository(); }
public ProjectServices(IProjectRepository projectRepository, IMajorRepository majorRepository, IClassRepository classRepository, IPeriodRepository periodRepository, ISectionProjectRepository sectionProjectRepository) { _projectRepository = projectRepository; _majorRepository = majorRepository; _classRepository = classRepository; _periodRepository = periodRepository; _sectionProjectRepository = sectionProjectRepository; }
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); }
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; }
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; }
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; }
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; }
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); }
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); } }
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; }
public MajorService(IMajorRepository majorRepository) { _majorRepository = majorRepository; }
public MajorController(ILogger <MajorController> logger, IMajorRepository majorRepository) { this.logger = logger; this.majorRepository = majorRepository; }
public MajorsController(IMapper mapper, IMajorRepository repository, IUnitOfWork unitOfWork) { this.unitOfWork = unitOfWork; this.repository = repository; this.mapper = mapper; }
public MajorCache(ICacheManagerProvider cacheManagerProvider, IMajorRepository repository) : base(cacheManagerProvider.GetCacheManager(), repository, "Major") { }
public MajorsController(IMajorRepository majorRepository, IGradeRepository gradeRepository) { _majorRepository = majorRepository; _gradeRepository = gradeRepository; }
public MajorService(IMapper mapper, IMajorRepository majorRepository) : base(mapper) { _majorRepository = majorRepository; }
public MajorBusinessLogic(IMajorRepository majorRepository) { this.majorRepository = majorRepository; }
public MajorService(IMajorCache majorCache, IMajorRepository majorRepository) { this._majorCache = majorCache; this._majorRepository = majorRepository; }
public MajorsController( IMajorRepository majorRepository) { _majorRepository = majorRepository; }
private IMajorRepository _repo; // ISubjectRepository class의 객체 _repo 생성. // 의존성 주입: ISubjectRepository의 인스턴스를 SubjectRepository의 인스턴스로 // Startup.cs에서 설정한 DI를 생성자를 이용하여 받는 코드 구현이다. public MajorController(IMajorRepository repo) // private _repo에 데이터를 넣는 메소드. { _repo = repo; }
public MajorsServices(IMajorRepository majorRepository) { _majorRepository = majorRepository; }