public List <DisciplineForSelect> GetDisciplineForSelect( long educPlanSpecId, int semesrt, long studentId, long movingId, EducPlanSpec educPlanSpec) { //Затык от ЮЮ (Вет.фак магистрам нужно скармливать дисциплины бакалавров) var kvalifId = educPlanSpec.KvalifFK; if (educPlanSpec.FakultetFK == 5 && kvalifId == 3) { kvalifId = 1; } var parameters = new DynamicParameters(); parameters.Add("@semesrt", semesrt); parameters.Add("@yearBegin", educPlanSpec.EducYearBegin); parameters.Add("@IdKvalif", kvalifId); parameters.Add("@IdVidEduc", educPlanSpec.EducVidFK); parameters.Add("@IsStn", educPlanSpec.IsStn ? 1 : 0); parameters.Add("@IdEducPlanSpecDiffSelectMain", educPlanSpecId); parameters.Add("@IdMoving", movingId); parameters.Add("@u", studentId); using (IDbConnection db = new SqlConnection(connectionString)) { var results = db.Query <DisciplineForSelect>("exec dbo.usp_EducPlan_DisciplinesDiffSelect_jrn @IdEducPlanSpec=0, @DisciplinesName='', @IdKategoryType=0, @chkInterKaf=-1, @chkInterKafCalc=1, @IsDisciplinesDiffSelect=1, @SemesterEduc=@semesrt, @EducPlanYearBegin=@yearBegin, @IdKvalif=@IdKvalif, @IdVidEduc=@IdVidEduc, @IsStn=@IsStn, @IdEducPlanSpecDiffSelectMain=@IdEducPlanSpecDiffSelectMain, @IdMoving=@IdMoving, @IdKadr_us=@u" , parameters); //.ToList()(); return(results.ToList()); } }
public List <DisciplineForSelect> GetDisciplineForSelect( long educPlanSpecId, int semesrt, long studentId, long movingId, EducPlanSpec educPlanSpec) { var elementList = _uow.repoEducPlanSpec.GetDisciplineForSelect(educPlanSpecId, semesrt, studentId, movingId, educPlanSpec); return(elementList); }