public static void FillIndPlanDataset(DataTable5DataTable datatable, List <Workflow> workflows, List <ExtendedStaticWorkflow> statics, Employee employee) { foreach (var w in workflows) { datatable.AddDataTable5Row(w.Employee.FullName, w.Semester.CountOfWeeks * w.Lectures, w.Semester.CountOfWeeks * w.Practices, w.Semester.CountOfWeeks * w.Labs * w.Group.CountOfSubgroups, GetInt(w.KR) * w.Group.CountOfStudents * 2, GetInt(w.KP) * w.Group.CountOfStudents * 3, 0, 0, 0.05 * w.Lectures * w.Semester.CountOfWeeks + 2 * 1 * GetInt(w.Examen), GetInt(w.Zachet) * w.Group.CountOfStudents * 0.25, GetInt(w.Examen) * 0.33 * w.Group.CountOfStudents, 0, 0, w.Discipline.DisciplineName, w.Group?.FullName ?? "-", w.WorkflowYear?.FullYearName, 0, 0, 0, 0, 0, 0, w.Group?.CountOfStudents ?? 0, WorkflowCalculator.CalculateSimpleWorkflow(w), GetInt(w.Semester.IsAutumn) ); } foreach (var w in statics) { var lowerD = w.DisciplineName.ToLower(); datatable.AddDataTable5Row(employee.FullName, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (lowerD == "государственный экзамен бакалавров" ? w.GetValueByEmployeeId(employee.Id) : 0), (lowerD == "работа гак" ? w.GetValueByEmployeeId(employee.Id) : 0), w.DisciplineName, w.Group?.FullName, w.AcademicYear?.FullYearName, (lowerD == "диссертация бакалавры" || lowerD == "государственный экзамен бакалавров" || lowerD == "работа гак" ? 0 : w.Value1) , 0 , 0 , 0, 0, (lowerD == "диссертация бакалавры" ? w.Value1 : 0), w.Group?.CountOfStudents ?? 0 , (lowerD == "государственный экзамен бакалавров" ? w.GetValueByEmployeeId(employee.Id) : 0) + (lowerD == "работа гак" ? w.GetValueByEmployeeId(employee.Id) : 0) + (/*lowerD == "диссертация бакалавры" ||*/ lowerD == "государственный экзамен бакалавров" || lowerD == "работа гак" ? 0 : w.Value1) , GetInt(w.Semester.IsAutumn) ); } }
public static void FillSemesterDataset(DataTable1DataTable datatable, List <Workflow> workflows, List <ExtendedStaticWorkflow> statics) { foreach (var w in workflows) { if (w.Discipline.DisciplineName == "Web-программирование") { } datatable.AddDataTable1Row(w.Group.FullName, w.Discipline.DisciplineName, w.Semester.CountOfWeeks , w.Agreement?.Description, w.Semester.SemesterNumber, w.WorkflowYear.FullYearName, WorkflowCalculator.CalculateSimpleWorkflow(w) , w.Group.EntryYear , w.Lectures , w.Group.CountOfStudents , w.Discipline.DisciplineName.Contains("аспирант")?"асп":w.Semester.Course > 4? "маг": "бак"); } foreach (var w in statics) { datatable.AddDataTable1Row(w.Group.FullName, w.DisciplineName, w.Semester.CountOfWeeks, w.Agreement?.Description, w.Semester.SemesterNumber, w.AcademicYear.FullYearName , WorkflowCalculator.CalculateStaticWorkflowTotal(w) , w.Group.EntryYear , 0 , w.Group.CountOfStudents , w.DisciplineName.Contains("аспирант") ? "асп" : w.Semester.Course > 4 ? "маг" : "бак" ); } }