commit 0d4f925d451dc4c458b845a02375a8d5527dd745 Author: Student Date: Mon Nov 17 15:48:46 2025 +0400 first diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc66022 Binary files /dev/null and b/.gitignore differ diff --git a/.vs/Neshina13/FileContentIndex/0d343d5f-3cd5-4249-9b25-09c5dfa52201.vsidx b/.vs/Neshina13/FileContentIndex/0d343d5f-3cd5-4249-9b25-09c5dfa52201.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/Neshina13/FileContentIndex/0d343d5f-3cd5-4249-9b25-09c5dfa52201.vsidx differ diff --git a/.vs/Neshina13/FileContentIndex/23f7460d-a5fa-43e1-bbb0-96a5dc376553.vsidx b/.vs/Neshina13/FileContentIndex/23f7460d-a5fa-43e1-bbb0-96a5dc376553.vsidx new file mode 100644 index 0000000..5c882e2 Binary files /dev/null and b/.vs/Neshina13/FileContentIndex/23f7460d-a5fa-43e1-bbb0-96a5dc376553.vsidx differ diff --git a/.vs/Neshina13/FileContentIndex/30e99fed-3f1a-4df4-b274-bba186b46388.vsidx b/.vs/Neshina13/FileContentIndex/30e99fed-3f1a-4df4-b274-bba186b46388.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/Neshina13/FileContentIndex/30e99fed-3f1a-4df4-b274-bba186b46388.vsidx differ diff --git a/.vs/Neshina13/FileContentIndex/373bab22-fb34-4682-9448-a1f006c1885a.vsidx b/.vs/Neshina13/FileContentIndex/373bab22-fb34-4682-9448-a1f006c1885a.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/Neshina13/FileContentIndex/373bab22-fb34-4682-9448-a1f006c1885a.vsidx differ diff --git a/.vs/Neshina13/FileContentIndex/cff0bba6-2d06-4ff7-82fc-eaa82f2fa71d.vsidx b/.vs/Neshina13/FileContentIndex/cff0bba6-2d06-4ff7-82fc-eaa82f2fa71d.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/Neshina13/FileContentIndex/cff0bba6-2d06-4ff7-82fc-eaa82f2fa71d.vsidx differ diff --git a/.vs/Neshina13/v17/.suo b/.vs/Neshina13/v17/.suo new file mode 100644 index 0000000..331fa53 Binary files /dev/null and b/.vs/Neshina13/v17/.suo differ diff --git a/.vs/Neshina13/v17/.wsuo b/.vs/Neshina13/v17/.wsuo new file mode 100644 index 0000000..d7f1635 Binary files /dev/null and b/.vs/Neshina13/v17/.wsuo differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..d11523b --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,8 @@ +{ + "ExpandedNodes": [ + "", + "\\Neshina13" + ], + "SelectedNode": "\\Neshina13\\Edit.Designer.cs", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..ad74cce Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/Neshina13.sln b/Neshina13.sln new file mode 100644 index 0000000..141ae82 --- /dev/null +++ b/Neshina13.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34511.84 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neshina13", "Neshina13\Neshina13.csproj", "{D090A003-F1CB-4B85-BA5D-D60A7D63876C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CFFE3195-F7D4-47FF-B17C-409BAB70E854} + EndGlobalSection +EndGlobal diff --git a/Neshina13/Add.Designer.cs b/Neshina13/Add.Designer.cs new file mode 100644 index 0000000..7cf9b19 --- /dev/null +++ b/Neshina13/Add.Designer.cs @@ -0,0 +1,176 @@ +namespace Neshina13 +{ + partial class Add + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.comboBox4 = new System.Windows.Forms.ComboBox(); + this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(98, 415); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(152, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Добавить"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label1.Location = new System.Drawing.Point(70, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(228, 39); + this.label1.TabIndex = 1; + this.label1.Text = "Добавление"; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(52, 123); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(261, 21); + this.comboBox1.TabIndex = 2; + // + // comboBox2 + // + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(52, 180); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(261, 21); + this.comboBox2.TabIndex = 3; + // + // comboBox3 + // + this.comboBox3.FormattingEnabled = true; + this.comboBox3.Location = new System.Drawing.Point(52, 236); + this.comboBox3.Name = "comboBox3"; + this.comboBox3.Size = new System.Drawing.Size(261, 21); + this.comboBox3.TabIndex = 4; + // + // comboBox4 + // + this.comboBox4.FormattingEnabled = true; + this.comboBox4.Location = new System.Drawing.Point(52, 296); + this.comboBox4.Name = "comboBox4"; + this.comboBox4.Size = new System.Drawing.Size(261, 21); + this.comboBox4.TabIndex = 5; + // + // dateTimePicker1 + // + this.dateTimePicker1.Location = new System.Drawing.Point(52, 351); + this.dateTimePicker1.Name = "dateTimePicker1"; + this.dateTimePicker1.Size = new System.Drawing.Size(261, 20); + this.dateTimePicker1.TabIndex = 6; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(49, 107); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(52, 13); + this.label2.TabIndex = 7; + this.label2.Text = "Предмет"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(52, 161); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(42, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Группа"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(49, 280); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(60, 13); + this.label4.TabIndex = 9; + this.label4.Text = "Менеджер"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(52, 217); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(49, 13); + this.label5.TabIndex = 10; + this.label5.Text = "Учитель"; + // + // Add + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(370, 450); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.dateTimePicker1); + this.Controls.Add(this.comboBox4); + this.Controls.Add(this.comboBox3); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.label1); + this.Controls.Add(this.button1); + this.Name = "Add"; + this.Text = "Add"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ComboBox comboBox3; + private System.Windows.Forms.ComboBox comboBox4; + private System.Windows.Forms.DateTimePicker dateTimePicker1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/Neshina13/Add.cs b/Neshina13/Add.cs new file mode 100644 index 0000000..8ea34d0 --- /dev/null +++ b/Neshina13/Add.cs @@ -0,0 +1,121 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Add : Form + { + public Add() + { + InitializeComponent(); + LoadComboBoxes(); + + } + + private void LoadComboBoxes() + { + // Загрузка предметов + string subjQuery = "SELECT StudySubject_Id, StudySubject_name FROM StudySubjects"; + FillComboBox(comboBox1, subjQuery, "StudySubject_name", "StudySubject_Id"); + + // Загрузка групп + string groupQuery = "SELECT Group_Id, CONCAT(GroupNum, ' - ', Group_Special) AS GroupInfo FROM `Group`"; + FillComboBox(comboBox2, groupQuery, "GroupInfo", "Group_Id"); + + // Загрузка преподавателей + string teacherQuery = "SELECT Teacher_Id, CONCAT(Teacher_FirstName, ' ', Teacher_LastName, ' ', Teacher_MiddleName) AS TeacherName FROM Teacher"; + FillComboBox(comboBox3, teacherQuery, "TeacherName", "Teacher_Id"); + + // Загрузка ответственных (менеджеров) + string managerQuery = "SELECT Manger_Id, CONCAT(Manager_FirstName, ' ', Manager_LastName, ' ', Manager_MiddleName) AS ManagerName FROM Mangers"; + FillComboBox(comboBox4, managerQuery, "ManagerName", "Manger_Id"); + } + + private void FillComboBox(ComboBox comboBox, string query, string displayMember, string valueMember) + { + try + { + var conn = DB.GetInstance().GetConnection(); + using (var adapter = new MySqlDataAdapter(query, conn)) + { + var table = new DataTable(); + adapter.Fill(table); + comboBox.DataSource = table; + comboBox.DisplayMember = displayMember; + comboBox.ValueMember = valueMember; + comboBox.SelectedIndex = -1; // Ничего не выбрано по умолчанию + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных: " + ex.Message); + } + } + + + private void button1_Click(object sender, EventArgs e) + { + + // Проверка, что все обязательные поля выбраны + if (comboBox1.SelectedValue == null || + comboBox2.SelectedValue == null || + comboBox3.SelectedValue == null || + comboBox4.SelectedValue == null) + { + MessageBox.Show("Пожалуйста, заполните все поля."); + return; + } + + try + { + var conn = DB.GetInstance().GetConnection(); + + string insertQuery = @" + INSERT INTO Schedule ( + Schedule_StudySubject_Id, + Schedule_Group_Id, + Schedule_Teacher_Id, + Schedule_ResponsiblMmanager, + Schedule_Date + ) VALUES ( + @subjectId, + @groupId, + @teacherId, + @managerId, + @date + );"; + + using (var cmd = new MySqlCommand(insertQuery, conn)) + { + cmd.Parameters.AddWithValue("@subjectId", comboBox1.SelectedValue); + cmd.Parameters.AddWithValue("@groupId", comboBox2.SelectedValue); + cmd.Parameters.AddWithValue("@teacherId", comboBox3.SelectedValue); + cmd.Parameters.AddWithValue("@managerId", comboBox4.SelectedValue); + cmd.Parameters.AddWithValue("@date", dateTimePicker1.Value.Date); + + cmd.ExecuteNonQuery(); + } + + MessageBox.Show("Запись успешно добавлена!"); + this.DialogResult = DialogResult.OK; + this.Close(); + } + catch (Exception ex) + { + MessageBox.Show("Ошибка при добавлении записи: " + ex.Message); + } + } + } +} + + diff --git a/Neshina13/Add.resx b/Neshina13/Add.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Add.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/App.config b/Neshina13/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/Neshina13/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Neshina13/DB.cs b/Neshina13/DB.cs new file mode 100644 index 0000000..8126657 --- /dev/null +++ b/Neshina13/DB.cs @@ -0,0 +1,36 @@ +using MySql.Data.MySqlClient; +using System.Data; +using System.Data.SqlClient; + +namespace NeshinaPolina07_11 +{ + internal class DB + { + private static DB instance; + private MySqlConnection connection; + + private readonly string connectionString = + "server=192.168.201.207;port=3306;username=ISP41_Neshina;password=ISP41_Neshina;database=ISP41_Neshina_13;SslMode=none;Charset=utf8mb4"; + + private DB() + { + connection = new MySqlConnection(connectionString); + OpenConnection(); + } + + public static DB GetInstance() + { + if (instance == null) + instance = new DB(); + return instance; + } + + public void OpenConnection() + { + if (connection.State == ConnectionState.Closed) + connection.Open(); + } + + public MySqlConnection GetConnection() => connection; + } +} \ No newline at end of file diff --git a/Neshina13/Edit.Designer.cs b/Neshina13/Edit.Designer.cs new file mode 100644 index 0000000..f218f9a --- /dev/null +++ b/Neshina13/Edit.Designer.cs @@ -0,0 +1,176 @@ +namespace Neshina13 +{ + partial class Edit + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.comboBox4 = new System.Windows.Forms.ComboBox(); + this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); + this.button1 = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label1.Location = new System.Drawing.Point(47, 29); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(279, 39); + this.label1.TabIndex = 0; + this.label1.Text = "Редактрование"; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(54, 129); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(272, 21); + this.comboBox1.TabIndex = 1; + // + // comboBox2 + // + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(54, 183); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(272, 21); + this.comboBox2.TabIndex = 2; + // + // comboBox3 + // + this.comboBox3.FormattingEnabled = true; + this.comboBox3.Location = new System.Drawing.Point(54, 235); + this.comboBox3.Name = "comboBox3"; + this.comboBox3.Size = new System.Drawing.Size(272, 21); + this.comboBox3.TabIndex = 3; + // + // comboBox4 + // + this.comboBox4.FormattingEnabled = true; + this.comboBox4.Location = new System.Drawing.Point(54, 286); + this.comboBox4.Name = "comboBox4"; + this.comboBox4.Size = new System.Drawing.Size(272, 21); + this.comboBox4.TabIndex = 4; + // + // dateTimePicker1 + // + this.dateTimePicker1.Location = new System.Drawing.Point(54, 342); + this.dateTimePicker1.Name = "dateTimePicker1"; + this.dateTimePicker1.Size = new System.Drawing.Size(272, 20); + this.dateTimePicker1.TabIndex = 5; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(114, 397); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(156, 23); + this.button1.TabIndex = 6; + this.button1.Text = "Сохранить"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(51, 113); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(52, 13); + this.label2.TabIndex = 8; + this.label2.Text = "Предмет"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(51, 167); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(42, 13); + this.label3.TabIndex = 9; + this.label3.Text = "Группа"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(51, 219); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(49, 13); + this.label5.TabIndex = 11; + this.label5.Text = "Учитель"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(51, 270); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(60, 13); + this.label4.TabIndex = 12; + this.label4.Text = "Менеджер"; + // + // Edit + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(393, 450); + this.Controls.Add(this.label4); + this.Controls.Add(this.label5); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.button1); + this.Controls.Add(this.dateTimePicker1); + this.Controls.Add(this.comboBox4); + this.Controls.Add(this.comboBox3); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.label1); + this.Name = "Edit"; + this.Text = "Edit"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ComboBox comboBox3; + private System.Windows.Forms.ComboBox comboBox4; + private System.Windows.Forms.DateTimePicker dateTimePicker1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + } +} \ No newline at end of file diff --git a/Neshina13/Edit.cs b/Neshina13/Edit.cs new file mode 100644 index 0000000..58d9291 --- /dev/null +++ b/Neshina13/Edit.cs @@ -0,0 +1,152 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Edit : Form + { + private int scheduleId; // ID записи для редактирования + + public Edit(int id) + { + InitializeComponent(); + this.scheduleId = id; + LoadComboBoxes(); + LoadData(); + } + + private void LoadComboBoxes() + { + // Загрузка предметов + string subjQuery = "SELECT StudySubject_Id, StudySubject_name FROM StudySubjects"; + FillComboBox(comboBox1, subjQuery, "StudySubject_name", "StudySubject_Id"); + + // Загрузка групп + string groupQuery = "SELECT Group_Id, CONCAT(GroupNum, ' - ', Group_Special) AS GroupInfo FROM `Group`"; + FillComboBox(comboBox2, groupQuery, "GroupInfo", "Group_Id"); + + // Загрузка преподавателей + string teacherQuery = "SELECT Teacher_Id, CONCAT(Teacher_FirstName, ' ', Teacher_LastName, ' ', Teacher_MiddleName) AS TeacherName FROM Teacher"; + FillComboBox(comboBox3, teacherQuery, "TeacherName", "Teacher_Id"); + + // Загрузка ответственных (менеджеров) + string managerQuery = "SELECT Manger_Id, CONCAT(Manager_FirstName, ' ', Manager_LastName, ' ', Manager_MiddleName) AS ManagerName FROM Mangers"; + FillComboBox(comboBox4, managerQuery, "ManagerName", "Manger_Id"); + } + + private void FillComboBox(ComboBox comboBox, string query, string displayMember, string valueMember) + { + try + { + var conn = DB.GetInstance().GetConnection(); + using (var adapter = new MySqlDataAdapter(query, conn)) + { + var table = new DataTable(); + adapter.Fill(table); + comboBox.DataSource = table; + comboBox.DisplayMember = displayMember; + comboBox.ValueMember = valueMember; + comboBox.SelectedIndex = -1; + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных: " + ex.Message); + } + } + + private void LoadData() + { + string query = @" + SELECT + Schedule_StudySubject_Id, + Schedule_Group_Id, + Schedule_Teacher_Id, + Schedule_ResponsiblMmanager, + Schedule_Date + FROM Schedule + WHERE Schedule_Id = @id"; + + try + { + var conn = DB.GetInstance().GetConnection(); + using (var cmd = new MySqlCommand(query, conn)) + { + cmd.Parameters.AddWithValue("@id", scheduleId); + + using (var reader = cmd.ExecuteReader()) + { + if (reader.Read()) + { + // Устанавливаем значения в комбобоксы и дату + comboBox1.SelectedValue = reader["Schedule_StudySubject_Id"]; + comboBox2.SelectedValue = reader["Schedule_Group_Id"]; + comboBox3.SelectedValue = reader["Schedule_Teacher_Id"]; + comboBox4.SelectedValue = reader["Schedule_ResponsiblMmanager"]; + dateTimePicker1.Value = Convert.ToDateTime(reader["Schedule_Date"]); + } + else + { + MessageBox.Show("Запись не найдена."); + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + } + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных для редактирования: " + ex.Message); + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + } + + private void button1_Click(object sender, EventArgs e) + { + + + try + { + var conn = DB.GetInstance().GetConnection(); + string updateQuery = @" + UPDATE Schedule SET + Schedule_StudySubject_Id = @subjectId, + Schedule_Group_Id = @groupId, + Schedule_Teacher_Id = @teacherId, + Schedule_ResponsiblMmanager = @managerId, + Schedule_Date = @date + WHERE Schedule_Id = @scheduleId"; + + using (var cmd = new MySqlCommand(updateQuery, conn)) + { + cmd.Parameters.AddWithValue("@subjectId", comboBox1.SelectedValue); + cmd.Parameters.AddWithValue("@groupId", comboBox2.SelectedValue); + cmd.Parameters.AddWithValue("@teacherId", comboBox3.SelectedValue); + cmd.Parameters.AddWithValue("@managerId", comboBox4.SelectedValue); + cmd.Parameters.AddWithValue("@date", dateTimePicker1.Value.Date); + cmd.Parameters.AddWithValue("@scheduleId", scheduleId); + + cmd.ExecuteNonQuery(); + } + + MessageBox.Show("Запись успешно обновлена!"); + this.DialogResult = DialogResult.OK; + this.Close(); + } + catch (Exception ex) + { + MessageBox.Show("Ошибка при сохранении изменений: " + ex.Message); + } + } + } +} diff --git a/Neshina13/Edit.resx b/Neshina13/Edit.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Edit.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Form1.Designer.cs b/Neshina13/Form1.Designer.cs new file mode 100644 index 0000000..18fdea9 --- /dev/null +++ b/Neshina13/Form1.Designer.cs @@ -0,0 +1,131 @@ +namespace Neshina13 +{ + partial class Form1 + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.label4 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label1.Location = new System.Drawing.Point(75, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(240, 39); + this.label1.TabIndex = 0; + this.label1.Text = "Авторизация"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(46, 112); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(38, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Логин"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(46, 174); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Пароль"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(49, 128); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(266, 20); + this.textBox1.TabIndex = 3; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(49, 191); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(266, 20); + this.textBox2.TabIndex = 4; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(143, 270); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Войти"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(305, 317); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(51, 13); + this.label4.TabIndex = 6; + this.label4.Text = "13 билет"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(368, 339); + this.Controls.Add(this.label4); + this.Controls.Add(this.button1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label4; + } +} + diff --git a/Neshina13/Form1.cs b/Neshina13/Form1.cs new file mode 100644 index 0000000..4d3a95c --- /dev/null +++ b/Neshina13/Form1.cs @@ -0,0 +1,62 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + string login = textBox1.Text; + string password = textBox2.Text; + try + { + var db = DB.GetInstance(); + var connection = db.GetConnection(); + string query = "select count(*) from Mangers where Manager_Login = @login AND Manager_Password = @password"; + using (var cmd = new MySqlCommand(query, connection)) + { + cmd.Parameters.AddWithValue("@login", login); + cmd.Parameters.AddWithValue("@password", password); + + var result = cmd.ExecuteScalar(); + + if (result != null) + { + MessageBox.Show("Вход выполнен!"); + Form2 form2 = new Form2(); + form2.Show(); + this.Hide(); // или Close(), если хотите закрыть форму + } + else + { + MessageBox.Show("Неверный логин или пароль"); + } + } + + } + catch (Exception ex) + { + MessageBox.Show("Ошибка: " + ex.Message); + } + + + + + } + } +} diff --git a/Neshina13/Form1.resx b/Neshina13/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Form2.Designer.cs b/Neshina13/Form2.Designer.cs new file mode 100644 index 0000000..dde023b --- /dev/null +++ b/Neshina13/Form2.Designer.cs @@ -0,0 +1,142 @@ +namespace Neshina13 +{ + partial class Form2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.comboBoxSort = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.AllowUserToAddRows = false; + this.dataGridView1.AllowUserToDeleteRows = false; + this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(24, 36); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.ReadOnly = true; + this.dataGridView1.Size = new System.Drawing.Size(468, 278); + this.dataGridView1.TabIndex = 0; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(509, 36); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Добавить"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(509, 66); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(151, 23); + this.button2.TabIndex = 2; + this.button2.Text = "Редактировать"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(509, 96); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 3; + this.button3.Text = "Удалить"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button4 + // + this.button4.Location = new System.Drawing.Point(24, 415); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 4; + this.button4.Text = "Назад"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // comboBoxSort + // + this.comboBoxSort.FormattingEnabled = true; + this.comboBoxSort.Location = new System.Drawing.Point(509, 171); + this.comboBoxSort.Name = "comboBoxSort"; + this.comboBoxSort.Size = new System.Drawing.Size(259, 21); + this.comboBoxSort.TabIndex = 5; + this.comboBoxSort.SelectedIndexChanged += new System.EventHandler(this.comboBoxSort_SelectedIndexChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(509, 152); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(67, 13); + this.label1.TabIndex = 6; + this.label1.Text = "Сортировка"; + // + // Form2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.label1); + this.Controls.Add(this.comboBoxSort); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.dataGridView1); + this.Name = "Form2"; + this.Text = "Form2"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.ComboBox comboBoxSort; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/Neshina13/Form2.cs b/Neshina13/Form2.cs new file mode 100644 index 0000000..b5eb3a2 --- /dev/null +++ b/Neshina13/Form2.cs @@ -0,0 +1,184 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.Remoting.Metadata; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Form2 : Form + { + public Form2() + { + InitializeComponent(); + LoadSchedule(); + // Заполняем ComboBox вариантами сортировки + comboBoxSort.Items.Clear(); + comboBoxSort.Items.Add("По дате (новые сверху)"); + comboBoxSort.Items.Add("По дате (старые сверху)"); + comboBoxSort.Items.Add("По алфавиту (предмет)"); + comboBoxSort.SelectedIndex = 0; // По умолчанию — новые сверху + + + } + + public class SortOption + { + public string DisplayName { get; } + public string OrderByColumn { get; } + + public SortOption(string displayName, string orderByColumn) + { + DisplayName = displayName; + OrderByColumn = orderByColumn; + } + } + private void LoadSchedule(string orderByClause = "s.Schedule_Date DESC") + { + string query = $@" + SELECT + s.Schedule_Id, + subj.StudySubject_name AS Предмет, + g.GroupNum AS Группа, + t.Teacher_LastName AS Преподаватель, + m.Manager_LastName AS Ответственный, + s.Schedule_Date AS Дата + FROM Schedule s + JOIN StudySubjects subj ON s.Schedule_StudySubject_Id = subj.StudySubject_Id + JOIN `Group` g ON s.Schedule_Group_Id = g.Group_Id + JOIN Teacher t ON s.Schedule_Teacher_Id = t.Teacher_Id + JOIN Mangers m ON s.Schedule_ResponsiblMmanager = m.Manger_Id + ORDER BY {orderByClause}"; + + try + { + var conn = DB.GetInstance().GetConnection(); + using (var adapter = new MySqlDataAdapter(query, conn)) + { + var table = new DataTable(); + adapter.Fill(table); + dataGridView1.DataSource = table; + + // Скрыть ID, если нужно + if (dataGridView1.Columns.Contains("Schedule_Id")) + dataGridView1.Columns["Schedule_Id"].Visible = false; + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки расписания: " + ex.Message); + } + } + + + private void button1_Click(object sender, EventArgs e) + { + var addForm = new Add(); + if (addForm.ShowDialog() == DialogResult.OK) + { + // Обновляем таблицу только если запись успешно добавлена + LoadSchedule(); + } + + } + + private void button4_Click(object sender, EventArgs e) + { + Form1 form1 = new Form1(); + form1.Show(); + this.Hide(); + } + + private void button2_Click(object sender, EventArgs e) + { + if (dataGridView1.SelectedRows.Count == 0) + { + MessageBox.Show("Выберите строку для редактирования."); + return; + } + + // Получаем ID из первой колонки (предполагается, что Schedule_Id — первый столбец) + var selectedRow = dataGridView1.SelectedRows[0]; + int scheduleId = Convert.ToInt32(selectedRow.Cells[0].Value); // если Schedule_Id — 0-й столбец + + var editForm = new Edit(scheduleId); + if (editForm.ShowDialog() == DialogResult.OK) + { + LoadSchedule(); // Обновляем таблицу после успешного редактирования + } + } + + private void button3_Click(object sender, EventArgs e) + { + if (dataGridView1.SelectedRows.Count == 0) + { + MessageBox.Show("Пожалуйста, выберите строку для удаления.", "Удаление", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + var selectedRow = dataGridView1.SelectedRows[0]; + if (!int.TryParse(selectedRow.Cells[0].Value?.ToString(), out int scheduleId)) + { + MessageBox.Show("Не удалось определить ID записи."); + return; + } + var confirmResult = MessageBox.Show( + "Вы уверены, что хотите удалить эту запись?", + "Подтверждение удаления", + MessageBoxButtons.YesNo, + MessageBoxIcon.Question + ); + if (confirmResult != DialogResult.Yes) + return; + try + { + var conn = DB.GetInstance().GetConnection(); + string deleteQuery = "DELETE FROM Schedule WHERE Schedule_Id = @id"; + using (var cmd = new MySqlCommand(deleteQuery, conn)) + { + cmd.Parameters.AddWithValue("@id", scheduleId); + int rowsAffected = cmd.ExecuteNonQuery(); + if (rowsAffected > 0) + { + MessageBox.Show("Запись успешно удалена.", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + LoadSchedule(); // Обновляем таблицу + } + else + { + MessageBox.Show("Запись не найдена или уже удалена.", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка при удалении записи: " + ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void comboBoxSort_SelectedIndexChanged(object sender, EventArgs e) + { + string orderBy = "s.Schedule_Date DESC"; + + switch (comboBoxSort.SelectedItem?.ToString()) + { + case "По дате (новые сверху)": + orderBy = "s.Schedule_Date DESC"; + break; + case "По дате (старые сверху)": + orderBy = "s.Schedule_Date ASC"; + break; + case "По алфавиту (предмет)": + orderBy = "subj.StudySubject_name ASC"; + break; + } + + LoadSchedule(orderBy); + } + } +} diff --git a/Neshina13/Form2.resx b/Neshina13/Form2.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Form2.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Neshina13.csproj b/Neshina13/Neshina13.csproj new file mode 100644 index 0000000..aa1ec13 --- /dev/null +++ b/Neshina13/Neshina13.csproj @@ -0,0 +1,114 @@ + + + + + Debug + AnyCPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C} + WinExe + Neshina13 + Neshina13 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\Desktop\MySql.Data.dll + + + + + + + + + + + + + + + + Form + + + Add.cs + + + + Form + + + Edit.cs + + + Form + + + Form1.cs + + + Form + + + Form2.cs + + + + + Add.cs + + + Edit.cs + + + Form1.cs + + + Form2.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/Neshina13/Neshina13.sln b/Neshina13/Neshina13.sln new file mode 100644 index 0000000..141ae82 --- /dev/null +++ b/Neshina13/Neshina13.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34511.84 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neshina13", "Neshina13\Neshina13.csproj", "{D090A003-F1CB-4B85-BA5D-D60A7D63876C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CFFE3195-F7D4-47FF-B17C-409BAB70E854} + EndGlobalSection +EndGlobal diff --git a/Neshina13/Neshina13/Add.Designer.cs b/Neshina13/Neshina13/Add.Designer.cs new file mode 100644 index 0000000..8963ea7 --- /dev/null +++ b/Neshina13/Neshina13/Add.Designer.cs @@ -0,0 +1,128 @@ +namespace Neshina13 +{ + partial class Add + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.comboBox4 = new System.Windows.Forms.ComboBox(); + this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(98, 415); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(152, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Добавить"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label1.Location = new System.Drawing.Point(70, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(228, 39); + this.label1.TabIndex = 1; + this.label1.Text = "Добавление"; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(52, 123); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(261, 21); + this.comboBox1.TabIndex = 2; + // + // comboBox2 + // + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(52, 180); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(261, 21); + this.comboBox2.TabIndex = 3; + // + // comboBox3 + // + this.comboBox3.FormattingEnabled = true; + this.comboBox3.Location = new System.Drawing.Point(52, 236); + this.comboBox3.Name = "comboBox3"; + this.comboBox3.Size = new System.Drawing.Size(261, 21); + this.comboBox3.TabIndex = 4; + // + // comboBox4 + // + this.comboBox4.FormattingEnabled = true; + this.comboBox4.Location = new System.Drawing.Point(52, 296); + this.comboBox4.Name = "comboBox4"; + this.comboBox4.Size = new System.Drawing.Size(261, 21); + this.comboBox4.TabIndex = 5; + // + // dateTimePicker1 + // + this.dateTimePicker1.Location = new System.Drawing.Point(52, 351); + this.dateTimePicker1.Name = "dateTimePicker1"; + this.dateTimePicker1.Size = new System.Drawing.Size(261, 20); + this.dateTimePicker1.TabIndex = 6; + // + // Add + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(370, 450); + this.Controls.Add(this.dateTimePicker1); + this.Controls.Add(this.comboBox4); + this.Controls.Add(this.comboBox3); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.label1); + this.Controls.Add(this.button1); + this.Name = "Add"; + this.Text = "Add"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ComboBox comboBox3; + private System.Windows.Forms.ComboBox comboBox4; + private System.Windows.Forms.DateTimePicker dateTimePicker1; + } +} \ No newline at end of file diff --git a/Neshina13/Neshina13/Add.cs b/Neshina13/Neshina13/Add.cs new file mode 100644 index 0000000..8ea34d0 --- /dev/null +++ b/Neshina13/Neshina13/Add.cs @@ -0,0 +1,121 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Add : Form + { + public Add() + { + InitializeComponent(); + LoadComboBoxes(); + + } + + private void LoadComboBoxes() + { + // Загрузка предметов + string subjQuery = "SELECT StudySubject_Id, StudySubject_name FROM StudySubjects"; + FillComboBox(comboBox1, subjQuery, "StudySubject_name", "StudySubject_Id"); + + // Загрузка групп + string groupQuery = "SELECT Group_Id, CONCAT(GroupNum, ' - ', Group_Special) AS GroupInfo FROM `Group`"; + FillComboBox(comboBox2, groupQuery, "GroupInfo", "Group_Id"); + + // Загрузка преподавателей + string teacherQuery = "SELECT Teacher_Id, CONCAT(Teacher_FirstName, ' ', Teacher_LastName, ' ', Teacher_MiddleName) AS TeacherName FROM Teacher"; + FillComboBox(comboBox3, teacherQuery, "TeacherName", "Teacher_Id"); + + // Загрузка ответственных (менеджеров) + string managerQuery = "SELECT Manger_Id, CONCAT(Manager_FirstName, ' ', Manager_LastName, ' ', Manager_MiddleName) AS ManagerName FROM Mangers"; + FillComboBox(comboBox4, managerQuery, "ManagerName", "Manger_Id"); + } + + private void FillComboBox(ComboBox comboBox, string query, string displayMember, string valueMember) + { + try + { + var conn = DB.GetInstance().GetConnection(); + using (var adapter = new MySqlDataAdapter(query, conn)) + { + var table = new DataTable(); + adapter.Fill(table); + comboBox.DataSource = table; + comboBox.DisplayMember = displayMember; + comboBox.ValueMember = valueMember; + comboBox.SelectedIndex = -1; // Ничего не выбрано по умолчанию + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных: " + ex.Message); + } + } + + + private void button1_Click(object sender, EventArgs e) + { + + // Проверка, что все обязательные поля выбраны + if (comboBox1.SelectedValue == null || + comboBox2.SelectedValue == null || + comboBox3.SelectedValue == null || + comboBox4.SelectedValue == null) + { + MessageBox.Show("Пожалуйста, заполните все поля."); + return; + } + + try + { + var conn = DB.GetInstance().GetConnection(); + + string insertQuery = @" + INSERT INTO Schedule ( + Schedule_StudySubject_Id, + Schedule_Group_Id, + Schedule_Teacher_Id, + Schedule_ResponsiblMmanager, + Schedule_Date + ) VALUES ( + @subjectId, + @groupId, + @teacherId, + @managerId, + @date + );"; + + using (var cmd = new MySqlCommand(insertQuery, conn)) + { + cmd.Parameters.AddWithValue("@subjectId", comboBox1.SelectedValue); + cmd.Parameters.AddWithValue("@groupId", comboBox2.SelectedValue); + cmd.Parameters.AddWithValue("@teacherId", comboBox3.SelectedValue); + cmd.Parameters.AddWithValue("@managerId", comboBox4.SelectedValue); + cmd.Parameters.AddWithValue("@date", dateTimePicker1.Value.Date); + + cmd.ExecuteNonQuery(); + } + + MessageBox.Show("Запись успешно добавлена!"); + this.DialogResult = DialogResult.OK; + this.Close(); + } + catch (Exception ex) + { + MessageBox.Show("Ошибка при добавлении записи: " + ex.Message); + } + } + } +} + + diff --git a/Neshina13/Neshina13/Add.resx b/Neshina13/Neshina13/Add.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Neshina13/Add.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Neshina13/App.config b/Neshina13/Neshina13/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/Neshina13/Neshina13/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Neshina13/Neshina13/DB.cs b/Neshina13/Neshina13/DB.cs new file mode 100644 index 0000000..8126657 --- /dev/null +++ b/Neshina13/Neshina13/DB.cs @@ -0,0 +1,36 @@ +using MySql.Data.MySqlClient; +using System.Data; +using System.Data.SqlClient; + +namespace NeshinaPolina07_11 +{ + internal class DB + { + private static DB instance; + private MySqlConnection connection; + + private readonly string connectionString = + "server=192.168.201.207;port=3306;username=ISP41_Neshina;password=ISP41_Neshina;database=ISP41_Neshina_13;SslMode=none;Charset=utf8mb4"; + + private DB() + { + connection = new MySqlConnection(connectionString); + OpenConnection(); + } + + public static DB GetInstance() + { + if (instance == null) + instance = new DB(); + return instance; + } + + public void OpenConnection() + { + if (connection.State == ConnectionState.Closed) + connection.Open(); + } + + public MySqlConnection GetConnection() => connection; + } +} \ No newline at end of file diff --git a/Neshina13/Neshina13/Edit.Designer.cs b/Neshina13/Neshina13/Edit.Designer.cs new file mode 100644 index 0000000..34bcc7a --- /dev/null +++ b/Neshina13/Neshina13/Edit.Designer.cs @@ -0,0 +1,128 @@ +namespace Neshina13 +{ + partial class Edit + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.comboBox4 = new System.Windows.Forms.ComboBox(); + this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label1.Location = new System.Drawing.Point(47, 29); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(279, 39); + this.label1.TabIndex = 0; + this.label1.Text = "Редактрование"; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(54, 129); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(272, 21); + this.comboBox1.TabIndex = 1; + // + // comboBox2 + // + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Location = new System.Drawing.Point(54, 183); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(272, 21); + this.comboBox2.TabIndex = 2; + // + // comboBox3 + // + this.comboBox3.FormattingEnabled = true; + this.comboBox3.Location = new System.Drawing.Point(54, 235); + this.comboBox3.Name = "comboBox3"; + this.comboBox3.Size = new System.Drawing.Size(272, 21); + this.comboBox3.TabIndex = 3; + // + // comboBox4 + // + this.comboBox4.FormattingEnabled = true; + this.comboBox4.Location = new System.Drawing.Point(54, 286); + this.comboBox4.Name = "comboBox4"; + this.comboBox4.Size = new System.Drawing.Size(272, 21); + this.comboBox4.TabIndex = 4; + // + // dateTimePicker1 + // + this.dateTimePicker1.Location = new System.Drawing.Point(54, 342); + this.dateTimePicker1.Name = "dateTimePicker1"; + this.dateTimePicker1.Size = new System.Drawing.Size(272, 20); + this.dateTimePicker1.TabIndex = 5; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(114, 397); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(156, 23); + this.button1.TabIndex = 6; + this.button1.Text = "Сохранить"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // Edit + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(393, 450); + this.Controls.Add(this.button1); + this.Controls.Add(this.dateTimePicker1); + this.Controls.Add(this.comboBox4); + this.Controls.Add(this.comboBox3); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.label1); + this.Name = "Edit"; + this.Text = "Edit"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ComboBox comboBox3; + private System.Windows.Forms.ComboBox comboBox4; + private System.Windows.Forms.DateTimePicker dateTimePicker1; + private System.Windows.Forms.Button button1; + } +} \ No newline at end of file diff --git a/Neshina13/Neshina13/Edit.cs b/Neshina13/Neshina13/Edit.cs new file mode 100644 index 0000000..58d9291 --- /dev/null +++ b/Neshina13/Neshina13/Edit.cs @@ -0,0 +1,152 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Edit : Form + { + private int scheduleId; // ID записи для редактирования + + public Edit(int id) + { + InitializeComponent(); + this.scheduleId = id; + LoadComboBoxes(); + LoadData(); + } + + private void LoadComboBoxes() + { + // Загрузка предметов + string subjQuery = "SELECT StudySubject_Id, StudySubject_name FROM StudySubjects"; + FillComboBox(comboBox1, subjQuery, "StudySubject_name", "StudySubject_Id"); + + // Загрузка групп + string groupQuery = "SELECT Group_Id, CONCAT(GroupNum, ' - ', Group_Special) AS GroupInfo FROM `Group`"; + FillComboBox(comboBox2, groupQuery, "GroupInfo", "Group_Id"); + + // Загрузка преподавателей + string teacherQuery = "SELECT Teacher_Id, CONCAT(Teacher_FirstName, ' ', Teacher_LastName, ' ', Teacher_MiddleName) AS TeacherName FROM Teacher"; + FillComboBox(comboBox3, teacherQuery, "TeacherName", "Teacher_Id"); + + // Загрузка ответственных (менеджеров) + string managerQuery = "SELECT Manger_Id, CONCAT(Manager_FirstName, ' ', Manager_LastName, ' ', Manager_MiddleName) AS ManagerName FROM Mangers"; + FillComboBox(comboBox4, managerQuery, "ManagerName", "Manger_Id"); + } + + private void FillComboBox(ComboBox comboBox, string query, string displayMember, string valueMember) + { + try + { + var conn = DB.GetInstance().GetConnection(); + using (var adapter = new MySqlDataAdapter(query, conn)) + { + var table = new DataTable(); + adapter.Fill(table); + comboBox.DataSource = table; + comboBox.DisplayMember = displayMember; + comboBox.ValueMember = valueMember; + comboBox.SelectedIndex = -1; + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных: " + ex.Message); + } + } + + private void LoadData() + { + string query = @" + SELECT + Schedule_StudySubject_Id, + Schedule_Group_Id, + Schedule_Teacher_Id, + Schedule_ResponsiblMmanager, + Schedule_Date + FROM Schedule + WHERE Schedule_Id = @id"; + + try + { + var conn = DB.GetInstance().GetConnection(); + using (var cmd = new MySqlCommand(query, conn)) + { + cmd.Parameters.AddWithValue("@id", scheduleId); + + using (var reader = cmd.ExecuteReader()) + { + if (reader.Read()) + { + // Устанавливаем значения в комбобоксы и дату + comboBox1.SelectedValue = reader["Schedule_StudySubject_Id"]; + comboBox2.SelectedValue = reader["Schedule_Group_Id"]; + comboBox3.SelectedValue = reader["Schedule_Teacher_Id"]; + comboBox4.SelectedValue = reader["Schedule_ResponsiblMmanager"]; + dateTimePicker1.Value = Convert.ToDateTime(reader["Schedule_Date"]); + } + else + { + MessageBox.Show("Запись не найдена."); + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + } + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных для редактирования: " + ex.Message); + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + } + + private void button1_Click(object sender, EventArgs e) + { + + + try + { + var conn = DB.GetInstance().GetConnection(); + string updateQuery = @" + UPDATE Schedule SET + Schedule_StudySubject_Id = @subjectId, + Schedule_Group_Id = @groupId, + Schedule_Teacher_Id = @teacherId, + Schedule_ResponsiblMmanager = @managerId, + Schedule_Date = @date + WHERE Schedule_Id = @scheduleId"; + + using (var cmd = new MySqlCommand(updateQuery, conn)) + { + cmd.Parameters.AddWithValue("@subjectId", comboBox1.SelectedValue); + cmd.Parameters.AddWithValue("@groupId", comboBox2.SelectedValue); + cmd.Parameters.AddWithValue("@teacherId", comboBox3.SelectedValue); + cmd.Parameters.AddWithValue("@managerId", comboBox4.SelectedValue); + cmd.Parameters.AddWithValue("@date", dateTimePicker1.Value.Date); + cmd.Parameters.AddWithValue("@scheduleId", scheduleId); + + cmd.ExecuteNonQuery(); + } + + MessageBox.Show("Запись успешно обновлена!"); + this.DialogResult = DialogResult.OK; + this.Close(); + } + catch (Exception ex) + { + MessageBox.Show("Ошибка при сохранении изменений: " + ex.Message); + } + } + } +} diff --git a/Neshina13/Neshina13/Edit.resx b/Neshina13/Neshina13/Edit.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Neshina13/Edit.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Neshina13/Form1.Designer.cs b/Neshina13/Neshina13/Form1.Designer.cs new file mode 100644 index 0000000..18fdea9 --- /dev/null +++ b/Neshina13/Neshina13/Form1.Designer.cs @@ -0,0 +1,131 @@ +namespace Neshina13 +{ + partial class Form1 + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.label4 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label1.Location = new System.Drawing.Point(75, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(240, 39); + this.label1.TabIndex = 0; + this.label1.Text = "Авторизация"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(46, 112); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(38, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Логин"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(46, 174); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Пароль"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(49, 128); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(266, 20); + this.textBox1.TabIndex = 3; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(49, 191); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(266, 20); + this.textBox2.TabIndex = 4; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(143, 270); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Войти"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(305, 317); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(51, 13); + this.label4.TabIndex = 6; + this.label4.Text = "13 билет"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(368, 339); + this.Controls.Add(this.label4); + this.Controls.Add(this.button1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label4; + } +} + diff --git a/Neshina13/Neshina13/Form1.cs b/Neshina13/Neshina13/Form1.cs new file mode 100644 index 0000000..4d3a95c --- /dev/null +++ b/Neshina13/Neshina13/Form1.cs @@ -0,0 +1,62 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + string login = textBox1.Text; + string password = textBox2.Text; + try + { + var db = DB.GetInstance(); + var connection = db.GetConnection(); + string query = "select count(*) from Mangers where Manager_Login = @login AND Manager_Password = @password"; + using (var cmd = new MySqlCommand(query, connection)) + { + cmd.Parameters.AddWithValue("@login", login); + cmd.Parameters.AddWithValue("@password", password); + + var result = cmd.ExecuteScalar(); + + if (result != null) + { + MessageBox.Show("Вход выполнен!"); + Form2 form2 = new Form2(); + form2.Show(); + this.Hide(); // или Close(), если хотите закрыть форму + } + else + { + MessageBox.Show("Неверный логин или пароль"); + } + } + + } + catch (Exception ex) + { + MessageBox.Show("Ошибка: " + ex.Message); + } + + + + + } + } +} diff --git a/Neshina13/Neshina13/Form1.resx b/Neshina13/Neshina13/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Neshina13/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Neshina13/Form2.Designer.cs b/Neshina13/Neshina13/Form2.Designer.cs new file mode 100644 index 0000000..5d00096 --- /dev/null +++ b/Neshina13/Neshina13/Form2.Designer.cs @@ -0,0 +1,129 @@ +namespace Neshina13 +{ + partial class Form2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.comboBoxSort = new System.Windows.Forms.ComboBox(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.AllowUserToAddRows = false; + this.dataGridView1.AllowUserToDeleteRows = false; + this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(24, 36); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.ReadOnly = true; + this.dataGridView1.Size = new System.Drawing.Size(468, 278); + this.dataGridView1.TabIndex = 0; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(509, 36); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Добавить"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(509, 66); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(151, 23); + this.button2.TabIndex = 2; + this.button2.Text = "Редактировать"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(509, 96); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 3; + this.button3.Text = "Удалить"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button4 + // + this.button4.Location = new System.Drawing.Point(24, 415); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 4; + this.button4.Text = "Назад"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // comboBoxSort + // + this.comboBoxSort.FormattingEnabled = true; + this.comboBoxSort.Location = new System.Drawing.Point(509, 171); + this.comboBoxSort.Name = "comboBoxSort"; + this.comboBoxSort.Size = new System.Drawing.Size(259, 21); + this.comboBoxSort.TabIndex = 5; + this.comboBoxSort.SelectedIndexChanged += new System.EventHandler(this.comboBoxSort_SelectedIndexChanged); + // + // Form2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.comboBoxSort); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.dataGridView1); + this.Name = "Form2"; + this.Text = "Form2"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.ComboBox comboBoxSort; + } +} \ No newline at end of file diff --git a/Neshina13/Neshina13/Form2.cs b/Neshina13/Neshina13/Form2.cs new file mode 100644 index 0000000..b5eb3a2 --- /dev/null +++ b/Neshina13/Neshina13/Form2.cs @@ -0,0 +1,184 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.Remoting.Metadata; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + public partial class Form2 : Form + { + public Form2() + { + InitializeComponent(); + LoadSchedule(); + // Заполняем ComboBox вариантами сортировки + comboBoxSort.Items.Clear(); + comboBoxSort.Items.Add("По дате (новые сверху)"); + comboBoxSort.Items.Add("По дате (старые сверху)"); + comboBoxSort.Items.Add("По алфавиту (предмет)"); + comboBoxSort.SelectedIndex = 0; // По умолчанию — новые сверху + + + } + + public class SortOption + { + public string DisplayName { get; } + public string OrderByColumn { get; } + + public SortOption(string displayName, string orderByColumn) + { + DisplayName = displayName; + OrderByColumn = orderByColumn; + } + } + private void LoadSchedule(string orderByClause = "s.Schedule_Date DESC") + { + string query = $@" + SELECT + s.Schedule_Id, + subj.StudySubject_name AS Предмет, + g.GroupNum AS Группа, + t.Teacher_LastName AS Преподаватель, + m.Manager_LastName AS Ответственный, + s.Schedule_Date AS Дата + FROM Schedule s + JOIN StudySubjects subj ON s.Schedule_StudySubject_Id = subj.StudySubject_Id + JOIN `Group` g ON s.Schedule_Group_Id = g.Group_Id + JOIN Teacher t ON s.Schedule_Teacher_Id = t.Teacher_Id + JOIN Mangers m ON s.Schedule_ResponsiblMmanager = m.Manger_Id + ORDER BY {orderByClause}"; + + try + { + var conn = DB.GetInstance().GetConnection(); + using (var adapter = new MySqlDataAdapter(query, conn)) + { + var table = new DataTable(); + adapter.Fill(table); + dataGridView1.DataSource = table; + + // Скрыть ID, если нужно + if (dataGridView1.Columns.Contains("Schedule_Id")) + dataGridView1.Columns["Schedule_Id"].Visible = false; + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки расписания: " + ex.Message); + } + } + + + private void button1_Click(object sender, EventArgs e) + { + var addForm = new Add(); + if (addForm.ShowDialog() == DialogResult.OK) + { + // Обновляем таблицу только если запись успешно добавлена + LoadSchedule(); + } + + } + + private void button4_Click(object sender, EventArgs e) + { + Form1 form1 = new Form1(); + form1.Show(); + this.Hide(); + } + + private void button2_Click(object sender, EventArgs e) + { + if (dataGridView1.SelectedRows.Count == 0) + { + MessageBox.Show("Выберите строку для редактирования."); + return; + } + + // Получаем ID из первой колонки (предполагается, что Schedule_Id — первый столбец) + var selectedRow = dataGridView1.SelectedRows[0]; + int scheduleId = Convert.ToInt32(selectedRow.Cells[0].Value); // если Schedule_Id — 0-й столбец + + var editForm = new Edit(scheduleId); + if (editForm.ShowDialog() == DialogResult.OK) + { + LoadSchedule(); // Обновляем таблицу после успешного редактирования + } + } + + private void button3_Click(object sender, EventArgs e) + { + if (dataGridView1.SelectedRows.Count == 0) + { + MessageBox.Show("Пожалуйста, выберите строку для удаления.", "Удаление", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + var selectedRow = dataGridView1.SelectedRows[0]; + if (!int.TryParse(selectedRow.Cells[0].Value?.ToString(), out int scheduleId)) + { + MessageBox.Show("Не удалось определить ID записи."); + return; + } + var confirmResult = MessageBox.Show( + "Вы уверены, что хотите удалить эту запись?", + "Подтверждение удаления", + MessageBoxButtons.YesNo, + MessageBoxIcon.Question + ); + if (confirmResult != DialogResult.Yes) + return; + try + { + var conn = DB.GetInstance().GetConnection(); + string deleteQuery = "DELETE FROM Schedule WHERE Schedule_Id = @id"; + using (var cmd = new MySqlCommand(deleteQuery, conn)) + { + cmd.Parameters.AddWithValue("@id", scheduleId); + int rowsAffected = cmd.ExecuteNonQuery(); + if (rowsAffected > 0) + { + MessageBox.Show("Запись успешно удалена.", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + LoadSchedule(); // Обновляем таблицу + } + else + { + MessageBox.Show("Запись не найдена или уже удалена.", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка при удалении записи: " + ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void comboBoxSort_SelectedIndexChanged(object sender, EventArgs e) + { + string orderBy = "s.Schedule_Date DESC"; + + switch (comboBoxSort.SelectedItem?.ToString()) + { + case "По дате (новые сверху)": + orderBy = "s.Schedule_Date DESC"; + break; + case "По дате (старые сверху)": + orderBy = "s.Schedule_Date ASC"; + break; + case "По алфавиту (предмет)": + orderBy = "subj.StudySubject_name ASC"; + break; + } + + LoadSchedule(orderBy); + } + } +} diff --git a/Neshina13/Neshina13/Form2.resx b/Neshina13/Neshina13/Form2.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Neshina13/Neshina13/Form2.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Neshina13/Neshina13.csproj b/Neshina13/Neshina13/Neshina13.csproj new file mode 100644 index 0000000..aa1ec13 --- /dev/null +++ b/Neshina13/Neshina13/Neshina13.csproj @@ -0,0 +1,114 @@ + + + + + Debug + AnyCPU + {D090A003-F1CB-4B85-BA5D-D60A7D63876C} + WinExe + Neshina13 + Neshina13 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\Desktop\MySql.Data.dll + + + + + + + + + + + + + + + + Form + + + Add.cs + + + + Form + + + Edit.cs + + + Form + + + Form1.cs + + + Form + + + Form2.cs + + + + + Add.cs + + + Edit.cs + + + Form1.cs + + + Form2.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/Neshina13/Neshina13/Program.cs b/Neshina13/Neshina13/Program.cs new file mode 100644 index 0000000..5316dff --- /dev/null +++ b/Neshina13/Neshina13/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + internal static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Neshina13/Neshina13/Properties/AssemblyInfo.cs b/Neshina13/Neshina13/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7b20335 --- /dev/null +++ b/Neshina13/Neshina13/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("Neshina13")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Neshina13")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("d090a003-f1cb-4b85-ba5d-d60a7d63876c")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Neshina13/Neshina13/Properties/Resources.Designer.cs b/Neshina13/Neshina13/Properties/Resources.Designer.cs new file mode 100644 index 0000000..cbc0a00 --- /dev/null +++ b/Neshina13/Neshina13/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace Neshina13.Properties +{ + + + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder + // класс с помощью таких средств, как ResGen или Visual Studio. + // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen + // с параметром /str или заново постройте свой VS-проект. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Neshina13.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Переопределяет свойство CurrentUICulture текущего потока для всех + /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Neshina13/Neshina13/Properties/Resources.resx b/Neshina13/Neshina13/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Neshina13/Neshina13/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Neshina13/Properties/Settings.Designer.cs b/Neshina13/Neshina13/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b06169a --- /dev/null +++ b/Neshina13/Neshina13/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Neshina13.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Neshina13/Neshina13/Properties/Settings.settings b/Neshina13/Neshina13/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Neshina13/Neshina13/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Neshina13/Neshina13/bin/Debug/MySql.Data.dll b/Neshina13/Neshina13/bin/Debug/MySql.Data.dll new file mode 100644 index 0000000..a851892 Binary files /dev/null and b/Neshina13/Neshina13/bin/Debug/MySql.Data.dll differ diff --git a/Neshina13/Neshina13/bin/Debug/Neshina13.exe b/Neshina13/Neshina13/bin/Debug/Neshina13.exe new file mode 100644 index 0000000..6a3fff8 Binary files /dev/null and b/Neshina13/Neshina13/bin/Debug/Neshina13.exe differ diff --git a/Neshina13/Neshina13/bin/Debug/Neshina13.exe.config b/Neshina13/Neshina13/bin/Debug/Neshina13.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/Neshina13/Neshina13/bin/Debug/Neshina13.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Neshina13/Neshina13/bin/Debug/Neshina13.pdb b/Neshina13/Neshina13/bin/Debug/Neshina13.pdb new file mode 100644 index 0000000..55da0cf Binary files /dev/null and b/Neshina13/Neshina13/bin/Debug/Neshina13.pdb differ diff --git a/Neshina13/Neshina13/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Neshina13/Neshina13/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/Neshina13/Neshina13/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Neshina13/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Neshina13/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..5d25611 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Neshina13/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Neshina13/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..54d8951 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.Add.resources b/Neshina13/Neshina13/obj/Debug/Neshina13.Add.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.Add.resources differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.Edit.resources b/Neshina13/Neshina13/obj/Debug/Neshina13.Edit.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.Edit.resources differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.Form1.resources b/Neshina13/Neshina13/obj/Debug/Neshina13.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.Form1.resources differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.Form2.resources b/Neshina13/Neshina13/obj/Debug/Neshina13.Form2.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.Form2.resources differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.Properties.Resources.resources b/Neshina13/Neshina13/obj/Debug/Neshina13.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.Properties.Resources.resources differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.AssemblyReference.cache b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.AssemblyReference.cache new file mode 100644 index 0000000..f6f680f Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.AssemblyReference.cache differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.CopyComplete b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.CoreCompileInputs.cache b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..1e5bed7 --- /dev/null +++ b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b1d45ed09e2efc90fed125c224599f4c0e56b591db85a23e5d675c13190460ec diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.FileListAbsolute.txt b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..6129346 --- /dev/null +++ b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\Neshina13.exe.config +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\Neshina13.exe +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\Neshina13.pdb +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\MySql.Data.dll +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.AssemblyReference.cache +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Form1.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Properties.Resources.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.GenerateResource.cache +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.CoreCompileInputs.cache +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.CopyComplete +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.exe +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.pdb +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Add.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Form2.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Edit.resources diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.GenerateResource.cache b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.GenerateResource.cache new file mode 100644 index 0000000..b188ea3 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.csproj.GenerateResource.cache differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.exe b/Neshina13/Neshina13/obj/Debug/Neshina13.exe new file mode 100644 index 0000000..6a3fff8 Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.exe differ diff --git a/Neshina13/Neshina13/obj/Debug/Neshina13.pdb b/Neshina13/Neshina13/obj/Debug/Neshina13.pdb new file mode 100644 index 0000000..55da0cf Binary files /dev/null and b/Neshina13/Neshina13/obj/Debug/Neshina13.pdb differ diff --git a/Neshina13/Neshina13/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Neshina13/Neshina13/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/Neshina13/Neshina13/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Neshina13/Neshina13/obj/Release/Neshina13.csproj.AssemblyReference.cache b/Neshina13/Neshina13/obj/Release/Neshina13.csproj.AssemblyReference.cache new file mode 100644 index 0000000..43b09ba Binary files /dev/null and b/Neshina13/Neshina13/obj/Release/Neshina13.csproj.AssemblyReference.cache differ diff --git a/Neshina13/Program.cs b/Neshina13/Program.cs new file mode 100644 index 0000000..5316dff --- /dev/null +++ b/Neshina13/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Neshina13 +{ + internal static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Neshina13/Properties/AssemblyInfo.cs b/Neshina13/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7b20335 --- /dev/null +++ b/Neshina13/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("Neshina13")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Neshina13")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("d090a003-f1cb-4b85-ba5d-d60a7d63876c")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Neshina13/Properties/Resources.Designer.cs b/Neshina13/Properties/Resources.Designer.cs new file mode 100644 index 0000000..cbc0a00 --- /dev/null +++ b/Neshina13/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace Neshina13.Properties +{ + + + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder + // класс с помощью таких средств, как ResGen или Visual Studio. + // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen + // с параметром /str или заново постройте свой VS-проект. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Neshina13.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Переопределяет свойство CurrentUICulture текущего потока для всех + /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Neshina13/Properties/Resources.resx b/Neshina13/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Neshina13/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Neshina13/Properties/Settings.Designer.cs b/Neshina13/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b06169a --- /dev/null +++ b/Neshina13/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Neshina13.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Neshina13/Properties/Settings.settings b/Neshina13/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Neshina13/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Neshina13/bin/Debug/MySql.Data.dll b/Neshina13/bin/Debug/MySql.Data.dll new file mode 100644 index 0000000..a851892 Binary files /dev/null and b/Neshina13/bin/Debug/MySql.Data.dll differ diff --git a/Neshina13/bin/Debug/Neshina13.exe b/Neshina13/bin/Debug/Neshina13.exe new file mode 100644 index 0000000..7013b21 Binary files /dev/null and b/Neshina13/bin/Debug/Neshina13.exe differ diff --git a/Neshina13/bin/Debug/Neshina13.exe.config b/Neshina13/bin/Debug/Neshina13.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/Neshina13/bin/Debug/Neshina13.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Neshina13/bin/Debug/Neshina13.pdb b/Neshina13/bin/Debug/Neshina13.pdb new file mode 100644 index 0000000..bb5277b Binary files /dev/null and b/Neshina13/bin/Debug/Neshina13.pdb differ diff --git a/Neshina13/desktop.ini b/Neshina13/desktop.ini new file mode 100644 index 0000000..a227434 --- /dev/null +++ b/Neshina13/desktop.ini @@ -0,0 +1,2 @@ +[.ShellClassInfo] +LocalizedResourceName=@Neshina13,0 diff --git a/Neshina13/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Neshina13/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/Neshina13/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..5d25611 Binary files /dev/null and b/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..137b640 Binary files /dev/null and b/Neshina13/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Neshina13/obj/Debug/Neshina13.Add.resources b/Neshina13/obj/Debug/Neshina13.Add.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.Add.resources differ diff --git a/Neshina13/obj/Debug/Neshina13.Edit.resources b/Neshina13/obj/Debug/Neshina13.Edit.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.Edit.resources differ diff --git a/Neshina13/obj/Debug/Neshina13.Form1.resources b/Neshina13/obj/Debug/Neshina13.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.Form1.resources differ diff --git a/Neshina13/obj/Debug/Neshina13.Form2.resources b/Neshina13/obj/Debug/Neshina13.Form2.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.Form2.resources differ diff --git a/Neshina13/obj/Debug/Neshina13.Properties.Resources.resources b/Neshina13/obj/Debug/Neshina13.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.Properties.Resources.resources differ diff --git a/Neshina13/obj/Debug/Neshina13.csproj.AssemblyReference.cache b/Neshina13/obj/Debug/Neshina13.csproj.AssemblyReference.cache new file mode 100644 index 0000000..24d42b7 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.csproj.AssemblyReference.cache differ diff --git a/Neshina13/obj/Debug/Neshina13.csproj.CopyComplete b/Neshina13/obj/Debug/Neshina13.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Neshina13/obj/Debug/Neshina13.csproj.CoreCompileInputs.cache b/Neshina13/obj/Debug/Neshina13.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..3303dec --- /dev/null +++ b/Neshina13/obj/Debug/Neshina13.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c880676d3611bee1e3fe5e4e4e07216d68c9e12cc4e0073868a6145a5b1adb4b diff --git a/Neshina13/obj/Debug/Neshina13.csproj.FileListAbsolute.txt b/Neshina13/obj/Debug/Neshina13.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e3929ee --- /dev/null +++ b/Neshina13/obj/Debug/Neshina13.csproj.FileListAbsolute.txt @@ -0,0 +1,29 @@ +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\Neshina13.exe.config +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\Neshina13.exe +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\Neshina13.pdb +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\bin\Debug\MySql.Data.dll +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.AssemblyReference.cache +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Form1.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Properties.Resources.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.GenerateResource.cache +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.CoreCompileInputs.cache +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.CopyComplete +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.exe +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.pdb +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Add.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Form2.resources +C:\Users\Student\Downloads\Модуль\АвтоМастер\Neshina13\Neshina13\obj\Debug\Neshina13.Edit.resources +C:\Users\Student\Desktop\Neshina13\Neshina13\bin\Debug\Neshina13.exe.config +C:\Users\Student\Desktop\Neshina13\Neshina13\bin\Debug\Neshina13.exe +C:\Users\Student\Desktop\Neshina13\Neshina13\bin\Debug\Neshina13.pdb +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.AssemblyReference.cache +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.Add.resources +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.Edit.resources +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.Form1.resources +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.Form2.resources +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.Properties.Resources.resources +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.GenerateResource.cache +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.CoreCompileInputs.cache +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.csproj.CopyComplete +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.exe +C:\Users\Student\Desktop\Neshina13\Neshina13\obj\Debug\Neshina13.pdb diff --git a/Neshina13/obj/Debug/Neshina13.csproj.GenerateResource.cache b/Neshina13/obj/Debug/Neshina13.csproj.GenerateResource.cache new file mode 100644 index 0000000..b188ea3 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.csproj.GenerateResource.cache differ diff --git a/Neshina13/obj/Debug/Neshina13.exe b/Neshina13/obj/Debug/Neshina13.exe new file mode 100644 index 0000000..7013b21 Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.exe differ diff --git a/Neshina13/obj/Debug/Neshina13.pdb b/Neshina13/obj/Debug/Neshina13.pdb new file mode 100644 index 0000000..bb5277b Binary files /dev/null and b/Neshina13/obj/Debug/Neshina13.pdb differ diff --git a/Neshina13/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Neshina13/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/Neshina13/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Neshina13/obj/Release/Neshina13.csproj.AssemblyReference.cache b/Neshina13/obj/Release/Neshina13.csproj.AssemblyReference.cache new file mode 100644 index 0000000..43b09ba Binary files /dev/null and b/Neshina13/obj/Release/Neshina13.csproj.AssemblyReference.cache differ diff --git a/desktop.ini b/desktop.ini new file mode 100644 index 0000000..a227434 --- /dev/null +++ b/desktop.ini @@ -0,0 +1,2 @@ +[.ShellClassInfo] +LocalizedResourceName=@Neshina13,0