Финальный коммит после пары

This commit is contained in:
artur-kalimullin 2024-11-07 14:45:49 +04:00
parent a87a6002fd
commit 122330c98d
18 changed files with 156 additions and 177 deletions

View File

@ -10,10 +10,12 @@ public class CurriculumSupplement
public string Semester { get; private set; } = string.Empty; public string Semester { get; private set; } = string.Empty;
public DateTime DateAdoptionPlan { get; private set; }
public IEnumerable<DisciplineCurriculumSupplement> DisciplineCurriculumSupplements { get; private set; } = []; public IEnumerable<DisciplineCurriculumSupplement> DisciplineCurriculumSupplements { get; private set; } = [];
public static CurriculumSupplement CreateOperation(int id, int groupStudentsId, string nameCurriculum, public static CurriculumSupplement CreateOperation(int id, int groupStudentsId, string nameCurriculum,
string semester, IEnumerable<DisciplineCurriculumSupplement> disciplineCurriculumSupplements) string semester, DateTime dateAdoptionPlan, IEnumerable<DisciplineCurriculumSupplement> disciplineCurriculumSupplements)
{ {
return new CurriculumSupplement return new CurriculumSupplement
{ {
@ -21,6 +23,7 @@ public class CurriculumSupplement
GroupStudentsId = groupStudentsId, GroupStudentsId = groupStudentsId,
NameCurriculum = nameCurriculum ?? string.Empty, NameCurriculum = nameCurriculum ?? string.Empty,
Semester = semester ?? string.Empty, Semester = semester ?? string.Empty,
DateAdoptionPlan = dateAdoptionPlan,
DisciplineCurriculumSupplements = disciplineCurriculumSupplements DisciplineCurriculumSupplements = disciplineCurriculumSupplements
}; };
} }

View File

@ -1,5 +1,6 @@
namespace ProjectSchedule.Entities.Enums; namespace ProjectSchedule.Entities.Enums;
[Flags]
public enum TypeAudience public enum TypeAudience
{ {
None = 0, None = 0,

View File

@ -23,7 +23,6 @@ namespace ProjectSchedule
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -36,7 +35,6 @@ namespace ProjectSchedule
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -49,7 +47,6 @@ namespace ProjectSchedule
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -62,7 +59,6 @@ namespace ProjectSchedule
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -75,7 +71,6 @@ namespace ProjectSchedule
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -88,7 +83,6 @@ namespace ProjectSchedule
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Îøèáêà ïðè çàãðóçêå", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
} }

View File

@ -35,7 +35,7 @@
buttonCancel = new Button(); buttonCancel = new Button();
textBoxNumberAudience = new TextBox(); textBoxNumberAudience = new TextBox();
numericUpDownQuantitySeats = new NumericUpDown(); numericUpDownQuantitySeats = new NumericUpDown();
comboBoxTypeAudience = new ComboBox(); checkedListBoxTypeAudience = new CheckedListBox();
((System.ComponentModel.ISupportInitialize)numericUpDownQuantitySeats).BeginInit(); ((System.ComponentModel.ISupportInitialize)numericUpDownQuantitySeats).BeginInit();
SuspendLayout(); SuspendLayout();
// //
@ -68,7 +68,7 @@
// //
// buttonSave // buttonSave
// //
buttonSave.Location = new Point(21, 208); buttonSave.Location = new Point(21, 300);
buttonSave.Name = "buttonSave"; buttonSave.Name = "buttonSave";
buttonSave.Size = new Size(116, 29); buttonSave.Size = new Size(116, 29);
buttonSave.TabIndex = 3; buttonSave.TabIndex = 3;
@ -78,7 +78,7 @@
// //
// buttonCancel // buttonCancel
// //
buttonCancel.Location = new Point(234, 208); buttonCancel.Location = new Point(282, 300);
buttonCancel.Name = "buttonCancel"; buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(116, 29); buttonCancel.Size = new Size(116, 29);
buttonCancel.TabIndex = 4; buttonCancel.TabIndex = 4;
@ -90,7 +90,7 @@
// //
textBoxNumberAudience.Location = new Point(176, 29); textBoxNumberAudience.Location = new Point(176, 29);
textBoxNumberAudience.Name = "textBoxNumberAudience"; textBoxNumberAudience.Name = "textBoxNumberAudience";
textBoxNumberAudience.Size = new Size(174, 27); textBoxNumberAudience.Size = new Size(222, 27);
textBoxNumberAudience.TabIndex = 5; textBoxNumberAudience.TabIndex = 5;
// //
// numericUpDownQuantitySeats // numericUpDownQuantitySeats
@ -98,24 +98,23 @@
numericUpDownQuantitySeats.Location = new Point(176, 77); numericUpDownQuantitySeats.Location = new Point(176, 77);
numericUpDownQuantitySeats.Maximum = new decimal(new int[] { 500, 0, 0, 0 }); numericUpDownQuantitySeats.Maximum = new decimal(new int[] { 500, 0, 0, 0 });
numericUpDownQuantitySeats.Name = "numericUpDownQuantitySeats"; numericUpDownQuantitySeats.Name = "numericUpDownQuantitySeats";
numericUpDownQuantitySeats.Size = new Size(174, 27); numericUpDownQuantitySeats.Size = new Size(222, 27);
numericUpDownQuantitySeats.TabIndex = 6; numericUpDownQuantitySeats.TabIndex = 6;
// //
// comboBoxTypeAudience // checkedListBoxTypeAudience
// //
comboBoxTypeAudience.DropDownStyle = ComboBoxStyle.DropDownList; checkedListBoxTypeAudience.FormattingEnabled = true;
comboBoxTypeAudience.FormattingEnabled = true; checkedListBoxTypeAudience.Location = new Point(176, 127);
comboBoxTypeAudience.Location = new Point(176, 124); checkedListBoxTypeAudience.Name = "checkedListBoxTypeAudience";
comboBoxTypeAudience.Name = "comboBoxTypeAudience"; checkedListBoxTypeAudience.Size = new Size(222, 136);
comboBoxTypeAudience.Size = new Size(174, 28); checkedListBoxTypeAudience.TabIndex = 7;
comboBoxTypeAudience.TabIndex = 7;
// //
// FormAudience // FormAudience
// //
AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(382, 253); ClientSize = new Size(412, 353);
Controls.Add(comboBoxTypeAudience); Controls.Add(checkedListBoxTypeAudience);
Controls.Add(numericUpDownQuantitySeats); Controls.Add(numericUpDownQuantitySeats);
Controls.Add(textBoxNumberAudience); Controls.Add(textBoxNumberAudience);
Controls.Add(buttonCancel); Controls.Add(buttonCancel);
@ -140,6 +139,6 @@
private Button buttonCancel; private Button buttonCancel;
private TextBox textBoxNumberAudience; private TextBox textBoxNumberAudience;
private NumericUpDown numericUpDownQuantitySeats; private NumericUpDown numericUpDownQuantitySeats;
private ComboBox comboBoxTypeAudience; private CheckedListBox checkedListBoxTypeAudience;
} }
} }

View File

@ -22,8 +22,15 @@ public partial class FormAudience : Form
throw new InvalidDataException(nameof(audience)); 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; textBoxNumberAudience.Text = audience.NumberAudience;
comboBoxTypeAudience.SelectedItem = audience.TypeAudience;
numericUpDownQuantitySeats.Value = audience.QuantitySeats; numericUpDownQuantitySeats.Value = audience.QuantitySeats;
_audienceId = value; _audienceId = value;
} }
@ -40,14 +47,18 @@ public partial class FormAudience : Form
InitializeComponent(); InitializeComponent();
_audienceRepository = audienceRepository ?? _audienceRepository = audienceRepository ??
throw new ArgumentNullException(nameof(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) private void ButtonSave_Click(object sender, EventArgs e)
{ {
try try
{ {
if (string.IsNullOrWhiteSpace(textBoxNumberAudience.Text) || comboBoxTypeAudience.SelectedIndex < 1) if (string.IsNullOrWhiteSpace(textBoxNumberAudience.Text) || checkedListBoxTypeAudience.CheckedItems.Count == 0)
{ {
throw new Exception("Имеются незаполненные поля"); throw new Exception("Имеются незаполненные поля");
} }
@ -71,6 +82,14 @@ public partial class FormAudience : Form
private void ButtonCancel_Click(object sender, EventArgs e) => Close(); private void ButtonCancel_Click(object sender, EventArgs e) => Close();
private Audience CreateAudience(int id) => private Audience CreateAudience(int id)
Audience.CreateEntity(id, textBoxNumberAudience.Text, (TypeAudience)comboBoxTypeAudience.SelectedItem!, Convert.ToInt32(numericUpDownQuantitySeats.Value)); {
TypeAudience typeAudience = TypeAudience.None;
foreach (var elem in checkedListBoxTypeAudience.CheckedItems)
{
typeAudience |= (TypeAudience)elem;
}
return Audience.CreateEntity(id, textBoxNumberAudience.Text, typeAudience, Convert.ToInt32(numericUpDownQuantitySeats.Value));
}
} }

View File

@ -28,25 +28,25 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
panel = new Panel(); panelButtons = new Panel();
buttonDel = new Button(); buttonDel = new Button();
buttonUpd = new Button(); buttonUpd = new Button();
buttonAdd = new Button(); buttonAdd = new Button();
dataGridViewData = new DataGridView(); dataGridViewData = new DataGridView();
panel.SuspendLayout(); panelButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// panel // panelButtons
// //
panel.Controls.Add(buttonDel); panelButtons.Controls.Add(buttonDel);
panel.Controls.Add(buttonUpd); panelButtons.Controls.Add(buttonUpd);
panel.Controls.Add(buttonAdd); panelButtons.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right; panelButtons.Dock = DockStyle.Right;
panel.Location = new Point(672, 0); panelButtons.Location = new Point(672, 0);
panel.Name = "panel"; panelButtons.Name = "panelButtons";
panel.Size = new Size(140, 483); panelButtons.Size = new Size(140, 483);
panel.TabIndex = 0; panelButtons.TabIndex = 0;
// //
// buttonDel // buttonDel
// //
@ -106,19 +106,19 @@
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(812, 483); ClientSize = new Size(812, 483);
Controls.Add(dataGridViewData); Controls.Add(dataGridViewData);
Controls.Add(panel); Controls.Add(panelButtons);
Name = "FormAudiences"; Name = "FormAudiences";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "Аудитории"; Text = "Аудитории";
Load += FormAudiences_Load; Load += FormAudiences_Load;
panel.ResumeLayout(false); panelButtons.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private Panel panel; private Panel panelButtons;
private Button buttonDel; private Button buttonDel;
private Button buttonUpd; private Button buttonUpd;
private Button buttonAdd; private Button buttonAdd;

View File

@ -28,34 +28,21 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
panel = new Panel(); panelButtons = new Panel();
buttonDel = new Button();
buttonAdd = new Button(); buttonAdd = new Button();
dataGridViewData = new DataGridView(); dataGridViewData = new DataGridView();
panel.SuspendLayout(); panelButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// panel // panelButtons
// //
panel.Controls.Add(buttonDel); panelButtons.Controls.Add(buttonAdd);
panel.Controls.Add(buttonAdd); panelButtons.Dock = DockStyle.Right;
panel.Dock = DockStyle.Right; panelButtons.Location = new Point(1113, 0);
panel.Location = new Point(1113, 0); panelButtons.Name = "panelButtons";
panel.Name = "panel"; panelButtons.Size = new Size(140, 484);
panel.Size = new Size(140, 484); panelButtons.TabIndex = 3;
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;
// //
// buttonAdd // buttonAdd
// //
@ -93,20 +80,19 @@
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1253, 484); ClientSize = new Size(1253, 484);
Controls.Add(dataGridViewData); Controls.Add(dataGridViewData);
Controls.Add(panel); Controls.Add(panelButtons);
Name = "FormCompilingSchedules"; Name = "FormCompilingSchedules";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "Cоставление расписаний"; Text = "Cоставление расписаний";
Load += FormCompilingSchedules_Load; Load += FormCompilingSchedules_Load;
panel.ResumeLayout(false); panelButtons.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private Panel panel; private Panel panelButtons;
private Button buttonDel;
private Button buttonAdd; private Button buttonAdd;
private DataGridView dataGridViewData; private DataGridView dataGridViewData;
} }

View File

@ -12,7 +12,6 @@ namespace ProjectSchedule.Forms
public FormCompilingSchedules(IUnityContainer container, ICompilingScheduleRepository сompilingScheduleRepository) public FormCompilingSchedules(IUnityContainer container, ICompilingScheduleRepository сompilingScheduleRepository)
{ {
InitializeComponent(); InitializeComponent();
_container = container ?? _container = container ??
throw new ArgumentNullException(nameof(container)); throw new ArgumentNullException(nameof(container));
_сompilingScheduleRepository = сompilingScheduleRepository ?? _сompilingScheduleRepository = сompilingScheduleRepository ??
@ -44,46 +43,6 @@ namespace ProjectSchedule.Forms
} }
} }
private void ButtonDel_Click(object sender, EventArgs e) private void LoadList() => dataGridViewData.DataSource = _сompilingScheduleRepository.ReadCompilingSchedules();
{
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;
}
} }
} }

View File

@ -41,6 +41,8 @@
ColumnDiscipline = new DataGridViewComboBoxColumn(); ColumnDiscipline = new DataGridViewComboBoxColumn();
ColumnQuantityLectures = new DataGridViewTextBoxColumn(); ColumnQuantityLectures = new DataGridViewTextBoxColumn();
ColumnQuantityPractices = new DataGridViewTextBoxColumn(); ColumnQuantityPractices = new DataGridViewTextBoxColumn();
labelDateAdoptionPlan = new Label();
dateTimePickerDateAdoptionPlan = new DateTimePicker();
groupBoxDisciplines.SuspendLayout(); groupBoxDisciplines.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridViewDisciplines).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewDisciplines).BeginInit();
SuspendLayout(); SuspendLayout();
@ -91,7 +93,7 @@
// buttonSave // buttonSave
// //
buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
buttonSave.Location = new Point(12, 462); buttonSave.Location = new Point(12, 522);
buttonSave.Name = "buttonSave"; buttonSave.Name = "buttonSave";
buttonSave.Size = new Size(116, 29); buttonSave.Size = new Size(116, 29);
buttonSave.TabIndex = 12; buttonSave.TabIndex = 12;
@ -102,7 +104,7 @@
// buttonCancel // buttonCancel
// //
buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonCancel.Location = new Point(354, 462); buttonCancel.Location = new Point(354, 522);
buttonCancel.Name = "buttonCancel"; buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(116, 29); buttonCancel.Size = new Size(116, 29);
buttonCancel.TabIndex = 13; buttonCancel.TabIndex = 13;
@ -120,7 +122,7 @@
// groupBoxDisciplines // groupBoxDisciplines
// //
groupBoxDisciplines.Controls.Add(dataGridViewDisciplines); groupBoxDisciplines.Controls.Add(dataGridViewDisciplines);
groupBoxDisciplines.Location = new Point(12, 113); groupBoxDisciplines.Location = new Point(12, 155);
groupBoxDisciplines.Name = "groupBoxDisciplines"; groupBoxDisciplines.Name = "groupBoxDisciplines";
groupBoxDisciplines.Size = new Size(458, 343); groupBoxDisciplines.Size = new Size(458, 343);
groupBoxDisciplines.TabIndex = 16; groupBoxDisciplines.TabIndex = 16;
@ -162,11 +164,29 @@
ColumnQuantityPractices.MinimumWidth = 6; ColumnQuantityPractices.MinimumWidth = 6;
ColumnQuantityPractices.Name = "ColumnQuantityPractices"; 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 // FormCurriculumSupplement
// //
AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(482, 503); ClientSize = new Size(482, 563);
Controls.Add(dateTimePickerDateAdoptionPlan);
Controls.Add(labelDateAdoptionPlan);
Controls.Add(groupBoxDisciplines); Controls.Add(groupBoxDisciplines);
Controls.Add(textBoxSemester); Controls.Add(textBoxSemester);
Controls.Add(buttonCancel); Controls.Add(buttonCancel);
@ -199,5 +219,7 @@
private DataGridViewComboBoxColumn ColumnDiscipline; private DataGridViewComboBoxColumn ColumnDiscipline;
private DataGridViewTextBoxColumn ColumnQuantityLectures; private DataGridViewTextBoxColumn ColumnQuantityLectures;
private DataGridViewTextBoxColumn ColumnQuantityPractices; private DataGridViewTextBoxColumn ColumnQuantityPractices;
private Label labelDateAdoptionPlan;
private DateTimePicker dateTimePickerDateAdoptionPlan;
} }
} }

View File

@ -35,7 +35,7 @@ namespace ProjectSchedule.Forms
_curriculumSupplementRepository.CreateCurriculumSupplement(CurriculumSupplement.CreateOperation(0, _curriculumSupplementRepository.CreateCurriculumSupplement(CurriculumSupplement.CreateOperation(0,
(int)comboBoxGroupStudents.SelectedValue!, textBoxNameCurriculum.Text, textBoxSemester.Text, (int)comboBoxGroupStudents.SelectedValue!, textBoxNameCurriculum.Text, textBoxSemester.Text,
CreateListDisciplineCurriculumSupplementsFromDataGrid())); dateTimePickerDateAdoptionPlan.Value, CreateListDisciplineCurriculumSupplementsFromDataGrid()));
Close(); Close();
} }

View File

@ -28,23 +28,23 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
panel = new Panel(); panelButtons = new Panel();
buttonDel = new Button(); buttonDel = new Button();
buttonAdd = new Button(); buttonAdd = new Button();
dataGridViewData = new DataGridView(); dataGridViewData = new DataGridView();
panel.SuspendLayout(); panelButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// panel // panelButtons
// //
panel.Controls.Add(buttonDel); panelButtons.Controls.Add(buttonDel);
panel.Controls.Add(buttonAdd); panelButtons.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right; panelButtons.Dock = DockStyle.Right;
panel.Location = new Point(764, 0); panelButtons.Location = new Point(764, 0);
panel.Name = "panel"; panelButtons.Name = "panelButtons";
panel.Size = new Size(140, 453); panelButtons.Size = new Size(140, 453);
panel.TabIndex = 2; panelButtons.TabIndex = 2;
// //
// buttonDel // buttonDel
// //
@ -93,19 +93,19 @@
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(904, 453); ClientSize = new Size(904, 453);
Controls.Add(dataGridViewData); Controls.Add(dataGridViewData);
Controls.Add(panel); Controls.Add(panelButtons);
Name = "FormCurriculumSupplements"; Name = "FormCurriculumSupplements";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "Дополнения учебного плана"; Text = "Дополнения учебного плана";
Load += FormCurriculumSupplements_Load; Load += FormCurriculumSupplements_Load;
panel.ResumeLayout(false); panelButtons.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private Panel panel; private Panel panelButtons;
private Button buttonDel; private Button buttonDel;
private Button buttonAdd; private Button buttonAdd;
private DataGridView dataGridViewData; private DataGridView dataGridViewData;

View File

@ -28,25 +28,25 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
panel = new Panel(); panelButtons = new Panel();
buttonDel = new Button(); buttonDel = new Button();
buttonUpd = new Button(); buttonUpd = new Button();
buttonAdd = new Button(); buttonAdd = new Button();
dataGridViewData = new DataGridView(); dataGridViewData = new DataGridView();
panel.SuspendLayout(); panelButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// panel // panelButtons
// //
panel.Controls.Add(buttonDel); panelButtons.Controls.Add(buttonDel);
panel.Controls.Add(buttonUpd); panelButtons.Controls.Add(buttonUpd);
panel.Controls.Add(buttonAdd); panelButtons.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right; panelButtons.Dock = DockStyle.Right;
panel.Location = new Point(660, 0); panelButtons.Location = new Point(660, 0);
panel.Name = "panel"; panelButtons.Name = "panelButtons";
panel.Size = new Size(140, 450); panelButtons.Size = new Size(140, 450);
panel.TabIndex = 1; panelButtons.TabIndex = 1;
// //
// buttonDel // buttonDel
// //
@ -106,19 +106,19 @@
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450); ClientSize = new Size(800, 450);
Controls.Add(dataGridViewData); Controls.Add(dataGridViewData);
Controls.Add(panel); Controls.Add(panelButtons);
Name = "FormDisciplines"; Name = "FormDisciplines";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "Дисциплины"; Text = "Дисциплины";
Load += FormDisciplines_Load; Load += FormDisciplines_Load;
panel.ResumeLayout(false); panelButtons.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private Panel panel; private Panel panelButtons;
private Button buttonDel; private Button buttonDel;
private Button buttonUpd; private Button buttonUpd;
private Button buttonAdd; private Button buttonAdd;

View File

@ -28,25 +28,25 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
panel = new Panel(); panelButtons = new Panel();
buttonDel = new Button(); buttonDel = new Button();
buttonUpd = new Button(); buttonUpd = new Button();
buttonAdd = new Button(); buttonAdd = new Button();
dataGridViewData = new DataGridView(); dataGridViewData = new DataGridView();
panel.SuspendLayout(); panelButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// panel // panelButtons
// //
panel.Controls.Add(buttonDel); panelButtons.Controls.Add(buttonDel);
panel.Controls.Add(buttonUpd); panelButtons.Controls.Add(buttonUpd);
panel.Controls.Add(buttonAdd); panelButtons.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right; panelButtons.Dock = DockStyle.Right;
panel.Location = new Point(642, 0); panelButtons.Location = new Point(642, 0);
panel.Name = "panel"; panelButtons.Name = "panelButtons";
panel.Size = new Size(140, 453); panelButtons.Size = new Size(140, 453);
panel.TabIndex = 1; panelButtons.TabIndex = 1;
// //
// buttonDel // buttonDel
// //
@ -106,19 +106,19 @@
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(782, 453); ClientSize = new Size(782, 453);
Controls.Add(dataGridViewData); Controls.Add(dataGridViewData);
Controls.Add(panel); Controls.Add(panelButtons);
Name = "FormEducators"; Name = "FormEducators";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "Преподаватели"; Text = "Преподаватели";
Load += FormEducators_Load; Load += FormEducators_Load;
panel.ResumeLayout(false); panelButtons.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private Panel panel; private Panel panelButtons;
private Button buttonDel; private Button buttonDel;
private Button buttonUpd; private Button buttonUpd;
private Button buttonAdd; private Button buttonAdd;

View File

@ -28,25 +28,25 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
panel = new Panel(); panelButtons = new Panel();
buttonDel = new Button(); buttonDel = new Button();
buttonUpd = new Button(); buttonUpd = new Button();
buttonAdd = new Button(); buttonAdd = new Button();
dataGridViewData = new DataGridView(); dataGridViewData = new DataGridView();
panel.SuspendLayout(); panelButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// panel // panelButtons
// //
panel.Controls.Add(buttonDel); panelButtons.Controls.Add(buttonDel);
panel.Controls.Add(buttonUpd); panelButtons.Controls.Add(buttonUpd);
panel.Controls.Add(buttonAdd); panelButtons.Controls.Add(buttonAdd);
panel.Dock = DockStyle.Right; panelButtons.Dock = DockStyle.Right;
panel.Location = new Point(660, 0); panelButtons.Location = new Point(660, 0);
panel.Name = "panel"; panelButtons.Name = "panelButtons";
panel.Size = new Size(140, 450); panelButtons.Size = new Size(140, 450);
panel.TabIndex = 2; panelButtons.TabIndex = 2;
// //
// buttonDel // buttonDel
// //
@ -106,19 +106,19 @@
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450); ClientSize = new Size(800, 450);
Controls.Add(dataGridViewData); Controls.Add(dataGridViewData);
Controls.Add(panel); Controls.Add(panelButtons);
Name = "FormGroupsStudents"; Name = "FormGroupsStudents";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "Группы студентов"; Text = "Группы студентов";
Load += FormGroupsStudents_Load; Load += FormGroupsStudents_Load;
panel.ResumeLayout(false); panelButtons.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridViewData).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private Panel panel; private Panel panelButtons;
private Button buttonDel; private Button buttonDel;
private Button buttonUpd; private Button buttonUpd;
private Button buttonAdd; private Button buttonAdd;

View File

@ -8,6 +8,4 @@ public interface ICompilingScheduleRepository
int? groupStudentsId = null, int? audienceId = null); int? groupStudentsId = null, int? audienceId = null);
void CreateCompilingSchedule(CompilingSchedule compilingSchedule); void CreateCompilingSchedule(CompilingSchedule compilingSchedule);
void DeleteCompilingSchedule(int id);
} }

View File

@ -4,7 +4,8 @@ namespace ProjectSchedule.Repositories;
public interface ICurriculumSupplementRepository public interface ICurriculumSupplementRepository
{ {
IEnumerable<CurriculumSupplement> ReadCurriculumSupplements(int? disciplineId = null, int? groupStudentsId = null); IEnumerable<CurriculumSupplement> ReadCurriculumSupplements(DateTime? dateForm = null, DateTime? dateTo = null,
int? disciplineId = null, int? groupStudentsId = null);
void CreateCurriculumSupplement(CurriculumSupplement curriculumSupplement); void CreateCurriculumSupplement(CurriculumSupplement curriculumSupplement);

View File

@ -8,10 +8,6 @@ public class CompilingScheduleRepository : ICompilingScheduleRepository
{ {
} }
public void DeleteCompilingSchedule(int id)
{
}
public IEnumerable<CompilingSchedule> ReadCompilingSchedules(int? educatorId = null, int? disciplineId = null, public IEnumerable<CompilingSchedule> ReadCompilingSchedules(int? educatorId = null, int? disciplineId = null,
int? groupStudentsId = null, int? audienceId = null) int? groupStudentsId = null, int? audienceId = null)
{ {

View File

@ -12,7 +12,8 @@ public class CurriculumSupplementRepository : ICurriculumSupplementRepository
{ {
} }
public IEnumerable<CurriculumSupplement> ReadCurriculumSupplements(int? disciplineId = null, int? groupStudentsId = null) public IEnumerable<CurriculumSupplement> ReadCurriculumSupplements(DateTime? dateForm = null, DateTime? dateTo = null,
int? disciplineId = null, int? groupStudentsId = null)
{ {
return []; return [];
} }