Добавьте файлы проекта.

This commit is contained in:
1 2025-05-24 00:17:02 +04:00
parent 5e98c30221
commit 4f5ee53417
61 changed files with 66969 additions and 0 deletions

25
KursovayaDvornikovAM.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34031.279
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KursovayaDvornikovAM", "KursovayaDvornikovAM\KursovayaDvornikovAM.csproj", "{6FFAC904-7770-48AF-94C3-654CA15482BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6FFAC904-7770-48AF-94C3-654CA15482BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FFAC904-7770-48AF-94C3-654CA15482BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FFAC904-7770-48AF-94C3-654CA15482BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FFAC904-7770-48AF-94C3-654CA15482BD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {34A6B06D-75D5-4440-9DBA-5616AF6AE861}
EndGlobalSection
EndGlobal

211
KursovayaDvornikovAM/Add.Designer.cs generated Normal file
View File

@ -0,0 +1,211 @@
namespace KursovayaDvornikovAM
{
partial class Add
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Add));
this.button1 = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.BackColor = System.Drawing.Color.Lime;
this.button1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);
this.button1.ForeColor = System.Drawing.Color.Black;
this.button1.Location = new System.Drawing.Point(216, 291);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(95, 37);
this.button1.TabIndex = 1;
this.button1.Text = "Добавить";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label7.Location = new System.Drawing.Point(26, 231);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 23);
this.label7.TabIndex = 61;
this.label7.Text = "Склад";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label6.Location = new System.Drawing.Point(26, 205);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(88, 23);
this.label6.TabIndex = 60;
this.label6.Text = "Описание";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(26, 179);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(49, 23);
this.label5.TabIndex = 59;
this.label5.Text = "Цена";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(25, 153);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(90, 23);
this.label4.TabIndex = 58;
this.label4.Text = "Категория";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.Location = new System.Drawing.Point(25, 127);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(83, 23);
this.label3.TabIndex = 57;
this.label3.Text = "Название";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(206, 234);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(242, 20);
this.textBox5.TabIndex = 56;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(206, 208);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(242, 20);
this.textBox4.TabIndex = 55;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(206, 182);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 54;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(206, 156);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 53;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(206, 130);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 52;
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(401, 302);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 62;
this.pictureBox1.TabStop = false;
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(513, 77);
this.label1.TabIndex = 63;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Add
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(513, 407);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Add";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,55 @@
using MySql.Data.MySqlClient;
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 KursovayaDvornikovAM
{
public partial class Add : Form
{
public Add()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string connect = "server=cfif31.ru;user=ISPr24-37_DvornikovAM;database=ISPr24-37_DvornikovAM_Kursovaya;password=ISPr24-37_DvornikovAM";
MySqlConnection connection = new MySqlConnection(connect);
{
connection.Open();
var Nazvanie = textBox1.Text;
var Kategoria = textBox2.Text;
int Cena;
var Opisanie = textBox4.Text;
int Sklad;
if (int.TryParse(textBox3.Text, out Cena) && int.TryParse(textBox5.Text, out Sklad))
{
var add = $"INSERT INTO Tovar (Nazvanie, Kategoria, Cena, Opisanie, Sklad) VALUES ('{Nazvanie}', '{Kategoria}', {Cena}, '{Opisanie}', {Sklad})";
var command = new MySqlCommand(add, connection);
command.ExecuteNonQuery();
MessageBox.Show("Запись успешно создана!", "Успех!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
MessageBox.Show("Пункты ЦЕНА и СКЛАД должны иметь числовой формат!", "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
connection.Close();
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,189 @@
namespace KursovayaDvornikovAM
{
partial class AddProvider
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddProvider));
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label6.Location = new System.Drawing.Point(48, 208);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(176, 23);
this.label6.TabIndex = 66;
this.label6.Text = "Количество поставок";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(48, 182);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(84, 23);
this.label5.TabIndex = 65;
this.label5.Text = "Поставка";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(47, 156);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(116, 23);
this.label4.TabIndex = 64;
this.label4.Text = "Фамилия имя";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(47, 130);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(87, 23);
this.label2.TabIndex = 63;
this.label2.Text = "Компания";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(228, 211);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(242, 20);
this.textBox4.TabIndex = 62;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(228, 185);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 61;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(228, 159);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 60;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(228, 133);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 59;
//
// button1
//
this.button1.BackColor = System.Drawing.Color.Lime;
this.button1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);
this.button1.Location = new System.Drawing.Point(195, 295);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(119, 42);
this.button1.TabIndex = 67;
this.button1.Text = "Добавить";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(412, 346);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 68;
this.pictureBox1.TabStop = false;
//
// label1
//
this.label1.BackColor = System.Drawing.Color.PaleGoldenrod;
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(523, 77);
this.label1.TabIndex = 69;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// AddProvider
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(523, 450);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AddProvider";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,44 @@
using MySql.Data.MySqlClient;
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 KursovayaDvornikovAM
{
public partial class AddProvider : Form
{
public AddProvider()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string connect = "server=cfif31.ru;user=ISPr24-37_DvornikovAM;database=ISPr24-37_DvornikovAM_Kursovaya;password=ISPr24-37_DvornikovAM";
MySqlConnection connection = new MySqlConnection(connect);
{
connection.Open();
var Compania = textBox1.Text;
var Name = textBox2.Text;
var Postavka = textBox3.Text;
var Koli4esnvoPostavok = textBox4.Text;
var add = $"INSERT INTO Postavshik (Compania, Name, Postavka, Koli4esnvoPostavok) VALUES ('{Compania}', '{Name}', {Postavka},{Koli4esnvoPostavok})";
var command = new MySqlCommand(add, connection);
command.ExecuteNonQuery();
connection.Close();
}
}
}
}

File diff suppressed because it is too large Load Diff

165
KursovayaDvornikovAM/AddUser.Designer.cs generated Normal file
View File

@ -0,0 +1,165 @@
namespace KursovayaDvornikovAM
{
partial class AddUser
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddUser));
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.Add = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label6.Location = new System.Drawing.Point(60, 171);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(79, 23);
this.label6.TabIndex = 64;
this.label6.Text = "Фамилия";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(60, 145);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(42, 23);
this.label5.TabIndex = 63;
this.label5.Text = "Имя";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(59, 119);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(70, 23);
this.label4.TabIndex = 62;
this.label4.Text = "Пароль";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(240, 174);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 61;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(240, 148);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 60;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(240, 122);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 59;
//
// Add
//
this.Add.BackColor = System.Drawing.Color.Lime;
this.Add.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);
this.Add.Location = new System.Drawing.Point(221, 279);
this.Add.Name = "Add";
this.Add.Size = new System.Drawing.Size(107, 42);
this.Add.TabIndex = 65;
this.Add.Text = "Добавить";
this.Add.UseVisualStyleBackColor = false;
this.Add.Click += new System.EventHandler(this.Add_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(438, 309);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 66;
this.pictureBox1.TabStop = false;
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(550, 77);
this.label1.TabIndex = 67;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// AddUser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(550, 415);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.Add);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AddUser";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button Add;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,44 @@
using MySql.Data.MySqlClient;
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 static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace KursovayaDvornikovAM
{
public partial class AddUser : Form
{
public AddUser()
{
InitializeComponent();
}
private void Add_Click(object sender, EventArgs e)
{
string connect = "server=cfif31.ru;user=ISPr24-37_DvornikovAM;database=ISPr24-37_DvornikovAM_Kursovaya;password=ISPr24-37_DvornikovAM";
MySqlConnection connection = new MySqlConnection(connect);
{
connection.Open();
var Password = textBox1.Text;
var Name = textBox2.Text;
var Surname = textBox3.Text;
var add = $"INSERT INTO Polzovatel (Password, Name, Surname) VALUES ('{Password}', '{Name}', {Surname})";
var command = new MySqlCommand(add, connection);
command.ExecuteNonQuery();
connection.Close();
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,165 @@
namespace KursovayaDvornikovAM
{
partial class AddWarehouse
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddWarehouse));
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(65, 232);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(49, 23);
this.label5.TabIndex = 65;
this.label5.Text = "Цена";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(64, 206);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(90, 23);
this.label4.TabIndex = 64;
this.label4.Text = "Категория";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(64, 180);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(83, 23);
this.label2.TabIndex = 63;
this.label2.Text = "Название";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(245, 235);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 62;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(245, 209);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 61;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(245, 183);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 60;
//
// button1
//
this.button1.BackColor = System.Drawing.Color.Lime;
this.button1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button1.Location = new System.Drawing.Point(210, 318);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(115, 40);
this.button1.TabIndex = 68;
this.button1.Text = "Добавить";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(434, 367);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 69;
this.pictureBox1.TabStop = false;
//
// label1
//
this.label1.BackColor = System.Drawing.Color.PaleGoldenrod;
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(545, 77);
this.label1.TabIndex = 70;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// AddWarehouse
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(545, 471);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AddWarehouse";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,43 @@
using MySql.Data.MySqlClient;
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 KursovayaDvornikovAM
{
public partial class AddWarehouse : Form
{
public AddWarehouse()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string connect = "server=cfif31.ru;user=ISPr24-37_DvornikovAM;database=ISPr24-37_DvornikovAM_Kursovaya;password=ISPr24-37_DvornikovAM";
MySqlConnection connection = new MySqlConnection(connect);
{
connection.Open();
var Nomer_Sklada = textBox1.Text;
var Adress = textBox2.Text;
var Opisanie = textBox3.Text;
var add = $"INSERT INTO Sklad (Nomer_Sklada, Adress, Opisanie) VALUES ('{Nomer_Sklada}', '{Adress}', {Opisanie})";
var command = new MySqlCommand(add, connection);
command.ExecuteNonQuery();
connection.Close();
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,40 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KursovayaDvornikovAM
{
internal class DBconnection
{
public static DataTable Select(string sql)
{
MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder();
builder.Server = "cfif31.ru";
builder.Port = 3306;
builder.Database = "ISPr24-37_DvornikovAM_Kursovaya";
builder.UserID = "ISPr24-37_DvornikovAM";
builder.Password = "ISPr24-37_DvornikovAM";
MySqlConnection connect = new MySqlConnection(builder.ConnectionString);
try
{
connect.Open();
MySqlCommand command = new MySqlCommand(sql, connect);
MySqlDataReader reader = command.ExecuteReader();
DataTable table = new DataTable();
table.Load(reader);
return table;
}
catch (Exception e)
{
MessageBox.Show("При выполнении запроса произошла ошибка! " + e.Message);
return null;
}
}
}
}

View File

@ -0,0 +1,6 @@
namespace KursovayaDvornikovAM
{
internal class сonnection
{
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -0,0 +1,279 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6FFAC904-7770-48AF-94C3-654CA15482BD}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>KursovayaDvornikovAM</RootNamespace>
<AssemblyName>KursovayaDvornikovAM</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\packages\BouncyCastle.Cryptography.2.2.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf, Version=3.25.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.25.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4, Version=1.3.5.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Compression.LZ4.1.3.5\lib\net462\K4os.Compression.LZ4.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.3.5.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Compression.LZ4.Streams.1.3.5\lib\net462\K4os.Compression.LZ4.Streams.dll</HintPath>
</Reference>
<Reference Include="K4os.Hash.xxHash, Version=1.0.8.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Hash.xxHash.1.0.8\lib\net462\K4os.Hash.xxHash.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=8.4.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.8.4.0\lib\net48\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Configuration.ConfigurationManager.4.4.1\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=7.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.7.0.2\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.IO.Pipelines, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.5.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="ZstdSharp, Version=0.7.1.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
<HintPath>..\packages\ZstdSharp.Port.0.7.1\lib\net461\ZstdSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Add.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Add.Designer.cs">
<DependentUpon>Add.cs</DependentUpon>
</Compile>
<Compile Include="AddProvider.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AddProvider.Designer.cs">
<DependentUpon>AddProvider.cs</DependentUpon>
</Compile>
<Compile Include="AddUser.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AddUser.Designer.cs">
<DependentUpon>AddUser.cs</DependentUpon>
</Compile>
<Compile Include="AddWarehouse.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AddWarehouse.Designer.cs">
<DependentUpon>AddWarehouse.cs</DependentUpon>
</Compile>
<Compile Include="DBсonnection.cs" />
<Compile Include="Maps.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Maps.Designer.cs">
<DependentUpon>Maps.cs</DependentUpon>
</Compile>
<Compile Include="ProviderForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProviderForm.Designer.cs">
<DependentUpon>ProviderForm.cs</DependentUpon>
</Compile>
<Compile Include="DB.cs" />
<Compile Include="LoginForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LoginForm.Designer.cs">
<DependentUpon>LoginForm.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="ProductsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProductsForm.Designer.cs">
<DependentUpon>ProductsForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RegisterForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="RegisterForm.Designer.cs">
<DependentUpon>RegisterForm.cs</DependentUpon>
</Compile>
<Compile Include="UserForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UserForm.Designer.cs">
<DependentUpon>UserForm.cs</DependentUpon>
</Compile>
<Compile Include="WarehouseForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WarehouseForm.Designer.cs">
<DependentUpon>WarehouseForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="Add.resx">
<DependentUpon>Add.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AddProvider.resx">
<DependentUpon>AddProvider.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AddUser.resx">
<DependentUpon>AddUser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AddWarehouse.resx">
<DependentUpon>AddWarehouse.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Maps.resx">
<DependentUpon>Maps.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ProviderForm.resx">
<DependentUpon>ProviderForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LoginForm.resx">
<DependentUpon>LoginForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ProductsForm.resx">
<DependentUpon>ProductsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="RegisterForm.resx">
<DependentUpon>RegisterForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserForm.resx">
<DependentUpon>UserForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WarehouseForm.resx">
<DependentUpon>WarehouseForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Images\lock.png" />
</ItemGroup>
<ItemGroup>
<None Include="Images\lubimchik.png" />
</ItemGroup>
<ItemGroup>
<None Include="Images\User.png" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>5</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Excel">
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>7</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="VBIDE">
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
<VersionMajor>5</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

224
KursovayaDvornikovAM/LoginForm.Designer.cs generated Normal file
View File

@ -0,0 +1,224 @@
namespace KursovayaDvornikovAM
{
partial class LoginForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm));
this.label1 = new System.Windows.Forms.Label();
this.CloseButton = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.LoginField = new System.Windows.Forms.TextBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.PassField = new System.Windows.Forms.TextBox();
this.buttonLogin = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.RegisterLabel = new System.Windows.Forms.Label();
this.HideButton = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(426, 77);
this.label1.TabIndex = 1;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(406, 0);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 2;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// pictureBox2
//
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(51, 191);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(44, 41);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 4;
this.pictureBox2.TabStop = false;
//
// LoginField
//
this.LoginField.Font = new System.Drawing.Font("Times New Roman", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.LoginField.Location = new System.Drawing.Point(101, 191);
this.LoginField.Name = "LoginField";
this.LoginField.Size = new System.Drawing.Size(308, 41);
this.LoginField.TabIndex = 5;
this.LoginField.TextChanged += new System.EventHandler(this.LoginField_TextChanged);
//
// pictureBox3
//
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(51, 277);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(44, 41);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox3.TabIndex = 6;
this.pictureBox3.TabStop = false;
//
// PassField
//
this.PassField.Font = new System.Drawing.Font("Times New Roman", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.PassField.Location = new System.Drawing.Point(101, 277);
this.PassField.Name = "PassField";
this.PassField.PasswordChar = 'X';
this.PassField.Size = new System.Drawing.Size(308, 41);
this.PassField.TabIndex = 7;
this.PassField.UseSystemPasswordChar = true;
//
// buttonLogin
//
this.buttonLogin.BackColor = System.Drawing.Color.PaleGreen;
this.buttonLogin.Cursor = System.Windows.Forms.Cursors.Hand;
this.buttonLogin.FlatAppearance.BorderColor = System.Drawing.Color.White;
this.buttonLogin.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.buttonLogin.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lime;
this.buttonLogin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonLogin.Font = new System.Drawing.Font("Comic Sans MS", 14.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.buttonLogin.Location = new System.Drawing.Point(82, 402);
this.buttonLogin.Name = "buttonLogin";
this.buttonLogin.Size = new System.Drawing.Size(145, 73);
this.buttonLogin.TabIndex = 8;
this.buttonLogin.Text = "Войти";
this.buttonLogin.UseVisualStyleBackColor = false;
this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(315, 402);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 9;
this.pictureBox1.TabStop = false;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.ForeColor = System.Drawing.Color.DarkOliveGreen;
this.label2.Location = new System.Drawing.Point(0, 77);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(426, 56);
this.label2.TabIndex = 10;
this.label2.Text = "Авторизация";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// RegisterLabel
//
this.RegisterLabel.AutoSize = true;
this.RegisterLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.RegisterLabel.ForeColor = System.Drawing.Color.DarkGreen;
this.RegisterLabel.Location = new System.Drawing.Point(322, 386);
this.RegisterLabel.Name = "RegisterLabel";
this.RegisterLabel.Size = new System.Drawing.Size(104, 13);
this.RegisterLabel.TabIndex = 11;
this.RegisterLabel.Text = "Еще нет аккаунта?";
this.RegisterLabel.Click += new System.EventHandler(this.RegisterLabel_Click);
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(382, 0);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 12;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// LoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(426, 506);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.RegisterLabel);
this.Controls.Add(this.label2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.buttonLogin);
this.Controls.Add(this.PassField);
this.Controls.Add(this.pictureBox3);
this.Controls.Add(this.LoginField);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LoginForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Любимчик";
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.LoginForm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.LoginForm_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label CloseButton;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.TextBox LoginField;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.TextBox PassField;
private System.Windows.Forms.Button buttonLogin;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label RegisterLabel;
private System.Windows.Forms.Label HideButton;
}
}

View File

@ -0,0 +1,105 @@
using MySql.Data.MySqlClient;
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 static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace KursovayaDvornikovAM
{
public partial class LoginForm : Form
{
public LoginForm()
{
InitializeComponent();
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
Point lastPoint;
private void LoginForm_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void LoginForm_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
private void buttonLogin_Click(object sender, EventArgs e)
{
string connectionString = "server=cfif31.ru;user=ISPr24-37_DvornikovAM;database=ISPr24-37_DvornikovAM_Kursovaya;password=ISPr24-37_DvornikovAM;";
MySqlConnection DBconnection = new MySqlConnection(connectionString);
MySqlCommand command = new MySqlCommand("SELECT * FROM `ISPr24-37_DvornikovAM_Kursovaya`.Polzovatel WHERE Login = @login and Password=@password;", DBconnection);
command.Parameters.AddWithValue("@login", LoginField.Text);
command.Parameters.AddWithValue("@password", PassField.Text);
DBconnection.Open();
MySqlDataReader reader = command.ExecuteReader();
if (reader.HasRows)
{
MainForm main = new MainForm();
main.Show();
this.Hide();
}
else
{
MessageBox.Show("Неверный логин или пароль!");
}
reader.Close();
DBconnection.Close();
}
private void RegisterLabel_Click(object sender, EventArgs e)
{
this.Hide();
RegisterForm registerForm = new RegisterForm();
registerForm.Show();
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void HideButton_MouseEnter(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
private void LoginField_TextChanged(object sender, EventArgs e)
{
}
}
}

File diff suppressed because it is too large Load Diff

286
KursovayaDvornikovAM/MainForm.Designer.cs generated Normal file
View File

@ -0,0 +1,286 @@
namespace KursovayaDvornikovAM
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.CloseButton = new System.Windows.Forms.Label();
this.HideButton = 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.label6 = new System.Windows.Forms.Label();
this.WarehouseButton = new System.Windows.Forms.Button();
this.ProductsButton = new System.Windows.Forms.Button();
this.UserButton = new System.Windows.Forms.Button();
this.ProviderButton = new System.Windows.Forms.Button();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label7 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.ForeColor = System.Drawing.Color.DarkOliveGreen;
this.label2.Location = new System.Drawing.Point(346, 62);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(189, 35);
this.label2.TabIndex = 19;
this.label2.Text = "Главный экран";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(364, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(156, 38);
this.label1.TabIndex = 11;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(861, 0);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 20;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(837, 0);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 21;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter_1);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold);
this.label3.Location = new System.Drawing.Point(264, 206);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(103, 35);
this.label3.TabIndex = 28;
this.label3.Text = "Товары";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold);
this.label4.Location = new System.Drawing.Point(264, 411);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(184, 35);
this.label4.TabIndex = 29;
this.label4.Text = "Пользователи";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold);
this.label5.Location = new System.Drawing.Point(649, 206);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(104, 35);
this.label5.TabIndex = 30;
this.label5.Text = "Склады";
this.label5.Click += new System.EventHandler(this.label5_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold);
this.label6.Location = new System.Drawing.Point(649, 411);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(160, 35);
this.label6.TabIndex = 31;
this.label6.Text = "Поставщики";
//
// WarehouseButton
//
this.WarehouseButton.BackColor = System.Drawing.Color.Red;
this.WarehouseButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("WarehouseButton.BackgroundImage")));
this.WarehouseButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.WarehouseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.WarehouseButton.Location = new System.Drawing.Point(470, 136);
this.WarehouseButton.Name = "WarehouseButton";
this.WarehouseButton.Size = new System.Drawing.Size(150, 152);
this.WarehouseButton.TabIndex = 27;
this.WarehouseButton.UseVisualStyleBackColor = false;
this.WarehouseButton.Click += new System.EventHandler(this.WarehouseButton_Click);
//
// ProductsButton
//
this.ProductsButton.BackColor = System.Drawing.Color.SpringGreen;
this.ProductsButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ProductsButton.BackgroundImage")));
this.ProductsButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ProductsButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.ProductsButton.Location = new System.Drawing.Point(92, 136);
this.ProductsButton.Name = "ProductsButton";
this.ProductsButton.Size = new System.Drawing.Size(150, 152);
this.ProductsButton.TabIndex = 26;
this.ProductsButton.UseVisualStyleBackColor = false;
this.ProductsButton.Click += new System.EventHandler(this.ProductsButton_Click);
//
// UserButton
//
this.UserButton.BackColor = System.Drawing.Color.Yellow;
this.UserButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("UserButton.BackgroundImage")));
this.UserButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.UserButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.UserButton.Location = new System.Drawing.Point(92, 341);
this.UserButton.Name = "UserButton";
this.UserButton.Size = new System.Drawing.Size(150, 152);
this.UserButton.TabIndex = 25;
this.UserButton.UseVisualStyleBackColor = false;
this.UserButton.Click += new System.EventHandler(this.UserButton_Click);
//
// ProviderButton
//
this.ProviderButton.BackColor = System.Drawing.Color.Aqua;
this.ProviderButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ProviderButton.BackgroundImage")));
this.ProviderButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ProviderButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.ProviderButton.Location = new System.Drawing.Point(470, 341);
this.ProviderButton.Name = "ProviderButton";
this.ProviderButton.Size = new System.Drawing.Size(150, 152);
this.ProviderButton.TabIndex = 24;
this.ProviderButton.UseVisualStyleBackColor = false;
this.ProviderButton.Click += new System.EventHandler(this.ProviderButton_Click_1);
//
// pictureBox2
//
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(770, 531);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(111, 104);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 18;
this.pictureBox2.TabStop = false;
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(770, 531);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 18;
this.pictureBox1.TabStop = false;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Cursor = System.Windows.Forms.Cursors.Hand;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label7.ForeColor = System.Drawing.Color.MediumBlue;
this.label7.Location = new System.Drawing.Point(676, 606);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(88, 20);
this.label7.TabIndex = 32;
this.label7.Text = "Наш офис";
this.label7.Click += new System.EventHandler(this.label7_Click);
this.label7.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label7_MouseMove);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(881, 635);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.WarehouseButton);
this.Controls.Add(this.ProductsButton);
this.Controls.Add(this.UserButton);
this.Controls.Add(this.ProviderButton);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.label2);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label1);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Любимчик";
this.Load += new System.EventHandler(this.MainForm_Load);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MainForm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MainForm_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label HideButton;
private System.Windows.Forms.Button ProviderButton;
private System.Windows.Forms.Button UserButton;
private System.Windows.Forms.Button ProductsButton;
private System.Windows.Forms.Button WarehouseButton;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label CloseButton;
}
}

View File

@ -0,0 +1,122 @@
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 KursovayaDvornikovAM
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void HideButton_MouseEnter_1(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
private void label5_Click(object sender, EventArgs e)
{
}
private void ProductsButton_Click(object sender, EventArgs e)
{
this.Hide();
ProductsForm productsForm = new ProductsForm();
productsForm.Show();
}
private void UserButton_Click(object sender, EventArgs e)
{
this.Hide();
UserForm userForm = new UserForm();
userForm.Show();
}
private void WarehouseButton_Click(object sender, EventArgs e)
{
this.Hide();
WarehouseForm warehouseForm = new WarehouseForm();
warehouseForm.Show();
}
private void ProviderButton_Click_1(object sender, EventArgs e)
{
this.Hide();
ProviderForm providerForm = new ProviderForm();
providerForm.Show();
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
Point lastPoint;
private void MainForm_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void MainForm_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
private void label1_Click(object sender, EventArgs e)
{
}
private void label7_MouseMove(object sender, MouseEventArgs e)
{
}
private void label7_Click(object sender, EventArgs e)
{
this.Hide();
Maps map = new Maps();
map.Show();
}
}
}

File diff suppressed because it is too large Load Diff

152
KursovayaDvornikovAM/Maps.Designer.cs generated Normal file
View File

@ -0,0 +1,152 @@
namespace KursovayaDvornikovAM
{
partial class Maps
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Maps));
this.button1 = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.ReturnButton = new System.Windows.Forms.Button();
this.CloseButton = new System.Windows.Forms.Label();
this.HideButton = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.BackColor = System.Drawing.Color.IndianRed;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button1.Location = new System.Drawing.Point(293, 519);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(149, 59);
this.button1.TabIndex = 0;
this.button1.Text = "К картам";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(48, 47);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(634, 444);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// ReturnButton
//
this.ReturnButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ReturnButton.BackgroundImage")));
this.ReturnButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ReturnButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.ReturnButton.FlatAppearance.BorderColor = System.Drawing.Color.PaleGoldenrod;
this.ReturnButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ReturnButton.Location = new System.Drawing.Point(1, 1);
this.ReturnButton.Name = "ReturnButton";
this.ReturnButton.Size = new System.Drawing.Size(25, 26);
this.ReturnButton.TabIndex = 32;
this.ReturnButton.UseVisualStyleBackColor = true;
this.ReturnButton.Click += new System.EventHandler(this.ReturnButton_Click);
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(710, 1);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 31;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(686, 1);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 30;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// pictureBox2
//
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(619, 506);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(111, 104);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 33;
this.pictureBox2.TabStop = false;
//
// Maps
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(732, 610);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.ReturnButton);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "Maps";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Maps";
this.Load += new System.EventHandler(this.Maps_Load);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Maps_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Maps_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button ReturnButton;
private System.Windows.Forms.Label CloseButton;
private System.Windows.Forms.Label HideButton;
private System.Windows.Forms.PictureBox pictureBox2;
}
}

View File

@ -0,0 +1,86 @@
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 KursovayaDvornikovAM
{
public partial class Maps : Form
{
public Maps()
{
InitializeComponent();
}
private void Maps_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
string address = "YUkYdAJlTUEOQFtpfX5xcHhgYA==/?ll=50.256555%2C53.200911&z=17.2"; // адрес для отображения на карте
string url = $"https://yandex.ru/maps/51/samara/house/upravlencheskiy_tupik_7/{address}";
System.Diagnostics.Process.Start(url);
}
private void ReturnButton_Click(object sender, EventArgs e)
{
this.Hide();
MainForm mainForm = new MainForm();
mainForm.Show();
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
private void HideButton_MouseEnter(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
Point lastPoint;
private void Maps_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void Maps_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,372 @@
namespace KursovayaDvornikovAM
{
partial class ProductsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductsForm));
this.CloseButton = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.HideButton = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Dobavlenie = new System.Windows.Forms.Button();
this.Redactirovanie = new System.Windows.Forms.Button();
this.Udalenie = new System.Windows.Forms.Button();
this.Obnovlenie = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.ReturnButton = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.Export = new System.Windows.Forms.Button();
this.Search = new System.Windows.Forms.TextBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(784, 0);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 28;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.ForeColor = System.Drawing.Color.DarkOliveGreen;
this.label2.Location = new System.Drawing.Point(354, 71);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(103, 35);
this.label2.TabIndex = 24;
this.label2.Text = "Товары";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(328, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(156, 38);
this.label1.TabIndex = 22;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(760, 0);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 27;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(71, 152);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(675, 314);
this.dataGridView1.TabIndex = 30;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
//
// Dobavlenie
//
this.Dobavlenie.BackColor = System.Drawing.Color.Lime;
this.Dobavlenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Dobavlenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Dobavlenie.Location = new System.Drawing.Point(531, 492);
this.Dobavlenie.Name = "Dobavlenie";
this.Dobavlenie.Size = new System.Drawing.Size(99, 23);
this.Dobavlenie.TabIndex = 37;
this.Dobavlenie.Text = "Добавить";
this.Dobavlenie.UseVisualStyleBackColor = false;
this.Dobavlenie.Click += new System.EventHandler(this.Dobavlenie_Click);
//
// Redactirovanie
//
this.Redactirovanie.BackColor = System.Drawing.Color.Cyan;
this.Redactirovanie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Redactirovanie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Redactirovanie.Location = new System.Drawing.Point(531, 521);
this.Redactirovanie.Name = "Redactirovanie";
this.Redactirovanie.Size = new System.Drawing.Size(99, 23);
this.Redactirovanie.TabIndex = 38;
this.Redactirovanie.Text = "Редактировать";
this.Redactirovanie.UseVisualStyleBackColor = false;
this.Redactirovanie.Click += new System.EventHandler(this.Redactirovanie_Click);
//
// Udalenie
//
this.Udalenie.BackColor = System.Drawing.Color.Red;
this.Udalenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Udalenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Udalenie.Location = new System.Drawing.Point(531, 550);
this.Udalenie.Name = "Udalenie";
this.Udalenie.Size = new System.Drawing.Size(99, 23);
this.Udalenie.TabIndex = 39;
this.Udalenie.Text = "Удалить";
this.Udalenie.UseVisualStyleBackColor = false;
this.Udalenie.Click += new System.EventHandler(this.Udalenie_Click);
//
// Obnovlenie
//
this.Obnovlenie.BackColor = System.Drawing.Color.Yellow;
this.Obnovlenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Obnovlenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Obnovlenie.Location = new System.Drawing.Point(531, 579);
this.Obnovlenie.Name = "Obnovlenie";
this.Obnovlenie.Size = new System.Drawing.Size(99, 23);
this.Obnovlenie.TabIndex = 40;
this.Obnovlenie.Text = "Обновить";
this.Obnovlenie.UseVisualStyleBackColor = false;
this.Obnovlenie.Click += new System.EventHandler(this.Obnovlenie_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(233, 496);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 42;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(233, 522);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 43;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(233, 548);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 44;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(233, 574);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(242, 20);
this.textBox4.TabIndex = 45;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.Location = new System.Drawing.Point(52, 493);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(83, 23);
this.label3.TabIndex = 47;
this.label3.Text = "Название";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(52, 519);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(90, 23);
this.label4.TabIndex = 48;
this.label4.Text = "Категория";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(53, 545);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(49, 23);
this.label5.TabIndex = 49;
this.label5.Text = "Цена";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label6.Location = new System.Drawing.Point(53, 571);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(88, 23);
this.label6.TabIndex = 50;
this.label6.Text = "Описание";
//
// ReturnButton
//
this.ReturnButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ReturnButton.BackgroundImage")));
this.ReturnButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ReturnButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.ReturnButton.FlatAppearance.BorderColor = System.Drawing.Color.PaleGoldenrod;
this.ReturnButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ReturnButton.Location = new System.Drawing.Point(6, 0);
this.ReturnButton.Name = "ReturnButton";
this.ReturnButton.Size = new System.Drawing.Size(25, 26);
this.ReturnButton.TabIndex = 29;
this.ReturnButton.UseVisualStyleBackColor = true;
this.ReturnButton.Click += new System.EventHandler(this.ReturnButton_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(693, 554);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 23;
this.pictureBox1.TabStop = false;
//
// Export
//
this.Export.BackColor = System.Drawing.Color.Purple;
this.Export.Cursor = System.Windows.Forms.Cursors.Hand;
this.Export.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Export.Location = new System.Drawing.Point(531, 608);
this.Export.Name = "Export";
this.Export.Size = new System.Drawing.Size(99, 23);
this.Export.TabIndex = 51;
this.Export.Text = "Экспорт";
this.Export.UseVisualStyleBackColor = false;
this.Export.Click += new System.EventHandler(this.Export_Click);
//
// Search
//
this.Search.Location = new System.Drawing.Point(655, 492);
this.Search.Name = "Search";
this.Search.Size = new System.Drawing.Size(123, 20);
this.Search.TabIndex = 52;
this.Search.TextChanged += new System.EventHandler(this.Search_TextChanged);
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"Nazvanie",
"Kategoria",
"Cena",
"Opisanie",
"ALL"});
this.comboBox1.Location = new System.Drawing.Point(335, 609);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(139, 21);
this.comboBox1.TabIndex = 53;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// ProductsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(804, 658);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.Search);
this.Controls.Add(this.Export);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.Obnovlenie);
this.Controls.Add(this.Udalenie);
this.Controls.Add(this.Redactirovanie);
this.Controls.Add(this.Dobavlenie);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.ReturnButton);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.label2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ProductsForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Любимчик";
this.Load += new System.EventHandler(this.ProductsForm_Load);
this.Click += new System.EventHandler(this.ProductsForm_Click);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ProductsForm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ProductsForm_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label HideButton;
private System.Windows.Forms.Button ReturnButton;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label CloseButton;
private System.Windows.Forms.Button Dobavlenie;
private System.Windows.Forms.Button Redactirovanie;
private System.Windows.Forms.Button Udalenie;
private System.Windows.Forms.Button Obnovlenie;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Button Export;
private System.Windows.Forms.TextBox Search;
private System.Windows.Forms.ComboBox comboBox1;
}
}

View File

@ -0,0 +1,202 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
using Excel = Microsoft.Office.Interop.Excel;
namespace KursovayaDvornikovAM
{
public partial class ProductsForm : Form
{
public ProductsForm()
{
InitializeComponent();
}
private void ProductsForm_Load(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idTovar,Nazvanie,Kategoria,Cena,Opisanie FROM `ISPr24-37_DvornikovAM_Kursovaya`.Tovar ;");
dataGridView1.DataSource = data;
dataGridView1.DataSource = data;
dataGridView1.AllowUserToAddRows = false;
}
private void ReturnButton_Click(object sender, EventArgs e)
{
this.Hide();
MainForm mainForm = new MainForm();
mainForm.Show();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void HideButton_MouseEnter(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
Point lastPoint;
private void ProductsForm_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void ProductsForm_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
//редактирование
private void Redactirovanie_Click(object sender, EventArgs e)
{
string id = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == "") || (textBox4.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("UPDATE Tovar SET Nazvanie='" + textBox1.Text + "',Kategoria='" + textBox2.Text + "',Cena='" + textBox3.Text + "',Opisanie='" + textBox4.Text + "' WHERE idTovar='" + id + "'");
ProductsForm_Click(sender, e);
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
}
}
//Добавление убрать склад и айди
private void Dobavlenie_Click(object sender, EventArgs e)
{
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == "") || (textBox4.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("insert into Tovar (`Nazvanie`,`Kategoria`,`Cena`,`Opisanie`) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')");
ProductsForm_Click(sender, e);
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
}
}
//удаление
private void Udalenie_Click(object sender, EventArgs e)
{
ProductsForm_Click(sender, e);
DataTable data = DBconnection.Select(@"DELETE FROM `ISPr24-37_DvornikovAM_Kursovaya`.Tovar WHERE idTovar='" + dataGridView1.SelectedRows[0].Cells[0].Value.ToString() + "';");
data = DBconnection.Select("SELECT idTovar,Nazvanie,Kategoria,Cena,Opisanie FROM `ISPr24-37_DvornikovAM_Kursovaya`.Tovar;");
dataGridView1.DataSource = data;
}
//Обновление
private void Obnovlenie_Click(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idTovar,Nazvanie,Kategoria,Cena,Opisanie FROM `ISPr24-37_DvornikovAM_Kursovaya`.Tovar;");
ProductsForm_Click(sender, e);
dataGridView1.DataSource = null;
dataGridView1.DataSource = data;
}
private void ProductsForm_Click(object sender, EventArgs e)
{
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
}
private void Export_Click(object sender, EventArgs e)
{
Excel.Application exApp = new Excel.Application();
exApp.Workbooks.Add();
Excel.Worksheet worksheet = (Excel.Worksheet)exApp.ActiveSheet;
int i, j;
for (i = 0; i <= dataGridView1.RowCount - 1; i++)
{
for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
{
worksheet.Cells[i + 1, j + 1] = dataGridView1[j, i].Value.ToString();
}
}
exApp.Visible = true;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
dataGridView1.DataSource = DBconnection.Select("SELECT Nazvanie, Kategoria, Cena, Opisanie FROM Tovar order by " + comboBox1.SelectedItem);
}
private void Search_TextChanged(object sender, EventArgs e)
{
(dataGridView1.DataSource as DataTable).DefaultView.RowFilter = $"Nazvanie LIKE '%{Search.Text}%'";
}
//private void textBox5_KeyDown(object sender, KeyEventArgs e)
//{
// if (e.KeyCode == Keys.Enter)
// {
// if (string.IsNullOrEmpty(textBox5.Text))
// {
// customersBindingSource.Filter = string.Empty;
// }
// else
// {
// customersBindingSource.Filter = string.Format("0='{1}'", cmbColumn.Text, textBox5.Text;
// }
// }
//}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KursovayaDvornikovAM
{
internal static class Program
{
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new LoginForm());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
// связанных со сборкой.
[assembly: AssemblyTitle("KursovayaDvornikovAM")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("KursovayaDvornikovAM")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// COM, следует установить атрибут ComVisible в TRUE для этого типа.
[assembly: ComVisible(false)]
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
[assembly: Guid("6ffac904-7770-48af-94c3-654ca15482bd")]
// Сведения о версии сборки состоят из указанных ниже четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Редакция
//
// Можно задать все значения или принять номера сборки и редакции по умолчанию
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace KursovayaDvornikovAM.Properties {
using System;
/// <summary>
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
/// </summary>
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
// с помощью такого средства, как ResGen или Visual Studio.
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
// с параметром /str или перестройте свой проект VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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() {
}
/// <summary>
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("KursovayaDvornikovAM.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap User {
get {
object obj = ResourceManager.GetObject("User", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="User" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\User.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace KursovayaDvornikovAM.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;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,374 @@
namespace KursovayaDvornikovAM
{
partial class ProviderForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProviderForm));
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.HideButton = new System.Windows.Forms.Label();
this.CloseButton = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Dobavlenie = new System.Windows.Forms.Button();
this.Redactirovanie = new System.Windows.Forms.Button();
this.Udalenie = new System.Windows.Forms.Button();
this.Obnovlenie = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.ReturnButton = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.Export = new System.Windows.Forms.Button();
this.Search = new System.Windows.Forms.TextBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Cursor = System.Windows.Forms.Cursors.Default;
this.label3.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.ForeColor = System.Drawing.Color.DarkOliveGreen;
this.label3.Location = new System.Drawing.Point(321, 61);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(160, 35);
this.label3.TabIndex = 32;
this.label3.Text = "Поставщики";
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.label3.Click += new System.EventHandler(this.label3_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(325, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(156, 38);
this.label1.TabIndex = 31;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(760, 0);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 33;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(784, 0);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 34;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(76, 120);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(675, 314);
this.dataGridView1.TabIndex = 36;
//
// Dobavlenie
//
this.Dobavlenie.BackColor = System.Drawing.Color.Lime;
this.Dobavlenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Dobavlenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Dobavlenie.Location = new System.Drawing.Point(510, 461);
this.Dobavlenie.Name = "Dobavlenie";
this.Dobavlenie.Size = new System.Drawing.Size(99, 23);
this.Dobavlenie.TabIndex = 41;
this.Dobavlenie.Text = "Добавить";
this.Dobavlenie.UseVisualStyleBackColor = false;
this.Dobavlenie.Click += new System.EventHandler(this.Dobavlenie_Click);
//
// Redactirovanie
//
this.Redactirovanie.BackColor = System.Drawing.Color.Cyan;
this.Redactirovanie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Redactirovanie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Redactirovanie.Location = new System.Drawing.Point(510, 490);
this.Redactirovanie.Name = "Redactirovanie";
this.Redactirovanie.Size = new System.Drawing.Size(99, 23);
this.Redactirovanie.TabIndex = 42;
this.Redactirovanie.Text = "Редактировать";
this.Redactirovanie.UseVisualStyleBackColor = false;
this.Redactirovanie.Click += new System.EventHandler(this.Redactirovanie_Click);
//
// Udalenie
//
this.Udalenie.BackColor = System.Drawing.Color.Red;
this.Udalenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Udalenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Udalenie.Location = new System.Drawing.Point(510, 519);
this.Udalenie.Name = "Udalenie";
this.Udalenie.Size = new System.Drawing.Size(99, 23);
this.Udalenie.TabIndex = 43;
this.Udalenie.Text = "Удалить";
this.Udalenie.UseVisualStyleBackColor = false;
this.Udalenie.Click += new System.EventHandler(this.Udalenie_Click);
//
// Obnovlenie
//
this.Obnovlenie.BackColor = System.Drawing.Color.Yellow;
this.Obnovlenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Obnovlenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Obnovlenie.Location = new System.Drawing.Point(510, 548);
this.Obnovlenie.Name = "Obnovlenie";
this.Obnovlenie.Size = new System.Drawing.Size(99, 23);
this.Obnovlenie.TabIndex = 44;
this.Obnovlenie.Text = "Обновить";
this.Obnovlenie.UseVisualStyleBackColor = false;
this.Obnovlenie.Click += new System.EventHandler(this.Obnovlenie_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label6.Location = new System.Drawing.Point(48, 551);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(176, 23);
this.label6.TabIndex = 58;
this.label6.Text = "Количество поставок";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(48, 525);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(84, 23);
this.label5.TabIndex = 57;
this.label5.Text = "Поставка";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(47, 499);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(116, 23);
this.label4.TabIndex = 56;
this.label4.Text = "Фамилия имя";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(47, 473);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(87, 23);
this.label2.TabIndex = 55;
this.label2.Text = "Компания";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(228, 554);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(242, 20);
this.textBox4.TabIndex = 54;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(228, 528);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 53;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(228, 502);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 52;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(228, 476);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 51;
//
// ReturnButton
//
this.ReturnButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ReturnButton.BackgroundImage")));
this.ReturnButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ReturnButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.ReturnButton.FlatAppearance.BorderColor = System.Drawing.Color.PaleGoldenrod;
this.ReturnButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ReturnButton.Location = new System.Drawing.Point(6, 0);
this.ReturnButton.Name = "ReturnButton";
this.ReturnButton.Size = new System.Drawing.Size(25, 26);
this.ReturnButton.TabIndex = 35;
this.ReturnButton.UseVisualStyleBackColor = true;
this.ReturnButton.Click += new System.EventHandler(this.ReturnButton_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(693, 513);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 30;
this.pictureBox1.TabStop = false;
//
// Export
//
this.Export.BackColor = System.Drawing.Color.Purple;
this.Export.Cursor = System.Windows.Forms.Cursors.Hand;
this.Export.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Export.Location = new System.Drawing.Point(510, 577);
this.Export.Name = "Export";
this.Export.Size = new System.Drawing.Size(99, 23);
this.Export.TabIndex = 59;
this.Export.Text = "Экспорт";
this.Export.UseVisualStyleBackColor = false;
this.Export.Click += new System.EventHandler(this.Export_Click);
//
// Search
//
this.Search.Location = new System.Drawing.Point(638, 461);
this.Search.Name = "Search";
this.Search.Size = new System.Drawing.Size(123, 20);
this.Search.TabIndex = 60;
this.Search.TextChanged += new System.EventHandler(this.Search_TextChanged);
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"Kompania",
"Name",
"Postavka",
"Koli4estvoPostavok",
"ALL"});
this.comboBox1.Location = new System.Drawing.Point(331, 580);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(139, 21);
this.comboBox1.TabIndex = 61;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// ProviderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(804, 616);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.Search);
this.Controls.Add(this.Export);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.Obnovlenie);
this.Controls.Add(this.Udalenie);
this.Controls.Add(this.Redactirovanie);
this.Controls.Add(this.Dobavlenie);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.ReturnButton);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ProviderForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Любимчик";
this.Load += new System.EventHandler(this.ProviderForm_Load);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ProviderForm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ProviderForm_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label HideButton;
private System.Windows.Forms.Label CloseButton;
private System.Windows.Forms.Button ReturnButton;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button Dobavlenie;
private System.Windows.Forms.Button Redactirovanie;
private System.Windows.Forms.Button Udalenie;
private System.Windows.Forms.Button Obnovlenie;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button Export;
private System.Windows.Forms.TextBox Search;
private System.Windows.Forms.ComboBox comboBox1;
}
}

View File

@ -0,0 +1,161 @@
using MySql.Data.MySqlClient;
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 static System.Windows.Forms.VisualStyles.VisualStyleElement;
using Excel = Microsoft.Office.Interop.Excel;
namespace KursovayaDvornikovAM
{
public partial class ProviderForm : Form
{
public ProviderForm()
{
InitializeComponent();
}
private void ReturnButton_Click(object sender, EventArgs e)
{
this.Hide();
MainForm mainForm = new MainForm();
mainForm.Show();
}
private void label3_Click(object sender, EventArgs e)
{
}
private void ProviderForm_Load(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idPostavshik,Kompania,Name,Postavka,Koli4estvoPostavok FROM `ISPr24-37_DvornikovAM_Kursovaya`.Postavshik ;");
dataGridView1.DataSource = data;
dataGridView1.DataSource = data;
dataGridView1.AllowUserToAddRows = false;
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void HideButton_MouseEnter(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
Point lastPoint;
private void ProviderForm_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void ProviderForm_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
//Добавление
private void Dobavlenie_Click(object sender, EventArgs e)
{
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == "") || (textBox4.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("insert into Postavshik (`Kompania`,`Name`,`Postavka`,`Koli4estvoPostavok`) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')");
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
}
}
//Редактирование
private void Redactirovanie_Click(object sender, EventArgs e)
{
string id = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == "") || (textBox4.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("UPDATE Postavshik SET Kompania='" + textBox1.Text + "',Name='" + textBox2.Text + "',Postavka='" + textBox3.Text + "',Koli4estvoPostavok='" + textBox4.Text + "' WHERE idPostavshik='" + id + "'");
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
}
}
//Удаление
private void Udalenie_Click(object sender, EventArgs e)
{
DataTable data = DBconnection.Select(@"DELETE FROM `ISPr24-37_DvornikovAM_Kursovaya`.Postavshik WHERE idPostavshik='" + dataGridView1.SelectedRows[0].Cells[0].Value.ToString() + "';");
data = DBconnection.Select("SELECT idPostavshik,Kompania,Name,Postavka,Koli4estvoPostavok FROM `ISPr24-37_DvornikovAM_Kursovaya`.Postavshik;");
dataGridView1.DataSource = data;
}
//Обновление
private void Obnovlenie_Click(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idPostavshik,Kompania,Name,Postavka,Koli4estvoPostavok FROM `ISPr24-37_DvornikovAM_Kursovaya`.Postavshik;");
dataGridView1.DataSource = null;
dataGridView1.DataSource = data;
}
private void Export_Click(object sender, EventArgs e)
{
Excel.Application exApp = new Excel.Application();
exApp.Workbooks.Add();
Excel.Worksheet worksheet = (Excel.Worksheet)exApp.ActiveSheet;
int i, j;
for (i = 0; i <= dataGridView1.RowCount - 1; i++)
{
for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
{
worksheet.Cells[i + 1, j + 1] = dataGridView1[j, i].Value.ToString();
}
}
exApp.Visible = true;
}
private void Search_TextChanged(object sender, EventArgs e)
{
(dataGridView1.DataSource as DataTable).DefaultView.RowFilter = $"Kompania LIKE '%{Search.Text}%'";
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
dataGridView1.DataSource = DBconnection.Select("SELECT Kompania,Name,Postavka,Koli4estvoPostavok FROM Postavshik order by " + comboBox1.SelectedItem);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,286 @@
namespace KursovayaDvornikovAM
{
partial class RegisterForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RegisterForm));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.buttonRegister = new System.Windows.Forms.Button();
this.PassField = new System.Windows.Forms.TextBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.LoginField = new System.Windows.Forms.TextBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.CloseButton = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.userSurnameField = new System.Windows.Forms.TextBox();
this.userNameField = new System.Windows.Forms.TextBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.RegisterLabel = new System.Windows.Forms.Label();
this.HideButton = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(317, 401);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 17;
this.pictureBox1.TabStop = false;
//
// buttonRegister
//
this.buttonRegister.BackColor = System.Drawing.Color.PaleGreen;
this.buttonRegister.Cursor = System.Windows.Forms.Cursors.Hand;
this.buttonRegister.FlatAppearance.BorderColor = System.Drawing.Color.White;
this.buttonRegister.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.buttonRegister.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lime;
this.buttonRegister.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonRegister.Font = new System.Drawing.Font("Comic Sans MS", 14.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.buttonRegister.Location = new System.Drawing.Point(42, 401);
this.buttonRegister.Name = "buttonRegister";
this.buttonRegister.Size = new System.Drawing.Size(213, 73);
this.buttonRegister.TabIndex = 16;
this.buttonRegister.Text = "Зарегистрироваться";
this.buttonRegister.UseVisualStyleBackColor = false;
this.buttonRegister.Click += new System.EventHandler(this.buttonRegister_Click);
//
// PassField
//
this.PassField.Font = new System.Drawing.Font("Times New Roman", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.PassField.Location = new System.Drawing.Point(108, 319);
this.PassField.Name = "PassField";
this.PassField.PasswordChar = 'X';
this.PassField.Size = new System.Drawing.Size(308, 41);
this.PassField.TabIndex = 15;
this.PassField.UseSystemPasswordChar = true;
this.PassField.TextChanged += new System.EventHandler(this.PassField_TextChanged);
//
// pictureBox3
//
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(42, 319);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(49, 41);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox3.TabIndex = 14;
this.pictureBox3.TabStop = false;
//
// LoginField
//
this.LoginField.Font = new System.Drawing.Font("Times New Roman", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.LoginField.Location = new System.Drawing.Point(108, 249);
this.LoginField.Name = "LoginField";
this.LoginField.Size = new System.Drawing.Size(308, 41);
this.LoginField.TabIndex = 13;
this.LoginField.Enter += new System.EventHandler(this.LoginField_Enter);
this.LoginField.Leave += new System.EventHandler(this.LoginField_Leave);
//
// pictureBox2
//
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(42, 249);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(49, 41);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 12;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(428, 62);
this.label1.TabIndex = 10;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(408, 0);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 18;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// label3
//
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Dock = System.Windows.Forms.DockStyle.Top;
this.label3.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.ForeColor = System.Drawing.Color.DarkOliveGreen;
this.label3.Location = new System.Drawing.Point(0, 62);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(428, 39);
this.label3.TabIndex = 19;
this.label3.Text = "Регистрация";
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// userSurnameField
//
this.userSurnameField.Font = new System.Drawing.Font("Times New Roman", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.userSurnameField.Location = new System.Drawing.Point(108, 179);
this.userSurnameField.Name = "userSurnameField";
this.userSurnameField.Size = new System.Drawing.Size(308, 41);
this.userSurnameField.TabIndex = 20;
this.userSurnameField.Enter += new System.EventHandler(this.userSurnameField_Enter);
this.userSurnameField.Leave += new System.EventHandler(this.userSurnameField_Leave);
//
// userNameField
//
this.userNameField.Font = new System.Drawing.Font("Times New Roman", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.userNameField.Location = new System.Drawing.Point(108, 109);
this.userNameField.Name = "userNameField";
this.userNameField.Size = new System.Drawing.Size(308, 41);
this.userNameField.TabIndex = 21;
this.userNameField.Enter += new System.EventHandler(this.userNameField_Enter);
this.userNameField.Leave += new System.EventHandler(this.userNameField_Leave);
//
// pictureBox4
//
this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
this.pictureBox4.Location = new System.Drawing.Point(42, 179);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(49, 41);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox4.TabIndex = 22;
this.pictureBox4.TabStop = false;
//
// pictureBox5
//
this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
this.pictureBox5.Location = new System.Drawing.Point(42, 109);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(49, 41);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox5.TabIndex = 23;
this.pictureBox5.TabStop = false;
//
// RegisterLabel
//
this.RegisterLabel.AutoSize = true;
this.RegisterLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.RegisterLabel.ForeColor = System.Drawing.Color.DarkGreen;
this.RegisterLabel.Location = new System.Drawing.Point(324, 385);
this.RegisterLabel.Name = "RegisterLabel";
this.RegisterLabel.Size = new System.Drawing.Size(104, 13);
this.RegisterLabel.TabIndex = 24;
this.RegisterLabel.Text = "Уже есть аккаунт?";
this.RegisterLabel.Click += new System.EventHandler(this.RegisterLabel_Click);
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(384, 0);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 25;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// RegisterForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(428, 506);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.RegisterLabel);
this.Controls.Add(this.pictureBox5);
this.Controls.Add(this.pictureBox4);
this.Controls.Add(this.userNameField);
this.Controls.Add(this.userSurnameField);
this.Controls.Add(this.label3);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.buttonRegister);
this.Controls.Add(this.PassField);
this.Controls.Add(this.pictureBox3);
this.Controls.Add(this.LoginField);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "RegisterForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Любимчик";
this.Load += new System.EventHandler(this.RegisterForm_Load);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RegisterForm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.RegisterForm_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button buttonRegister;
private System.Windows.Forms.TextBox PassField;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.TextBox LoginField;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label CloseButton;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox userSurnameField;
private System.Windows.Forms.TextBox userNameField;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.Label RegisterLabel;
private System.Windows.Forms.Label HideButton;
}
}

View File

@ -0,0 +1,216 @@
using MySql.Data.MySqlClient;
using MySqlX.XDevAPI.Common;
using Mysqlx;
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 static System.Windows.Forms.VisualStyles.VisualStyleElement;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
namespace KursovayaDvornikovAM
{
public partial class RegisterForm : Form
{
public RegisterForm()
{
InitializeComponent();
userNameField.Text = "Введите имя";
userNameField.ForeColor = Color.Gray;
userSurnameField.Text = "Введите фамилию";
userSurnameField.ForeColor = Color.Gray;
LoginField.Text = "Введите логин";
LoginField.ForeColor = Color.Gray;
}
private void RegisterForm_Load(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void PassField_TextChanged(object sender, EventArgs e)
{
}
private void pictureBox2_Click(object sender, EventArgs e)
{
}
Point lastPoint1;
private void RegisterForm_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint1.X;
this.Top += e.Y - lastPoint1.Y;
}
}
private void RegisterForm_MouseDown(object sender, MouseEventArgs e)
{
lastPoint1 = new Point(e.X, e.Y);
}
private void userNameField_Enter(object sender, EventArgs e)
{
if (userNameField.Text == "Введите имя")
{
userNameField.Text = "";
userNameField.ForeColor = Color.Black;
}
}
private void userNameField_Leave(object sender, EventArgs e)
{
if (userNameField.Text == "")
{
userNameField.Text = "Введите имя";
userNameField.ForeColor = Color.Gray;
}
}
private void userSurnameField_Enter(object sender, EventArgs e)
{
if (userSurnameField.Text == "Введите фамилию")
{
userSurnameField.Text = "";
userSurnameField.ForeColor = Color.Black;
}
}
private void userSurnameField_Leave(object sender, EventArgs e)
{
if (userSurnameField.Text == "")
{
userSurnameField.Text = "Введите фамилию";
userSurnameField.ForeColor = Color.Gray;
}
}
private void LoginField_Enter(object sender, EventArgs e)
{
if (LoginField.Text == "Введите логин")
{
LoginField.Text = "";
LoginField.ForeColor = Color.Black;
}
}
private void LoginField_Leave(object sender, EventArgs e)
{
if (LoginField.Text == "")
{
LoginField.Text = "Введите логин";
LoginField.ForeColor = Color.Gray;
}
}
private string HashPassword(string Password)
{
// Здесь необходимо использовать реальный механизм хэширования пароля
// Не храните пароли в открытом виде в базе данных
return Password; // Здесь нужно использовать реальный механизм хэширования пароля
}
private void buttonRegister_Click(object sender, EventArgs e)
{
if (userNameField.Text == "Введите имя")
{
MessageBox.Show("Введите имя");
return;
}
if (userSurnameField.Text == "Введите фамилию")
{
MessageBox.Show("Введите фамилию");
return;
}
if (LoginField.Text == "Введите логин")
{
MessageBox.Show("Введите логин");
return;
}
//поменять на хэширование
if (PassField.Text == "")
{
MessageBox.Show("Введите пароль");
return;
}
if (LoginField != null && PassField != null && userSurnameField !=null && userSurnameField !=null)
{
DBconnection.Select("INSERT INTO Polzovatel (`Login`,`Password`,`Name`,`Surname`) VALUES ('" + LoginField.Text + "','" + PassField.Text + "','" + userNameField.Text + "','" + userSurnameField.Text + "')");
MessageBox.Show("Вы успешно зарегистрировались!");
Hide();
LoginForm login = new LoginForm();
//хэширование
login.ShowDialog();
Close();
}
else
MessageBox.Show("Неверный логин или пароль!");
}
private void RegisterLabel_Click(object sender, EventArgs e)
{
this.Hide();
LoginForm loginForm = new LoginForm();
loginForm.Show();
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void HideButton_MouseEnter(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
}
}

File diff suppressed because it is too large Load Diff

374
KursovayaDvornikovAM/UserForm.Designer.cs generated Normal file
View File

@ -0,0 +1,374 @@
namespace KursovayaDvornikovAM
{
partial class UserForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UserForm));
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.HideButton = new System.Windows.Forms.Label();
this.CloseButton = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Redactirovanie = new System.Windows.Forms.Button();
this.AddButton = new System.Windows.Forms.Button();
this.Udalenie = new System.Windows.Forms.Button();
this.Obnovlenie = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.ReturnButton = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.Export = new System.Windows.Forms.Button();
this.Search = new System.Windows.Forms.TextBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label3
//
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.ForeColor = System.Drawing.Color.DarkOliveGreen;
this.label3.Location = new System.Drawing.Point(303, 62);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(203, 39);
this.label3.TabIndex = 26;
this.label3.Text = "Пользователь";
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label1
//
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(312, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(175, 62);
this.label1.TabIndex = 25;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(756, 0);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 28;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(780, 2);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 29;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(68, 122);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(675, 314);
this.dataGridView1.TabIndex = 31;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
//
// Redactirovanie
//
this.Redactirovanie.BackColor = System.Drawing.Color.Cyan;
this.Redactirovanie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Redactirovanie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Redactirovanie.Location = new System.Drawing.Point(529, 488);
this.Redactirovanie.Name = "Redactirovanie";
this.Redactirovanie.Size = new System.Drawing.Size(99, 23);
this.Redactirovanie.TabIndex = 33;
this.Redactirovanie.Text = "Редактировать";
this.Redactirovanie.UseVisualStyleBackColor = false;
this.Redactirovanie.Click += new System.EventHandler(this.Redactirovanie_Click);
//
// AddButton
//
this.AddButton.BackColor = System.Drawing.Color.Lime;
this.AddButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.AddButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.AddButton.Location = new System.Drawing.Point(529, 459);
this.AddButton.Name = "AddButton";
this.AddButton.Size = new System.Drawing.Size(99, 23);
this.AddButton.TabIndex = 34;
this.AddButton.Text = "Добавить";
this.AddButton.UseVisualStyleBackColor = false;
this.AddButton.Click += new System.EventHandler(this.AddButton_Click);
//
// Udalenie
//
this.Udalenie.BackColor = System.Drawing.Color.Red;
this.Udalenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Udalenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Udalenie.Location = new System.Drawing.Point(529, 517);
this.Udalenie.Name = "Udalenie";
this.Udalenie.Size = new System.Drawing.Size(99, 23);
this.Udalenie.TabIndex = 35;
this.Udalenie.Text = "Удалить";
this.Udalenie.UseVisualStyleBackColor = false;
this.Udalenie.Click += new System.EventHandler(this.Udalenie_Click);
//
// Obnovlenie
//
this.Obnovlenie.BackColor = System.Drawing.Color.Yellow;
this.Obnovlenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Obnovlenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Obnovlenie.Location = new System.Drawing.Point(529, 546);
this.Obnovlenie.Name = "Obnovlenie";
this.Obnovlenie.Size = new System.Drawing.Size(99, 23);
this.Obnovlenie.TabIndex = 36;
this.Obnovlenie.Text = "Обновить\r\n";
this.Obnovlenie.UseVisualStyleBackColor = false;
this.Obnovlenie.Click += new System.EventHandler(this.Obnovlenie_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label6.Location = new System.Drawing.Point(52, 542);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(79, 23);
this.label6.TabIndex = 58;
this.label6.Text = "Фамилия";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(52, 516);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(42, 23);
this.label5.TabIndex = 57;
this.label5.Text = "Имя";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(51, 490);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(70, 23);
this.label4.TabIndex = 56;
this.label4.Text = "Пароль";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(51, 464);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(58, 23);
this.label2.TabIndex = 55;
this.label2.Text = "Логин";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(232, 545);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(242, 20);
this.textBox4.TabIndex = 54;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(232, 519);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 53;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(232, 493);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 52;
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(232, 467);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 51;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// ReturnButton
//
this.ReturnButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ReturnButton.BackgroundImage")));
this.ReturnButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ReturnButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.ReturnButton.FlatAppearance.BorderColor = System.Drawing.Color.PaleGoldenrod;
this.ReturnButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ReturnButton.Location = new System.Drawing.Point(6, 0);
this.ReturnButton.Name = "ReturnButton";
this.ReturnButton.Size = new System.Drawing.Size(25, 26);
this.ReturnButton.TabIndex = 30;
this.ReturnButton.UseVisualStyleBackColor = true;
this.ReturnButton.Click += new System.EventHandler(this.ReturnButton_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(689, 517);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 24;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// Export
//
this.Export.BackColor = System.Drawing.Color.Purple;
this.Export.Cursor = System.Windows.Forms.Cursors.Hand;
this.Export.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Export.Location = new System.Drawing.Point(529, 575);
this.Export.Name = "Export";
this.Export.Size = new System.Drawing.Size(99, 23);
this.Export.TabIndex = 60;
this.Export.Text = "Экспорт";
this.Export.UseVisualStyleBackColor = false;
this.Export.Click += new System.EventHandler(this.Export_Click);
//
// Search
//
this.Search.Location = new System.Drawing.Point(651, 459);
this.Search.Name = "Search";
this.Search.Size = new System.Drawing.Size(123, 20);
this.Search.TabIndex = 61;
this.Search.TextChanged += new System.EventHandler(this.Search_TextChanged);
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"Login",
"Password",
"Name",
"Surname",
"ALL"});
this.comboBox1.Location = new System.Drawing.Point(335, 571);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(139, 21);
this.comboBox1.TabIndex = 62;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// UserForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(802, 622);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.Search);
this.Controls.Add(this.Export);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.Obnovlenie);
this.Controls.Add(this.Udalenie);
this.Controls.Add(this.AddButton);
this.Controls.Add(this.Redactirovanie);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.ReturnButton);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "UserForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Любимчик";
this.Load += new System.EventHandler(this.UserForm_Load);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.UserForm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UserForm_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label HideButton;
private System.Windows.Forms.Label CloseButton;
private System.Windows.Forms.Button ReturnButton;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button Redactirovanie;
private System.Windows.Forms.Button AddButton;
private System.Windows.Forms.Button Udalenie;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button Obnovlenie;
private System.Windows.Forms.Button Export;
private System.Windows.Forms.TextBox Search;
private System.Windows.Forms.ComboBox comboBox1;
}
}

View File

@ -0,0 +1,180 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using Excel = Microsoft.Office.Interop.Excel;
namespace KursovayaDvornikovAM
{
public partial class UserForm : Form
{
public UserForm()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void ReturnButton_Click(object sender, EventArgs e)
{
this.Hide();
MainForm mainForm = new MainForm();
mainForm.Show();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void UserForm_Load(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idPolzovatel,Login,Password,Name,Surname FROM `ISPr24-37_DvornikovAM_Kursovaya`.Polzovatel ;");
dataGridView1.DataSource = data;
dataGridView1.DataSource = data;
dataGridView1.AllowUserToAddRows = false;
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void HideButton_MouseEnter(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
Point lastPoint;
private void UserForm_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void UserForm_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void label4_Click(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
//Добавление
private void AddButton_Click(object sender, EventArgs e)
{
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == "") || (textBox4.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("insert into Polzovatel (`Login`,`Password`,`Name`,`Surname`) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')");
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
}
}
//Редактирование
private void Redactirovanie_Click(object sender, EventArgs e)
{
string id = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == "") || (textBox4.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("UPDATE Polzovatel SET Login='" + textBox1.Text + "',Password='" + textBox2.Text + "',Name='" + textBox3.Text + "',Surname='" + textBox4.Text + "' WHERE idPolzovatel='" + id + "'");
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
}
}
//Удаление
private void Udalenie_Click(object sender, EventArgs e)
{
DataTable data = DBconnection.Select(@"DELETE FROM `ISPr24-37_DvornikovAM_Kursovaya`.Polzovatel WHERE idPolzovatel='" + dataGridView1.SelectedRows[0].Cells[0].Value.ToString() + "';");
data = DBconnection.Select("SELECT idPolzovatel,Login,Password,Name,Surname FROM `ISPr24-37_DvornikovAM_Kursovaya`.Polzovatel;");
dataGridView1.DataSource = data;
}
private void Obnovlenie_Click(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idPolzovatel,Login,Password,Name,Surname FROM `ISPr24-37_DvornikovAM_Kursovaya`.Polzovatel;");
dataGridView1.DataSource = null;
dataGridView1.DataSource = data;
}
private void Export_Click(object sender, EventArgs e)
{
Excel.Application exApp = new Excel.Application();
exApp.Workbooks.Add();
Excel.Worksheet worksheet = (Excel.Worksheet)exApp.ActiveSheet;
int i, j;
for (i = 0; i <= dataGridView1.RowCount - 1; i++)
{
for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
{
worksheet.Cells[i + 1, j + 1] = dataGridView1[j, i].Value.ToString();
}
}
exApp.Visible = true;
}
private void Search_TextChanged(object sender, EventArgs e)
{
(dataGridView1.DataSource as DataTable).DefaultView.RowFilter = $"Name LIKE '%{Search.Text}%'";
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
dataGridView1.DataSource = DBconnection.Select("SELECT Login,Password,Name,Surname FROM Polzovatel order by " + comboBox1.SelectedItem);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,352 @@
namespace KursovayaDvornikovAM
{
partial class WarehouseForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WarehouseForm));
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.HideButton = new System.Windows.Forms.Label();
this.CloseButton = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Dobavlenie = new System.Windows.Forms.Button();
this.Redactirovanie = new System.Windows.Forms.Button();
this.Udalenie = new System.Windows.Forms.Button();
this.Obnovlenie = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.ReturnButton = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.Export = new System.Windows.Forms.Button();
this.Search = new System.Windows.Forms.TextBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Font = new System.Drawing.Font("Comic Sans MS", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.ForeColor = System.Drawing.Color.DarkOliveGreen;
this.label3.Location = new System.Drawing.Point(362, 60);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(85, 35);
this.label3.TabIndex = 29;
this.label3.Text = "Склад";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label3.Click += new System.EventHandler(this.label3_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.ForeColor = System.Drawing.Color.ForestGreen;
this.label1.Location = new System.Drawing.Point(323, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(156, 38);
this.label1.TabIndex = 28;
this.label1.Text = "Любимчик";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// HideButton
//
this.HideButton.AutoSize = true;
this.HideButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.HideButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.HideButton.Location = new System.Drawing.Point(754, 0);
this.HideButton.Name = "HideButton";
this.HideButton.Size = new System.Drawing.Size(18, 20);
this.HideButton.TabIndex = 30;
this.HideButton.Text = "_";
this.HideButton.Click += new System.EventHandler(this.HideButton_Click);
this.HideButton.MouseEnter += new System.EventHandler(this.HideButton_MouseEnter);
this.HideButton.MouseLeave += new System.EventHandler(this.HideButton_MouseLeave);
//
// CloseButton
//
this.CloseButton.AutoSize = true;
this.CloseButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.CloseButton.Location = new System.Drawing.Point(778, 0);
this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(20, 20);
this.CloseButton.TabIndex = 31;
this.CloseButton.Text = "X";
this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
this.CloseButton.MouseEnter += new System.EventHandler(this.CloseButton_MouseEnter);
this.CloseButton.MouseLeave += new System.EventHandler(this.CloseButton_MouseLeave);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(63, 115);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(675, 314);
this.dataGridView1.TabIndex = 33;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
//
// Dobavlenie
//
this.Dobavlenie.BackColor = System.Drawing.Color.Lime;
this.Dobavlenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Dobavlenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Dobavlenie.Location = new System.Drawing.Point(491, 457);
this.Dobavlenie.Name = "Dobavlenie";
this.Dobavlenie.Size = new System.Drawing.Size(99, 23);
this.Dobavlenie.TabIndex = 38;
this.Dobavlenie.Text = "Добавить";
this.Dobavlenie.UseVisualStyleBackColor = false;
this.Dobavlenie.Click += new System.EventHandler(this.Dobavlenie_Click);
//
// Redactirovanie
//
this.Redactirovanie.BackColor = System.Drawing.Color.Cyan;
this.Redactirovanie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Redactirovanie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Redactirovanie.Location = new System.Drawing.Point(491, 486);
this.Redactirovanie.Name = "Redactirovanie";
this.Redactirovanie.Size = new System.Drawing.Size(99, 23);
this.Redactirovanie.TabIndex = 39;
this.Redactirovanie.Text = "Редактировать";
this.Redactirovanie.UseVisualStyleBackColor = false;
this.Redactirovanie.Click += new System.EventHandler(this.Redactirovanie_Click);
//
// Udalenie
//
this.Udalenie.BackColor = System.Drawing.Color.Red;
this.Udalenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Udalenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Udalenie.Location = new System.Drawing.Point(491, 515);
this.Udalenie.Name = "Udalenie";
this.Udalenie.Size = new System.Drawing.Size(99, 23);
this.Udalenie.TabIndex = 40;
this.Udalenie.Text = "Удалить";
this.Udalenie.UseVisualStyleBackColor = false;
this.Udalenie.Click += new System.EventHandler(this.Udalenie_Click);
//
// Obnovlenie
//
this.Obnovlenie.BackColor = System.Drawing.Color.Yellow;
this.Obnovlenie.Cursor = System.Windows.Forms.Cursors.Hand;
this.Obnovlenie.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Obnovlenie.Location = new System.Drawing.Point(491, 544);
this.Obnovlenie.Name = "Obnovlenie";
this.Obnovlenie.Size = new System.Drawing.Size(99, 23);
this.Obnovlenie.TabIndex = 41;
this.Obnovlenie.Text = "Обновить";
this.Obnovlenie.UseVisualStyleBackColor = false;
this.Obnovlenie.Click += new System.EventHandler(this.Obnovlenie_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(223, 480);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(242, 20);
this.textBox1.TabIndex = 51;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(223, 506);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(242, 20);
this.textBox2.TabIndex = 52;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(223, 532);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(242, 20);
this.textBox3.TabIndex = 53;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(43, 480);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(121, 23);
this.label2.TabIndex = 55;
this.label2.Text = "Номер склада";
this.label2.Click += new System.EventHandler(this.label2_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(43, 506);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(57, 23);
this.label4.TabIndex = 56;
this.label4.Text = "Адрес";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label5.Location = new System.Drawing.Point(43, 529);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(88, 23);
this.label5.TabIndex = 57;
this.label5.Text = "Описание";
//
// ReturnButton
//
this.ReturnButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ReturnButton.BackgroundImage")));
this.ReturnButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ReturnButton.Cursor = System.Windows.Forms.Cursors.Hand;
this.ReturnButton.FlatAppearance.BorderColor = System.Drawing.Color.PaleGoldenrod;
this.ReturnButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ReturnButton.Location = new System.Drawing.Point(6, 0);
this.ReturnButton.Name = "ReturnButton";
this.ReturnButton.Size = new System.Drawing.Size(25, 26);
this.ReturnButton.TabIndex = 32;
this.ReturnButton.UseVisualStyleBackColor = true;
this.ReturnButton.Click += new System.EventHandler(this.ReturnButton_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(689, 509);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(111, 104);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 27;
this.pictureBox1.TabStop = false;
//
// Export
//
this.Export.BackColor = System.Drawing.Color.Purple;
this.Export.Cursor = System.Windows.Forms.Cursors.Hand;
this.Export.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Export.Location = new System.Drawing.Point(491, 573);
this.Export.Name = "Export";
this.Export.Size = new System.Drawing.Size(99, 23);
this.Export.TabIndex = 60;
this.Export.Text = "Экспорт";
this.Export.UseVisualStyleBackColor = false;
this.Export.Click += new System.EventHandler(this.Export_Click);
//
// Search
//
this.Search.Location = new System.Drawing.Point(615, 457);
this.Search.Name = "Search";
this.Search.Size = new System.Drawing.Size(123, 20);
this.Search.TabIndex = 61;
this.Search.TextChanged += new System.EventHandler(this.Search_TextChanged);
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"Nomer_Sklada",
"Adress",
"Opisanie",
"ALL"});
this.comboBox1.Location = new System.Drawing.Point(326, 558);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(139, 21);
this.comboBox1.TabIndex = 62;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// WarehouseForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.PaleGoldenrod;
this.ClientSize = new System.Drawing.Size(802, 613);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.Search);
this.Controls.Add(this.Export);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.Obnovlenie);
this.Controls.Add(this.Udalenie);
this.Controls.Add(this.Redactirovanie);
this.Controls.Add(this.Dobavlenie);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.ReturnButton);
this.Controls.Add(this.CloseButton);
this.Controls.Add(this.HideButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "WarehouseForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Любимчик";
this.Load += new System.EventHandler(this.WarehouseForm_Load);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.WarehouseForm_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.WarehouseForm_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label HideButton;
private System.Windows.Forms.Label CloseButton;
private System.Windows.Forms.Button ReturnButton;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button Dobavlenie;
private System.Windows.Forms.Button Redactirovanie;
private System.Windows.Forms.Button Udalenie;
private System.Windows.Forms.Button Obnovlenie;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button Export;
private System.Windows.Forms.TextBox Search;
private System.Windows.Forms.ComboBox comboBox1;
}
}

View File

@ -0,0 +1,174 @@
using MySql.Data.MySqlClient;
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 static System.Windows.Forms.VisualStyles.VisualStyleElement;
using Excel = Microsoft.Office.Interop.Excel;
namespace KursovayaDvornikovAM
{
public partial class WarehouseForm : Form
{
public WarehouseForm()
{
InitializeComponent();
}
private void label3_Click(object sender, EventArgs e)
{
}
private void ReturnButton_Click(object sender, EventArgs e)
{
this.Hide();
MainForm mainForm = new MainForm();
mainForm.Show();
}
private void WarehouseForm_Load(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idSklad,Nomer_Sklada,Adress,Opisanie FROM `ISPr24-37_DvornikovAM_Kursovaya`.Sklad ;");
dataGridView1.DataSource = data;
dataGridView1.DataSource = data;
dataGridView1.AllowUserToAddRows = false;
}
private void CloseButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void HideButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void HideButton_MouseEnter(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Red;
}
private void HideButton_MouseLeave(object sender, EventArgs e)
{
HideButton.ForeColor = Color.Black;
}
private void CloseButton_MouseEnter(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Red;
}
private void CloseButton_MouseLeave(object sender, EventArgs e)
{
CloseButton.ForeColor = Color.Black;
}
Point lastPoint;
private void WarehouseForm_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void WarehouseForm_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
private void label4_Click(object sender, EventArgs e)
{
}
private void label2_Click(object sender, EventArgs e)
{
}
//добавление
private void Dobavlenie_Click(object sender, EventArgs e)
{
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("insert into Sklad (`Nomer_Sklada`,`Adress`,`Opisanie`) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text +"')");
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = "";
}
}
//редактирование
private void Redactirovanie_Click(object sender, EventArgs e)
{
string id = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
if ((textBox1.Text == "") || (textBox2.Text == "") || (textBox3.Text == ""))
MessageBox.Show("Заполните все поля");
else
{
DBconnection.Select("UPDATE Sklad SET Nomer_Sklada='" + textBox1.Text + "',Adress='" + textBox2.Text + "',Opisanie='" + textBox3.Text +"' WHERE idSklad='" + id + "'");
textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = "";
}
}
//удаление
private void Udalenie_Click(object sender, EventArgs e)
{
DataTable data = DBconnection.Select(@"DELETE FROM `ISPr24-37_DvornikovAM_Kursovaya`.Sklad WHERE idSklad='" + dataGridView1.SelectedRows[0].Cells[0].Value.ToString() + "';");
data = DBconnection.Select("SELECT idSklad,Nomer_Sklada,Adress,Opisanie FROM `ISPr24-37_DvornikovAM_Kursovaya`.Sklad;");
dataGridView1.DataSource = data;
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
//Обновление
private void Obnovlenie_Click(object sender, EventArgs e)
{
DataTable data = DBconnection.Select("SELECT idSklad,Nomer_Sklada,Adress,Opisanie FROM `ISPr24-37_DvornikovAM_Kursovaya`.Sklad;");
dataGridView1.DataSource = null;
dataGridView1.DataSource = data;
}
private void Export_Click(object sender, EventArgs e)
{
Excel.Application exApp = new Excel.Application();
exApp.Workbooks.Add();
Excel.Worksheet worksheet = (Excel.Worksheet)exApp.ActiveSheet;
int i, j;
for (i = 0; i <= dataGridView1.RowCount - 1; i++)
{
for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
{
worksheet.Cells[i + 1, j + 1] = dataGridView1[j, i].Value.ToString();
}
}
exApp.Visible = true;
}
private void Search_TextChanged(object sender, EventArgs e)
{
(dataGridView1.DataSource as DataTable).DefaultView.RowFilter = $"Adress LIKE '%{Search.Text}%'";
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
dataGridView1.DataSource = DBconnection.Select("SELECT Nomer_Sklada,Adress,Opisanie FROM Sklad order by " + comboBox1.SelectedItem);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle.Cryptography" version="2.2.1" targetFramework="net48" />
<package id="Google.Protobuf" version="3.25.1" targetFramework="net48" />
<package id="K4os.Compression.LZ4" version="1.3.5" targetFramework="net48" />
<package id="K4os.Compression.LZ4.Streams" version="1.3.5" targetFramework="net48" />
<package id="K4os.Hash.xxHash" version="1.0.8" targetFramework="net48" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net48" />
<package id="MySql.Data" version="8.4.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="4.4.1" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="7.0.2" targetFramework="net48" />
<package id="System.IO.Pipelines" version="5.0.2" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
<package id="ZstdSharp.Port" version="0.7.1" targetFramework="net48" />
</packages>