commit 8a67962db73807043484e3bd35f3759991b74407 Author: a Date: Fri May 15 13:44:57 2026 +0400 first commit diff --git a/.vs/modul/FileContentIndex/3d708126-5061-4f40-b215-2932b76b169f.vsidx b/.vs/modul/FileContentIndex/3d708126-5061-4f40-b215-2932b76b169f.vsidx new file mode 100644 index 0000000..d009f9c Binary files /dev/null and b/.vs/modul/FileContentIndex/3d708126-5061-4f40-b215-2932b76b169f.vsidx differ diff --git a/.vs/modul/FileContentIndex/62e08f3c-95e4-43c2-8cd3-4251bcd2814a.vsidx b/.vs/modul/FileContentIndex/62e08f3c-95e4-43c2-8cd3-4251bcd2814a.vsidx new file mode 100644 index 0000000..3748caf Binary files /dev/null and b/.vs/modul/FileContentIndex/62e08f3c-95e4-43c2-8cd3-4251bcd2814a.vsidx differ diff --git a/.vs/modul/FileContentIndex/9fa812c1-608d-49d8-bfd2-3ab5e6d96402.vsidx b/.vs/modul/FileContentIndex/9fa812c1-608d-49d8-bfd2-3ab5e6d96402.vsidx new file mode 100644 index 0000000..f90bb21 Binary files /dev/null and b/.vs/modul/FileContentIndex/9fa812c1-608d-49d8-bfd2-3ab5e6d96402.vsidx differ diff --git a/.vs/modul/FileContentIndex/dee089c2-c1b2-4d54-bc8a-ed2ffc427ac8.vsidx b/.vs/modul/FileContentIndex/dee089c2-c1b2-4d54-bc8a-ed2ffc427ac8.vsidx new file mode 100644 index 0000000..63339a0 Binary files /dev/null and b/.vs/modul/FileContentIndex/dee089c2-c1b2-4d54-bc8a-ed2ffc427ac8.vsidx differ diff --git a/.vs/modul/v17/.suo b/.vs/modul/v17/.suo new file mode 100644 index 0000000..fd12114 Binary files /dev/null and b/.vs/modul/v17/.suo differ diff --git a/App.config b/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..3d7e0b2 --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,110 @@ +namespace modul +{ + 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.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(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(207)))), ((int)(((byte)(206))))); + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(14, 14); + this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(637, 453); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(111)))), ((int)(((byte)(148))))); + this.button1.Location = new System.Drawing.Point(721, 14); + this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(156, 27); + this.button1.TabIndex = 1; + this.button1.Text = "Добавить"; + this.button1.UseVisualStyleBackColor = false; + // + // button2 + // + this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(111)))), ((int)(((byte)(148))))); + this.button2.Location = new System.Drawing.Point(721, 47); + this.button2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(156, 27); + this.button2.TabIndex = 2; + this.button2.Text = "Редактировать"; + this.button2.UseVisualStyleBackColor = false; + // + // button3 + // + this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(111)))), ((int)(((byte)(148))))); + this.button3.Location = new System.Drawing.Point(721, 285); + this.button3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(156, 27); + this.button3.TabIndex = 3; + this.button3.Text = "Удалить"; + this.button3.UseVisualStyleBackColor = false; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(933, 519); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.dataGridView1); + this.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.Name = "Form1"; + this.Text = "Главная страница"; + this.Load += new System.EventHandler(this.Form1_Load); + ((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; + } +} + diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..f00798f --- /dev/null +++ b/Form1.cs @@ -0,0 +1,44 @@ +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; +using MySql.Data.MySqlClient; + +namespace modul +{ + public partial class Form1 : Form + { + string db = "server=git.pgk.alspio.com; port=3306; username=pozorisp; password=pozorisp; database=pozorisp_Cherkasov"; + public Form1() + { + InitializeComponent(); + LoadData(); + } + + private void Form1_Load(object sender, EventArgs e) + { + + } + + private void LoadData() + { + using(MySqlConnection conn = new MySqlConnection(db)) + { + MySqlDataAdapter adapter = new MySqlDataAdapter("SELECT * FROM materials", conn); + DataTable dataTable = new DataTable(); + adapter.Fill(dataTable); + dataGridView1.DataSource = dataTable; + } + } + + private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + } + } +} diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/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/Form2.Designer.cs b/Form2.Designer.cs new file mode 100644 index 0000000..a17356e --- /dev/null +++ b/Form2.Designer.cs @@ -0,0 +1,115 @@ +namespace modul +{ + 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(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(207)))), ((int)(((byte)(206))))); + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(12, 12); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(497, 416); + this.dataGridView1.TabIndex = 0; + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(111)))), ((int)(((byte)(148))))); + this.button1.Location = new System.Drawing.Point(613, 41); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(122, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Добавить"; + this.button1.UseVisualStyleBackColor = false; + // + // button2 + // + this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(111)))), ((int)(((byte)(148))))); + this.button2.Location = new System.Drawing.Point(613, 70); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(122, 23); + this.button2.TabIndex = 2; + this.button2.Text = "Редактировать"; + this.button2.UseVisualStyleBackColor = false; + // + // button3 + // + this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(111)))), ((int)(((byte)(148))))); + this.button3.Location = new System.Drawing.Point(613, 198); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(122, 23); + this.button3.TabIndex = 3; + this.button3.Text = "Удалить"; + this.button3.UseVisualStyleBackColor = false; + // + // button4 + // + this.button4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(111)))), ((int)(((byte)(148))))); + this.button4.Location = new System.Drawing.Point(713, 405); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 4; + this.button4.Text = "Назад"; + this.button4.UseVisualStyleBackColor = false; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // Form2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(800, 450); + 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 = "Дополнительная информация"; + ((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; + } +} \ No newline at end of file diff --git a/Form2.cs b/Form2.cs new file mode 100644 index 0000000..2233987 --- /dev/null +++ b/Form2.cs @@ -0,0 +1,25 @@ +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 modul +{ + public partial class Form2 : Form + { + public Form2() + { + InitializeComponent(); + } + + private void button4_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/Form2.resx b/Form2.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/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/Program.cs b/Program.cs new file mode 100644 index 0000000..755cd06 --- /dev/null +++ b/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace modul +{ + internal static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..65223c9 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("modul")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("modul")] +[assembly: AssemblyCopyright("Copyright © 2026")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("41f6a8f1-91c3-4f68-814e-302c5e64816a")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0c8518d --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace modul.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("modul.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/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/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/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..f63970a --- /dev/null +++ b/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 modul.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/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/SQL-скрипт.sql b/SQL-скрипт.sql new file mode 100644 index 0000000..7c9b6b1 --- /dev/null +++ b/SQL-скрипт.sql @@ -0,0 +1,218 @@ +-- MySQL dump 10.13 Distrib 8.0.36, for Win64 (x86_64) +-- +-- Host: git.pgk.alspio.com Database: pozorisp_Cherkasov +-- ------------------------------------------------------ +-- Server version 5.7.44 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `materials` +-- + +DROP TABLE IF EXISTS `materials`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `materials` ( + `idmaterials` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, + `type_materials` int(11) NOT NULL, + `price` decimal(10,0) NOT NULL, + `storage` decimal(10,0) NOT NULL, + `minimal` decimal(10,0) NOT NULL, + `package` int(11) NOT NULL, + `unit` int(11) NOT NULL, + PRIMARY KEY (`idmaterials`), + KEY `fk_materials_type_materials_idx` (`type_materials`), + KEY `fk_unit_unit_idx` (`unit`), + CONSTRAINT `fk_materials_type_materials` FOREIGN KEY (`type_materials`) REFERENCES `type_material` (`idtype_material`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_unit_unit` FOREIGN KEY (`unit`) REFERENCES `unit` (`idunit`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `materials` +-- + +LOCK TABLES `materials` WRITE; +/*!40000 ALTER TABLE `materials` DISABLE KEYS */; +INSERT INTO `materials` VALUES (1,'Глина',1,15,1570,5500,30,1),(2,'Каолин',1,18,1030,3500,25,1),(3,'Гидрослюда',1,17,2147,3500,25,1),(4,'Монтмориллонит',1,18,3000,3000,30,1),(5,'Перлит',2,14,150,1000,50,2),(6,'Стекло',2,2,3000,1500,500,1),(7,'Дегидратированная глина',2,22,3000,2500,20,1),(8,'Шамот',2,28,2300,1960,20,1),(9,'Техническая сода',3,55,1200,1500,25,1),(10,'Жидкое стекло',3,77,500,1500,15,1),(11,'Кварц',4,376,1500,2500,10,1),(12,'Полевой шпат',4,16,750,1500,100,1),(13,'Краска-раствор',5,201,1496,2500,5,2),(14,'Порошок цветной',5,84,511,1750,25,1),(15,'Кварцевый песок',2,4,3000,1600,50,1),(16,'Жильный кварц',2,19,2556,1600,25,1),(17,'Барий углекислый',4,304,340,1500,25,1),(18,'Бура техническая',4,126,165,1300,25,1),(19,'Углещелочной реагент',3,3,450,1100,25,1),(20,'Пирофосфат натрия',3,701,356,1200,25,1); +/*!40000 ALTER TABLE `materials` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `product_supplier` +-- + +DROP TABLE IF EXISTS `product_supplier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `product_supplier` ( + `idproduct_supplier` int(11) NOT NULL AUTO_INCREMENT, + `product` int(11) NOT NULL, + `supplier` int(11) NOT NULL, + PRIMARY KEY (`idproduct_supplier`), + KEY `fk_product_product_idx` (`product`), + KEY `fk_supplier_supplier_idx` (`supplier`), + CONSTRAINT `fk_product_product` FOREIGN KEY (`product`) REFERENCES `materials` (`idmaterials`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_supplier_supplier` FOREIGN KEY (`supplier`) REFERENCES `supplier` (`idsupplier`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `product_supplier` +-- + +LOCK TABLES `product_supplier` WRITE; +/*!40000 ALTER TABLE `product_supplier` DISABLE KEYS */; +INSERT INTO `product_supplier` VALUES (1,13,19),(2,2,3),(3,2,9),(4,6,19),(5,15,1),(6,5,6),(7,1,4),(8,15,20),(9,8,9),(10,12,4),(11,1,1),(12,14,19),(13,16,17),(14,12,1),(15,3,9),(16,6,20),(17,12,12),(18,4,9),(19,11,11),(20,17,17),(21,10,12),(22,8,17),(23,1,6),(24,11,15),(25,3,3),(26,5,9),(27,8,19),(28,17,20),(29,18,20),(30,9,18),(31,20,20),(32,3,4),(33,16,15),(34,5,10),(35,15,15),(36,4,4),(37,13,12),(38,6,7),(39,14,12),(40,2,1),(41,10,18),(42,18,7),(43,8,11),(44,18,13),(45,4,3),(46,10,16),(47,10,7),(48,14,16),(49,14,8),(50,19,16),(51,11,14),(52,16,13),(53,13,16),(54,11,13),(55,8,2),(56,15,14),(57,17,7),(58,8,2),(59,8,7),(60,3,5),(61,20,7),(62,5,5),(63,9,7),(64,1,10),(65,9,16),(66,4,10),(67,19,12),(68,9,8),(69,18,2),(70,20,5),(71,16,10),(72,6,2),(73,19,8),(74,17,5),(75,20,8),(76,2,5),(77,8,11),(78,19,5),(79,13,8),(80,12,10); +/*!40000 ALTER TABLE `product_supplier` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `product_type` +-- + +DROP TABLE IF EXISTS `product_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `product_type` ( + `idproduct_type` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, + `procent` double NOT NULL, + PRIMARY KEY (`idproduct_type`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `product_type` +-- + +LOCK TABLES `product_type` WRITE; +/*!40000 ALTER TABLE `product_type` DISABLE KEYS */; +INSERT INTO `product_type` VALUES (1,'Тип продукции 1',1.2),(2,'Тип продукции 2',8.59),(3,'Тип продукции 3',3.45),(4,'Тип продукции 4',5.6); +/*!40000 ALTER TABLE `product_type` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `supplier` +-- + +DROP TABLE IF EXISTS `supplier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `supplier` ( + `idsupplier` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, + `type_supplier` int(11) NOT NULL, + `INN` varchar(11) COLLATE utf8mb4_unicode_ci NOT NULL, + `rating` decimal(2,0) NOT NULL, + `date` date NOT NULL, + PRIMARY KEY (`idsupplier`), + KEY `fk_type_supplier_type_supplier_idx` (`type_supplier`), + CONSTRAINT `fk_type_supplier_type_supplier` FOREIGN KEY (`type_supplier`) REFERENCES `type_supplier` (`idtype_supplier`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `supplier` +-- + +LOCK TABLES `supplier` WRITE; +/*!40000 ALTER TABLE `supplier` DISABLE KEYS */; +INSERT INTO `supplier` VALUES (1,'БрянскСтройресурс',1,'9432455179',8,'2015-12-20'),(2,'Стройкомплект',1,'7803888520',7,'2017-09-13'),(3,'Железногорская руда',2,'8430391035',7,'2016-12-23'),(4,'Белая гора',2,'4318170454',8,'2019-05-27'),(5,'Тульский обрабатывающий завод',2,'7687851800',7,'2015-06-16'),(6,'ГорТехРазработка',3,'6119144874',9,'2021-12-27'),(7,'Сапфир',4,'1122170258',3,'2022-04-10'),(8,'ХимБытСервис',3,'8355114917',5,'2022-03-13'),(9,'ВоронежРудоКомбинат',4,'3532367439',8,'2023-11-11'),(10,'Смоленский добывающий комбинат',4,'2362431140',3,'2018-11-23'),(11,'МосКарьер',3,'4159215346',2,'2012-07-07'),(12,'КурскРесурс',1,'9032455179',4,'2021-07-23'),(13,'Нижегородская разработка',4,'3776671267',9,'2016-05-23'),(14,'Речная долина',4,'7447864518',8,'2015-06-25'),(15,'Карелия добыча',3,'9037040523',6,'2017-03-09'),(16,'Московский ХимЗавод',3,'6221520857',4,'2015-05-07'),(17,'Горная компания',1,'2262431140',3,'2020-12-22'),(18,'Минерал Ресурс',2,'4155215346',7,'2015-05-22'),(19,'Арсенал',1,'3961234561',5,'2010-11-25'),(20,'КамчаткаСтройМинералы',1,'9600275878',7,'2016-12-20'); +/*!40000 ALTER TABLE `supplier` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `type_material` +-- + +DROP TABLE IF EXISTS `type_material`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `type_material` ( + `idtype_material` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, + `procent` double NOT NULL, + PRIMARY KEY (`idtype_material`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `type_material` +-- + +LOCK TABLES `type_material` WRITE; +/*!40000 ALTER TABLE `type_material` DISABLE KEYS */; +INSERT INTO `type_material` VALUES (1,'Пластичные материалы',0.12),(2,'Добавка',0.2),(3,'Электролит',0.15),(4,'Глазурь',0.3),(5,'Пигмент',0.25); +/*!40000 ALTER TABLE `type_material` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `type_supplier` +-- + +DROP TABLE IF EXISTS `type_supplier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `type_supplier` ( + `idtype_supplier` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`idtype_supplier`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `type_supplier` +-- + +LOCK TABLES `type_supplier` WRITE; +/*!40000 ALTER TABLE `type_supplier` DISABLE KEYS */; +INSERT INTO `type_supplier` VALUES (1,'ЗАО'),(2,'ООО'),(3,'ПАО'),(4,'ОАО'); +/*!40000 ALTER TABLE `type_supplier` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `unit` +-- + +DROP TABLE IF EXISTS `unit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `unit` ( + `idunit` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`idunit`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `unit` +-- + +LOCK TABLES `unit` WRITE; +/*!40000 ALTER TABLE `unit` DISABLE KEYS */; +INSERT INTO `unit` VALUES (1,'кг'),(2,'л'); +/*!40000 ALTER TABLE `unit` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2026-05-15 13:13:46 diff --git a/bin/Debug/MySql.Data.dll b/bin/Debug/MySql.Data.dll new file mode 100644 index 0000000..a851892 Binary files /dev/null and b/bin/Debug/MySql.Data.dll differ diff --git a/bin/Debug/modul.exe b/bin/Debug/modul.exe new file mode 100644 index 0000000..6f51e7f Binary files /dev/null and b/bin/Debug/modul.exe differ diff --git a/bin/Debug/modul.exe.config b/bin/Debug/modul.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/bin/Debug/modul.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/Debug/modul.pdb b/bin/Debug/modul.pdb new file mode 100644 index 0000000..c9a7336 Binary files /dev/null and b/bin/Debug/modul.pdb differ diff --git a/er-диаграмма.pdf b/er-диаграмма.pdf new file mode 100644 index 0000000..cebc23d Binary files /dev/null and b/er-диаграмма.pdf differ diff --git a/modul.csproj b/modul.csproj new file mode 100644 index 0000000..f802cd1 --- /dev/null +++ b/modul.csproj @@ -0,0 +1,95 @@ + + + + + Debug + AnyCPU + {41F6A8F1-91C3-4F68-814E-302C5E64816A} + WinExe + modul + modul + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\Downloads\mysql.data\MySql.Data.dll + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + Form + + + Form2.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/modul.sln b/modul.sln new file mode 100644 index 0000000..7b702b3 --- /dev/null +++ b/modul.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}") = "modul", "modul.csproj", "{41F6A8F1-91C3-4F68-814E-302C5E64816A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {41F6A8F1-91C3-4F68-814E-302C5E64816A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41F6A8F1-91C3-4F68-814E-302C5E64816A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41F6A8F1-91C3-4F68-814E-302C5E64816A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41F6A8F1-91C3-4F68-814E-302C5E64816A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5D59E74C-B784-4F31-AD8B-8F40F041DB6B} + EndGlobalSection +EndGlobal diff --git a/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..8b9b776 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..918f8b5 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/modul.Form1.resources b/obj/Debug/modul.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/modul.Form1.resources differ diff --git a/obj/Debug/modul.Form2.resources b/obj/Debug/modul.Form2.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/modul.Form2.resources differ diff --git a/obj/Debug/modul.Properties.Resources.resources b/obj/Debug/modul.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/modul.Properties.Resources.resources differ diff --git a/obj/Debug/modul.csproj.AssemblyReference.cache b/obj/Debug/modul.csproj.AssemblyReference.cache new file mode 100644 index 0000000..4b806d2 Binary files /dev/null and b/obj/Debug/modul.csproj.AssemblyReference.cache differ diff --git a/obj/Debug/modul.csproj.CopyComplete b/obj/Debug/modul.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/obj/Debug/modul.csproj.CoreCompileInputs.cache b/obj/Debug/modul.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..7ecbfd5 --- /dev/null +++ b/obj/Debug/modul.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +5accb3a5cd13af7cd86d9870dc35170758dce4926a46ed1be241817b94afb63d diff --git a/obj/Debug/modul.csproj.FileListAbsolute.txt b/obj/Debug/modul.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e1935c0 --- /dev/null +++ b/obj/Debug/modul.csproj.FileListAbsolute.txt @@ -0,0 +1,13 @@ +C:\Users\Student\ISP31\modul\bin\Debug\modul.exe.config +C:\Users\Student\ISP31\modul\bin\Debug\modul.exe +C:\Users\Student\ISP31\modul\bin\Debug\modul.pdb +C:\Users\Student\ISP31\modul\bin\Debug\MySql.Data.dll +C:\Users\Student\ISP31\modul\obj\Debug\modul.csproj.AssemblyReference.cache +C:\Users\Student\ISP31\modul\obj\Debug\modul.Form1.resources +C:\Users\Student\ISP31\modul\obj\Debug\modul.Form2.resources +C:\Users\Student\ISP31\modul\obj\Debug\modul.Properties.Resources.resources +C:\Users\Student\ISP31\modul\obj\Debug\modul.csproj.GenerateResource.cache +C:\Users\Student\ISP31\modul\obj\Debug\modul.csproj.CoreCompileInputs.cache +C:\Users\Student\ISP31\modul\obj\Debug\modul.csproj.CopyComplete +C:\Users\Student\ISP31\modul\obj\Debug\modul.exe +C:\Users\Student\ISP31\modul\obj\Debug\modul.pdb diff --git a/obj/Debug/modul.csproj.GenerateResource.cache b/obj/Debug/modul.csproj.GenerateResource.cache new file mode 100644 index 0000000..a2fe7cf Binary files /dev/null and b/obj/Debug/modul.csproj.GenerateResource.cache differ diff --git a/obj/Debug/modul.exe b/obj/Debug/modul.exe new file mode 100644 index 0000000..6f51e7f Binary files /dev/null and b/obj/Debug/modul.exe differ diff --git a/obj/Debug/modul.pdb b/obj/Debug/modul.pdb new file mode 100644 index 0000000..c9a7336 Binary files /dev/null and b/obj/Debug/modul.pdb differ