From 122330c98d8e52846ddd28d719f96596f8040d11 Mon Sep 17 00:00:00 2001 From: artur-kalimullin <144933634+artur-kalimullin@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:45:49 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=81=D0=BB=D0=B5=20=D0=BF=D0=B0=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/CurriculumSupplement.cs | 5 ++- .../Entities/Enums/TypeAudience.cs | 1 + .../ProjectSchedule/FormSchedule.cs | 6 --- .../Forms/FormAudience.Designer.cs | 29 ++++++------- .../ProjectSchedule/Forms/FormAudience.cs | 29 ++++++++++--- .../Forms/FormAudiences.Designer.cs | 28 ++++++------ .../Forms/FormCompilingSchedules.Designer.cs | 38 ++++++---------- .../Forms/FormCompilingSchedules.cs | 43 +------------------ .../FormCurriculumSupplement.Designer.cs | 30 +++++++++++-- .../Forms/FormCurriculumSupplement.cs | 2 +- .../FormCurriculumSupplements.Designer.cs | 26 +++++------ .../Forms/FormDisciplines.Designer.cs | 28 ++++++------ .../Forms/FormEducators.Designer.cs | 28 ++++++------ .../Forms/FormGroupsStudents.Designer.cs | 28 ++++++------ .../ICompilingScheduleRepository.cs | 2 - .../ICurriculumSupplementRepository.cs | 3 +- .../CompilingScheduleRepository.cs | 4 -- .../CurriculumSupplementRepository.cs | 3 +- 18 files changed, 156 insertions(+), 177 deletions(-) diff --git a/ProjectSchedule/ProjectSchedule/Entities/CurriculumSupplement.cs b/ProjectSchedule/ProjectSchedule/Entities/CurriculumSupplement.cs index 604ad13..0aff420 100644 --- a/ProjectSchedule/ProjectSchedule/Entities/CurriculumSupplement.cs +++ b/ProjectSchedule/ProjectSchedule/Entities/CurriculumSupplement.cs @@ -10,10 +10,12 @@ public class CurriculumSupplement public string Semester { get; private set; } = string.Empty; + public DateTime DateAdoptionPlan { get; private set; } + public IEnumerable DisciplineCurriculumSupplements { get; private set; } = []; public static CurriculumSupplement CreateOperation(int id, int groupStudentsId, string nameCurriculum, - string semester, IEnumerable disciplineCurriculumSupplements) + string semester, DateTime dateAdoptionPlan, IEnumerable disciplineCurriculumSupplements) { return new CurriculumSupplement { @@ -21,6 +23,7 @@ public class CurriculumSupplement GroupStudentsId = groupStudentsId, NameCurriculum = nameCurriculum ?? string.Empty, Semester = semester ?? string.Empty, + DateAdoptionPlan = dateAdoptionPlan, DisciplineCurriculumSupplements = disciplineCurriculumSupplements }; } diff --git a/ProjectSchedule/ProjectSchedule/Entities/Enums/TypeAudience.cs b/ProjectSchedule/ProjectSchedule/Entities/Enums/TypeAudience.cs index 64bd562..1fd4e71 100644 --- a/ProjectSchedule/ProjectSchedule/Entities/Enums/TypeAudience.cs +++ b/ProjectSchedule/ProjectSchedule/Entities/Enums/TypeAudience.cs @@ -1,5 +1,6 @@ namespace ProjectSchedule.Entities.Enums; +[Flags] public enum TypeAudience { None = 0, diff --git a/ProjectSchedule/ProjectSchedule/FormSchedule.cs b/ProjectSchedule/ProjectSchedule/FormSchedule.cs index eaf8a85..861144e 100644 --- a/ProjectSchedule/ProjectSchedule/FormSchedule.cs +++ b/ProjectSchedule/ProjectSchedule/FormSchedule.cs @@ -23,7 +23,6 @@ namespace ProjectSchedule catch (Exception ex) { MessageBox.Show(ex.Message, " ", MessageBoxButtons.OK, MessageBoxIcon.Error); - } } @@ -36,7 +35,6 @@ namespace ProjectSchedule catch (Exception ex) { MessageBox.Show(ex.Message, " ", MessageBoxButtons.OK, MessageBoxIcon.Error); - } } @@ -49,7 +47,6 @@ namespace ProjectSchedule catch (Exception ex) { MessageBox.Show(ex.Message, " ", MessageBoxButtons.OK, MessageBoxIcon.Error); - } } @@ -62,7 +59,6 @@ namespace ProjectSchedule catch (Exception ex) { MessageBox.Show(ex.Message, " ", MessageBoxButtons.OK, MessageBoxIcon.Error); - } } @@ -75,7 +71,6 @@ namespace ProjectSchedule catch (Exception ex) { MessageBox.Show(ex.Message, " ", MessageBoxButtons.OK, MessageBoxIcon.Error); - } } @@ -88,7 +83,6 @@ namespace ProjectSchedule catch (Exception ex) { MessageBox.Show(ex.Message, " ", MessageBoxButtons.OK, MessageBoxIcon.Error); - } } } diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormAudience.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormAudience.Designer.cs index 737297f..f69f541 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormAudience.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormAudience.Designer.cs @@ -35,7 +35,7 @@ buttonCancel = new Button(); textBoxNumberAudience = new TextBox(); numericUpDownQuantitySeats = new NumericUpDown(); - comboBoxTypeAudience = new ComboBox(); + checkedListBoxTypeAudience = new CheckedListBox(); ((System.ComponentModel.ISupportInitialize)numericUpDownQuantitySeats).BeginInit(); SuspendLayout(); // @@ -68,7 +68,7 @@ // // buttonSave // - buttonSave.Location = new Point(21, 208); + buttonSave.Location = new Point(21, 300); buttonSave.Name = "buttonSave"; buttonSave.Size = new Size(116, 29); buttonSave.TabIndex = 3; @@ -78,7 +78,7 @@ // // buttonCancel // - buttonCancel.Location = new Point(234, 208); + buttonCancel.Location = new Point(282, 300); buttonCancel.Name = "buttonCancel"; buttonCancel.Size = new Size(116, 29); buttonCancel.TabIndex = 4; @@ -90,7 +90,7 @@ // textBoxNumberAudience.Location = new Point(176, 29); textBoxNumberAudience.Name = "textBoxNumberAudience"; - textBoxNumberAudience.Size = new Size(174, 27); + textBoxNumberAudience.Size = new Size(222, 27); textBoxNumberAudience.TabIndex = 5; // // numericUpDownQuantitySeats @@ -98,24 +98,23 @@ numericUpDownQuantitySeats.Location = new Point(176, 77); numericUpDownQuantitySeats.Maximum = new decimal(new int[] { 500, 0, 0, 0 }); numericUpDownQuantitySeats.Name = "numericUpDownQuantitySeats"; - numericUpDownQuantitySeats.Size = new Size(174, 27); + numericUpDownQuantitySeats.Size = new Size(222, 27); numericUpDownQuantitySeats.TabIndex = 6; // - // comboBoxTypeAudience + // checkedListBoxTypeAudience // - comboBoxTypeAudience.DropDownStyle = ComboBoxStyle.DropDownList; - comboBoxTypeAudience.FormattingEnabled = true; - comboBoxTypeAudience.Location = new Point(176, 124); - comboBoxTypeAudience.Name = "comboBoxTypeAudience"; - comboBoxTypeAudience.Size = new Size(174, 28); - comboBoxTypeAudience.TabIndex = 7; + checkedListBoxTypeAudience.FormattingEnabled = true; + checkedListBoxTypeAudience.Location = new Point(176, 127); + checkedListBoxTypeAudience.Name = "checkedListBoxTypeAudience"; + checkedListBoxTypeAudience.Size = new Size(222, 136); + checkedListBoxTypeAudience.TabIndex = 7; // // FormAudience // AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(382, 253); - Controls.Add(comboBoxTypeAudience); + ClientSize = new Size(412, 353); + Controls.Add(checkedListBoxTypeAudience); Controls.Add(numericUpDownQuantitySeats); Controls.Add(textBoxNumberAudience); Controls.Add(buttonCancel); @@ -140,6 +139,6 @@ private Button buttonCancel; private TextBox textBoxNumberAudience; private NumericUpDown numericUpDownQuantitySeats; - private ComboBox comboBoxTypeAudience; + private CheckedListBox checkedListBoxTypeAudience; } } \ No newline at end of file diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormAudience.cs b/ProjectSchedule/ProjectSchedule/Forms/FormAudience.cs index 6400242..9ca9064 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormAudience.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormAudience.cs @@ -22,8 +22,15 @@ public partial class FormAudience : Form throw new InvalidDataException(nameof(audience)); } + foreach (TypeAudience elem in Enum.GetValues(typeof(TypeAudience))) + { + if ((elem & audience.TypeAudience) != 0) + { + checkedListBoxTypeAudience.SetItemChecked(checkedListBoxTypeAudience.Items.IndexOf(elem), true); + } + } + textBoxNumberAudience.Text = audience.NumberAudience; - comboBoxTypeAudience.SelectedItem = audience.TypeAudience; numericUpDownQuantitySeats.Value = audience.QuantitySeats; _audienceId = value; } @@ -40,14 +47,18 @@ public partial class FormAudience : Form InitializeComponent(); _audienceRepository = audienceRepository ?? throw new ArgumentNullException(nameof(audienceRepository)); - comboBoxTypeAudience.DataSource = Enum.GetValues(typeof(TypeAudience)); + + foreach (var elem in Enum.GetValues(typeof(TypeAudience))) + { + checkedListBoxTypeAudience.Items.Add(elem); + } } private void ButtonSave_Click(object sender, EventArgs e) { try { - if (string.IsNullOrWhiteSpace(textBoxNumberAudience.Text) || comboBoxTypeAudience.SelectedIndex < 1) + if (string.IsNullOrWhiteSpace(textBoxNumberAudience.Text) || checkedListBoxTypeAudience.CheckedItems.Count == 0) { throw new Exception("Имеются незаполненные поля"); } @@ -71,6 +82,14 @@ public partial class FormAudience : Form private void ButtonCancel_Click(object sender, EventArgs e) => Close(); - private Audience CreateAudience(int id) => - Audience.CreateEntity(id, textBoxNumberAudience.Text, (TypeAudience)comboBoxTypeAudience.SelectedItem!, Convert.ToInt32(numericUpDownQuantitySeats.Value)); + private Audience CreateAudience(int id) + { + TypeAudience typeAudience = TypeAudience.None; + foreach (var elem in checkedListBoxTypeAudience.CheckedItems) + { + typeAudience |= (TypeAudience)elem; + } + + return Audience.CreateEntity(id, textBoxNumberAudience.Text, typeAudience, Convert.ToInt32(numericUpDownQuantitySeats.Value)); + } } \ No newline at end of file diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormAudiences.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormAudiences.Designer.cs index 02853b8..a7e4802 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormAudiences.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormAudiences.Designer.cs @@ -28,25 +28,25 @@ /// private void InitializeComponent() { - panel = new Panel(); + panelButtons = new Panel(); buttonDel = new Button(); buttonUpd = new Button(); buttonAdd = new Button(); dataGridViewData = new DataGridView(); - panel.SuspendLayout(); + panelButtons.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); SuspendLayout(); // - // panel + // panelButtons // - panel.Controls.Add(buttonDel); - panel.Controls.Add(buttonUpd); - panel.Controls.Add(buttonAdd); - panel.Dock = DockStyle.Right; - panel.Location = new Point(672, 0); - panel.Name = "panel"; - panel.Size = new Size(140, 483); - panel.TabIndex = 0; + panelButtons.Controls.Add(buttonDel); + panelButtons.Controls.Add(buttonUpd); + panelButtons.Controls.Add(buttonAdd); + panelButtons.Dock = DockStyle.Right; + panelButtons.Location = new Point(672, 0); + panelButtons.Name = "panelButtons"; + panelButtons.Size = new Size(140, 483); + panelButtons.TabIndex = 0; // // buttonDel // @@ -106,19 +106,19 @@ AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(812, 483); Controls.Add(dataGridViewData); - Controls.Add(panel); + Controls.Add(panelButtons); Name = "FormAudiences"; StartPosition = FormStartPosition.CenterParent; Text = "Аудитории"; Load += FormAudiences_Load; - panel.ResumeLayout(false); + panelButtons.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ResumeLayout(false); } #endregion - private Panel panel; + private Panel panelButtons; private Button buttonDel; private Button buttonUpd; private Button buttonAdd; diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.Designer.cs index e176a51..c8bf920 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.Designer.cs @@ -28,34 +28,21 @@ /// private void InitializeComponent() { - panel = new Panel(); - buttonDel = new Button(); + panelButtons = new Panel(); buttonAdd = new Button(); dataGridViewData = new DataGridView(); - panel.SuspendLayout(); + panelButtons.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); SuspendLayout(); // - // panel + // panelButtons // - panel.Controls.Add(buttonDel); - panel.Controls.Add(buttonAdd); - panel.Dock = DockStyle.Right; - panel.Location = new Point(1113, 0); - panel.Name = "panel"; - panel.Size = new Size(140, 484); - panel.TabIndex = 3; - // - // buttonDel - // - buttonDel.BackgroundImage = Properties.Resources.Del; - buttonDel.BackgroundImageLayout = ImageLayout.Stretch; - buttonDel.Location = new Point(24, 372); - buttonDel.Name = "buttonDel"; - buttonDel.Size = new Size(94, 66); - buttonDel.TabIndex = 4; - buttonDel.UseVisualStyleBackColor = true; - buttonDel.Click += ButtonDel_Click; + panelButtons.Controls.Add(buttonAdd); + panelButtons.Dock = DockStyle.Right; + panelButtons.Location = new Point(1113, 0); + panelButtons.Name = "panelButtons"; + panelButtons.Size = new Size(140, 484); + panelButtons.TabIndex = 3; // // buttonAdd // @@ -93,20 +80,19 @@ AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1253, 484); Controls.Add(dataGridViewData); - Controls.Add(panel); + Controls.Add(panelButtons); Name = "FormCompilingSchedules"; StartPosition = FormStartPosition.CenterParent; Text = "Cоставление расписаний"; Load += FormCompilingSchedules_Load; - panel.ResumeLayout(false); + panelButtons.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ResumeLayout(false); } #endregion - private Panel panel; - private Button buttonDel; + private Panel panelButtons; private Button buttonAdd; private DataGridView dataGridViewData; } diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.cs b/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.cs index 2dadab9..a5cdd44 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormCompilingSchedules.cs @@ -12,7 +12,6 @@ namespace ProjectSchedule.Forms public FormCompilingSchedules(IUnityContainer container, ICompilingScheduleRepository сompilingScheduleRepository) { InitializeComponent(); - _container = container ?? throw new ArgumentNullException(nameof(container)); _сompilingScheduleRepository = сompilingScheduleRepository ?? @@ -44,46 +43,6 @@ namespace ProjectSchedule.Forms } } - private void ButtonDel_Click(object sender, EventArgs e) - { - if (!TryGetIdentifierFromSelectedRow(out var findId)) - { - return; - } - - if (MessageBox.Show("Удалить запись?", "Удаление", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return; - } - - try - { - _сompilingScheduleRepository.DeleteCompilingSchedule(findId); - LoadList(); - } - catch (Exception ex) - { - MessageBox.Show(ex.Message, "Ошибка при удалении", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - - private void LoadList() - { - dataGridViewData.DataSource = _сompilingScheduleRepository.ReadCompilingSchedules(); - } - - private bool TryGetIdentifierFromSelectedRow(out int id) - { - id = 0; - - if (dataGridViewData.SelectedRows.Count < 1) - { - MessageBox.Show("Нет выбранной записи", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); - return false; - } - - id = Convert.ToInt32(dataGridViewData.SelectedRows[0].Cells["Id"].Value); - return true; - } + private void LoadList() => dataGridViewData.DataSource = _сompilingScheduleRepository.ReadCompilingSchedules(); } } \ No newline at end of file diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.Designer.cs index 93e4db1..67aed33 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.Designer.cs @@ -41,6 +41,8 @@ ColumnDiscipline = new DataGridViewComboBoxColumn(); ColumnQuantityLectures = new DataGridViewTextBoxColumn(); ColumnQuantityPractices = new DataGridViewTextBoxColumn(); + labelDateAdoptionPlan = new Label(); + dateTimePickerDateAdoptionPlan = new DateTimePicker(); groupBoxDisciplines.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewDisciplines).BeginInit(); SuspendLayout(); @@ -91,7 +93,7 @@ // buttonSave // buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; - buttonSave.Location = new Point(12, 462); + buttonSave.Location = new Point(12, 522); buttonSave.Name = "buttonSave"; buttonSave.Size = new Size(116, 29); buttonSave.TabIndex = 12; @@ -102,7 +104,7 @@ // buttonCancel // buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; - buttonCancel.Location = new Point(354, 462); + buttonCancel.Location = new Point(354, 522); buttonCancel.Name = "buttonCancel"; buttonCancel.Size = new Size(116, 29); buttonCancel.TabIndex = 13; @@ -120,7 +122,7 @@ // groupBoxDisciplines // groupBoxDisciplines.Controls.Add(dataGridViewDisciplines); - groupBoxDisciplines.Location = new Point(12, 113); + groupBoxDisciplines.Location = new Point(12, 155); groupBoxDisciplines.Name = "groupBoxDisciplines"; groupBoxDisciplines.Size = new Size(458, 343); groupBoxDisciplines.TabIndex = 16; @@ -162,11 +164,29 @@ ColumnQuantityPractices.MinimumWidth = 6; ColumnQuantityPractices.Name = "ColumnQuantityPractices"; // + // labelDateAdoptionPlan + // + labelDateAdoptionPlan.AutoSize = true; + labelDateAdoptionPlan.Location = new Point(15, 122); + labelDateAdoptionPlan.Name = "labelDateAdoptionPlan"; + labelDateAdoptionPlan.Size = new Size(161, 20); + labelDateAdoptionPlan.TabIndex = 17; + labelDateAdoptionPlan.Text = "Дата принятия плана:"; + // + // dateTimePickerDateAdoptionPlan + // + dateTimePickerDateAdoptionPlan.Location = new Point(252, 117); + dateTimePickerDateAdoptionPlan.Name = "dateTimePickerDateAdoptionPlan"; + dateTimePickerDateAdoptionPlan.Size = new Size(218, 27); + dateTimePickerDateAdoptionPlan.TabIndex = 18; + // // FormCurriculumSupplement // AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(482, 503); + ClientSize = new Size(482, 563); + Controls.Add(dateTimePickerDateAdoptionPlan); + Controls.Add(labelDateAdoptionPlan); Controls.Add(groupBoxDisciplines); Controls.Add(textBoxSemester); Controls.Add(buttonCancel); @@ -199,5 +219,7 @@ private DataGridViewComboBoxColumn ColumnDiscipline; private DataGridViewTextBoxColumn ColumnQuantityLectures; private DataGridViewTextBoxColumn ColumnQuantityPractices; + private Label labelDateAdoptionPlan; + private DateTimePicker dateTimePickerDateAdoptionPlan; } } \ No newline at end of file diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.cs b/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.cs index 354de0e..bf7c860 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplement.cs @@ -35,7 +35,7 @@ namespace ProjectSchedule.Forms _curriculumSupplementRepository.CreateCurriculumSupplement(CurriculumSupplement.CreateOperation(0, (int)comboBoxGroupStudents.SelectedValue!, textBoxNameCurriculum.Text, textBoxSemester.Text, - CreateListDisciplineCurriculumSupplementsFromDataGrid())); + dateTimePickerDateAdoptionPlan.Value, CreateListDisciplineCurriculumSupplementsFromDataGrid())); Close(); } diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplements.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplements.Designer.cs index 79b0a4c..c507218 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplements.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormCurriculumSupplements.Designer.cs @@ -28,23 +28,23 @@ /// private void InitializeComponent() { - panel = new Panel(); + panelButtons = new Panel(); buttonDel = new Button(); buttonAdd = new Button(); dataGridViewData = new DataGridView(); - panel.SuspendLayout(); + panelButtons.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); SuspendLayout(); // - // panel + // panelButtons // - panel.Controls.Add(buttonDel); - panel.Controls.Add(buttonAdd); - panel.Dock = DockStyle.Right; - panel.Location = new Point(764, 0); - panel.Name = "panel"; - panel.Size = new Size(140, 453); - panel.TabIndex = 2; + panelButtons.Controls.Add(buttonDel); + panelButtons.Controls.Add(buttonAdd); + panelButtons.Dock = DockStyle.Right; + panelButtons.Location = new Point(764, 0); + panelButtons.Name = "panelButtons"; + panelButtons.Size = new Size(140, 453); + panelButtons.TabIndex = 2; // // buttonDel // @@ -93,19 +93,19 @@ AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(904, 453); Controls.Add(dataGridViewData); - Controls.Add(panel); + Controls.Add(panelButtons); Name = "FormCurriculumSupplements"; StartPosition = FormStartPosition.CenterParent; Text = "Дополнения учебного плана"; Load += FormCurriculumSupplements_Load; - panel.ResumeLayout(false); + panelButtons.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ResumeLayout(false); } #endregion - private Panel panel; + private Panel panelButtons; private Button buttonDel; private Button buttonAdd; private DataGridView dataGridViewData; diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormDisciplines.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormDisciplines.Designer.cs index c5a909f..69defd0 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormDisciplines.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormDisciplines.Designer.cs @@ -28,25 +28,25 @@ /// private void InitializeComponent() { - panel = new Panel(); + panelButtons = new Panel(); buttonDel = new Button(); buttonUpd = new Button(); buttonAdd = new Button(); dataGridViewData = new DataGridView(); - panel.SuspendLayout(); + panelButtons.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); SuspendLayout(); // - // panel + // panelButtons // - panel.Controls.Add(buttonDel); - panel.Controls.Add(buttonUpd); - panel.Controls.Add(buttonAdd); - panel.Dock = DockStyle.Right; - panel.Location = new Point(660, 0); - panel.Name = "panel"; - panel.Size = new Size(140, 450); - panel.TabIndex = 1; + panelButtons.Controls.Add(buttonDel); + panelButtons.Controls.Add(buttonUpd); + panelButtons.Controls.Add(buttonAdd); + panelButtons.Dock = DockStyle.Right; + panelButtons.Location = new Point(660, 0); + panelButtons.Name = "panelButtons"; + panelButtons.Size = new Size(140, 450); + panelButtons.TabIndex = 1; // // buttonDel // @@ -106,19 +106,19 @@ AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(800, 450); Controls.Add(dataGridViewData); - Controls.Add(panel); + Controls.Add(panelButtons); Name = "FormDisciplines"; StartPosition = FormStartPosition.CenterParent; Text = "Дисциплины"; Load += FormDisciplines_Load; - panel.ResumeLayout(false); + panelButtons.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ResumeLayout(false); } #endregion - private Panel panel; + private Panel panelButtons; private Button buttonDel; private Button buttonUpd; private Button buttonAdd; diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormEducators.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormEducators.Designer.cs index 0e44356..70a4a38 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormEducators.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormEducators.Designer.cs @@ -28,25 +28,25 @@ /// private void InitializeComponent() { - panel = new Panel(); + panelButtons = new Panel(); buttonDel = new Button(); buttonUpd = new Button(); buttonAdd = new Button(); dataGridViewData = new DataGridView(); - panel.SuspendLayout(); + panelButtons.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); SuspendLayout(); // - // panel + // panelButtons // - panel.Controls.Add(buttonDel); - panel.Controls.Add(buttonUpd); - panel.Controls.Add(buttonAdd); - panel.Dock = DockStyle.Right; - panel.Location = new Point(642, 0); - panel.Name = "panel"; - panel.Size = new Size(140, 453); - panel.TabIndex = 1; + panelButtons.Controls.Add(buttonDel); + panelButtons.Controls.Add(buttonUpd); + panelButtons.Controls.Add(buttonAdd); + panelButtons.Dock = DockStyle.Right; + panelButtons.Location = new Point(642, 0); + panelButtons.Name = "panelButtons"; + panelButtons.Size = new Size(140, 453); + panelButtons.TabIndex = 1; // // buttonDel // @@ -106,19 +106,19 @@ AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(782, 453); Controls.Add(dataGridViewData); - Controls.Add(panel); + Controls.Add(panelButtons); Name = "FormEducators"; StartPosition = FormStartPosition.CenterParent; Text = "Преподаватели"; Load += FormEducators_Load; - panel.ResumeLayout(false); + panelButtons.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ResumeLayout(false); } #endregion - private Panel panel; + private Panel panelButtons; private Button buttonDel; private Button buttonUpd; private Button buttonAdd; diff --git a/ProjectSchedule/ProjectSchedule/Forms/FormGroupsStudents.Designer.cs b/ProjectSchedule/ProjectSchedule/Forms/FormGroupsStudents.Designer.cs index a2a9805..1b28538 100644 --- a/ProjectSchedule/ProjectSchedule/Forms/FormGroupsStudents.Designer.cs +++ b/ProjectSchedule/ProjectSchedule/Forms/FormGroupsStudents.Designer.cs @@ -28,25 +28,25 @@ /// private void InitializeComponent() { - panel = new Panel(); + panelButtons = new Panel(); buttonDel = new Button(); buttonUpd = new Button(); buttonAdd = new Button(); dataGridViewData = new DataGridView(); - panel.SuspendLayout(); + panelButtons.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); SuspendLayout(); // - // panel + // panelButtons // - panel.Controls.Add(buttonDel); - panel.Controls.Add(buttonUpd); - panel.Controls.Add(buttonAdd); - panel.Dock = DockStyle.Right; - panel.Location = new Point(660, 0); - panel.Name = "panel"; - panel.Size = new Size(140, 450); - panel.TabIndex = 2; + panelButtons.Controls.Add(buttonDel); + panelButtons.Controls.Add(buttonUpd); + panelButtons.Controls.Add(buttonAdd); + panelButtons.Dock = DockStyle.Right; + panelButtons.Location = new Point(660, 0); + panelButtons.Name = "panelButtons"; + panelButtons.Size = new Size(140, 450); + panelButtons.TabIndex = 2; // // buttonDel // @@ -106,19 +106,19 @@ AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(800, 450); Controls.Add(dataGridViewData); - Controls.Add(panel); + Controls.Add(panelButtons); Name = "FormGroupsStudents"; StartPosition = FormStartPosition.CenterParent; Text = "Группы студентов"; Load += FormGroupsStudents_Load; - panel.ResumeLayout(false); + panelButtons.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ResumeLayout(false); } #endregion - private Panel panel; + private Panel panelButtons; private Button buttonDel; private Button buttonUpd; private Button buttonAdd; diff --git a/ProjectSchedule/ProjectSchedule/Repositories/ICompilingScheduleRepository.cs b/ProjectSchedule/ProjectSchedule/Repositories/ICompilingScheduleRepository.cs index 7a2b55e..9bec5a6 100644 --- a/ProjectSchedule/ProjectSchedule/Repositories/ICompilingScheduleRepository.cs +++ b/ProjectSchedule/ProjectSchedule/Repositories/ICompilingScheduleRepository.cs @@ -8,6 +8,4 @@ public interface ICompilingScheduleRepository int? groupStudentsId = null, int? audienceId = null); void CreateCompilingSchedule(CompilingSchedule compilingSchedule); - - void DeleteCompilingSchedule(int id); } \ No newline at end of file diff --git a/ProjectSchedule/ProjectSchedule/Repositories/ICurriculumSupplementRepository.cs b/ProjectSchedule/ProjectSchedule/Repositories/ICurriculumSupplementRepository.cs index 75f37e6..d2f2f1a 100644 --- a/ProjectSchedule/ProjectSchedule/Repositories/ICurriculumSupplementRepository.cs +++ b/ProjectSchedule/ProjectSchedule/Repositories/ICurriculumSupplementRepository.cs @@ -4,7 +4,8 @@ namespace ProjectSchedule.Repositories; public interface ICurriculumSupplementRepository { - IEnumerable ReadCurriculumSupplements(int? disciplineId = null, int? groupStudentsId = null); + IEnumerable ReadCurriculumSupplements(DateTime? dateForm = null, DateTime? dateTo = null, + int? disciplineId = null, int? groupStudentsId = null); void CreateCurriculumSupplement(CurriculumSupplement curriculumSupplement); diff --git a/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CompilingScheduleRepository.cs b/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CompilingScheduleRepository.cs index a2e07df..ecbb3ab 100644 --- a/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CompilingScheduleRepository.cs +++ b/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CompilingScheduleRepository.cs @@ -8,10 +8,6 @@ public class CompilingScheduleRepository : ICompilingScheduleRepository { } - public void DeleteCompilingSchedule(int id) - { - } - public IEnumerable ReadCompilingSchedules(int? educatorId = null, int? disciplineId = null, int? groupStudentsId = null, int? audienceId = null) { diff --git a/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CurriculumSupplementRepository.cs b/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CurriculumSupplementRepository.cs index 4934b46..48f21c9 100644 --- a/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CurriculumSupplementRepository.cs +++ b/ProjectSchedule/ProjectSchedule/Repositories/Implementations/CurriculumSupplementRepository.cs @@ -12,7 +12,8 @@ public class CurriculumSupplementRepository : ICurriculumSupplementRepository { } - public IEnumerable ReadCurriculumSupplements(int? disciplineId = null, int? groupStudentsId = null) + public IEnumerable ReadCurriculumSupplements(DateTime? dateForm = null, DateTime? dateTo = null, + int? disciplineId = null, int? groupStudentsId = null) { return []; }