This commit is contained in:
kagbie3nn@mail.ru 2024-05-30 21:16:40 +04:00
parent 20dbdc8aa2
commit 391cf3746d
17 changed files with 2 additions and 1657 deletions

View File

@ -1,85 +0,0 @@
namespace ZooView
{
partial class ClientPreserves
{
/// <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()
{
dataGridView1 = new DataGridView();
PreserveId = new DataGridViewTextBoxColumn();
PreserveName = new DataGridViewTextBoxColumn();
PreserveCost = new DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
SuspendLayout();
//
// dataGridView1
//
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView1.Columns.AddRange(new DataGridViewColumn[] { PreserveId, PreserveName, PreserveCost });
dataGridView1.Location = new Point(18, 12);
dataGridView1.Name = "dataGridView1";
dataGridView1.RowTemplate.Height = 25;
dataGridView1.Size = new Size(240, 426);
dataGridView1.TabIndex = 1;
//
// PreserveId
//
PreserveId.HeaderText = "id";
PreserveId.Name = "PreserveId";
PreserveId.Visible = false;
//
// PreserveName
//
PreserveName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
PreserveName.HeaderText = "Название";
PreserveName.Name = "PreserveName";
//
// PreserveCost
//
PreserveCost.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
PreserveCost.HeaderText = "Стоимость";
PreserveCost.Name = "PreserveCost";
//
// ClientPreserves
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(277, 450);
Controls.Add(dataGridView1);
Name = "ClientPreserves";
Text = "Заповедники";
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
ResumeLayout(false);
}
#endregion
private DataGridView dataGridView1;
private DataGridViewTextBoxColumn PreserveId;
private DataGridViewTextBoxColumn PreserveName;
private DataGridViewTextBoxColumn PreserveCost;
}
}

View File

@ -1,20 +0,0 @@
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 ZooView
{
public partial class ClientPreserves : Form
{
public ClientPreserves()
{
InitializeComponent();
}
}
}

View File

@ -1,129 +0,0 @@
<?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>
<metadata name="PreserveId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreserveName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreserveCost.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -1,129 +0,0 @@
namespace ZooView
{
partial class FormClientMain
{
/// <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()
{
menuStrip1 = new MenuStrip();
создатьМаршрутToolStripMenuItem = new ToolStripMenuItem();
оплатитьМаршрутToolStripMenuItem = new ToolStripMenuItem();
получитьОтчетToolStripMenuItem = new ToolStripMenuItem();
вДокументToolStripMenuItem = new ToolStripMenuItem();
наПочтуToolStripMenuItem = new ToolStripMenuItem();
button1 = new Button();
button2 = new Button();
menuStrip1.SuspendLayout();
SuspendLayout();
//
// menuStrip1
//
menuStrip1.Items.AddRange(new ToolStripItem[] { создатьМаршрутToolStripMenuItem, оплатитьМаршрутToolStripMenuItem, получитьОтчетToolStripMenuItem });
menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new Size(800, 24);
menuStrip1.TabIndex = 0;
menuStrip1.Text = "menuStrip1";
//
// создатьМаршрутToolStripMenuItem
//
создатьМаршрутToolStripMenuItem.Name = "создатьМаршрутToolStripMenuItem";
создатьМаршрутToolStripMenuItem.Size = new Size(116, 20);
создатьМаршрутToolStripMenuItem.Text = "Создать маршрут";
создатьМаршрутToolStripMenuItem.Click += создатьМаршрутToolStripMenuItem_Click;
//
// оплатитьМаршрутToolStripMenuItem
//
оплатитьМаршрутToolStripMenuItem.Name = "оплатитьМаршрутToolStripMenuItem";
оплатитьМаршрутToolStripMenuItem.Size = new Size(125, 20);
оплатитьМаршрутToolStripMenuItem.Text = "Оплатить маршрут";
//
// получитьОтчетToolStripMenuItem
//
получитьОтчетToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { вДокументToolStripMenuItem, наПочтуToolStripMenuItem });
получитьОтчетToolStripMenuItem.Name = "получитьОтчетToolStripMenuItem";
получитьОтчетToolStripMenuItem.Size = new Size(106, 20);
получитьОтчетToolStripMenuItem.Text = "Получить отчет";
//
// вДокументToolStripMenuItem
//
вДокументToolStripMenuItem.Name = "вДокументToolStripMenuItem";
вДокументToolStripMenuItem.Size = new Size(136, 22);
вДокументToolStripMenuItem.Text = "В документ";
//
// наПочтуToolStripMenuItem
//
наПочтуToolStripMenuItem.Name = аПочтуToolStripMenuItem";
наПочтуToolStripMenuItem.Size = new Size(136, 22);
наПочтуToolStripMenuItem.Text = "На почту";
//
// button1
//
button1.Location = new Point(156, 186);
button1.Name = "button1";
button1.Size = new Size(75, 23);
button1.TabIndex = 1;
button1.Text = "button1";
button1.UseVisualStyleBackColor = true;
//
// button2
//
button2.Location = new Point(510, 192);
button2.Name = "button2";
button2.Size = new Size(75, 23);
button2.TabIndex = 2;
button2.Text = "button2";
button2.UseVisualStyleBackColor = true;
//
// FormClientMain
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(button2);
Controls.Add(button1);
Controls.Add(menuStrip1);
MainMenuStrip = menuStrip1;
Name = "FormClientMain";
Text = "FormClientMain";
menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion
private MenuStrip menuStrip1;
private ToolStripMenuItem создатьМаршрутToolStripMenuItem;
private ToolStripMenuItem оплатитьМаршрутToolStripMenuItem;
private ToolStripMenuItem получитьОтчетToolStripMenuItem;
private ToolStripMenuItem вДокументToolStripMenuItem;
private ToolStripMenuItem наПочтуToolStripMenuItem;
private Button button1;
private Button button2;
}
}

View File

@ -1,30 +0,0 @@
using ZooView;
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 ZooView
{
public partial class FormClientMain : Form
{
public FormClientMain()
{
InitializeComponent();
}
private void создатьМаршрутToolStripMenuItem_Click(object sender, EventArgs e)
{
var service = Program.ServiceProvider?.GetService(typeof(FormRoutes));
if (service is FormRoutes form)
{
form.ShowDialog();
}
}
}
}

View File

@ -1,123 +0,0 @@
<?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>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -1,115 +0,0 @@
namespace ZooView
{
partial class Preserve
{
/// <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()
{
buttonAdd = new Button();
buttonCancel = new Button();
label1 = new Label();
textBoxPreserve = new TextBox();
textBox1 = new TextBox();
label2 = new Label();
SuspendLayout();
//
// buttonAdd
//
buttonAdd.Location = new Point(215, 100);
buttonAdd.Name = "buttonAdd";
buttonAdd.Size = new Size(75, 23);
buttonAdd.TabIndex = 0;
buttonAdd.Text = "Добавить";
buttonAdd.UseVisualStyleBackColor = true;
//
// buttonCancel
//
buttonCancel.Location = new Point(309, 100);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(75, 23);
buttonCancel.TabIndex = 1;
buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true;
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(12, 20);
label1.Name = "label1";
label1.Size = new Size(175, 15);
label1.TabIndex = 2;
label1.Text = "Введите название заповедника";
//
// textBoxPreserve
//
textBoxPreserve.Location = new Point(193, 17);
textBoxPreserve.Name = "textBoxPreserve";
textBoxPreserve.Size = new Size(202, 23);
textBoxPreserve.TabIndex = 3;
//
// textBox1
//
textBox1.Location = new Point(193, 46);
textBox1.Name = "textBox1";
textBox1.Size = new Size(110, 23);
textBox1.TabIndex = 4;
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(12, 49);
label2.Name = "label2";
label2.Size = new Size(180, 15);
label2.TabIndex = 5;
label2.Text = "Укажите стоимость посещения";
//
// Preserve
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(407, 135);
Controls.Add(label2);
Controls.Add(textBox1);
Controls.Add(textBoxPreserve);
Controls.Add(label1);
Controls.Add(buttonCancel);
Controls.Add(buttonAdd);
Name = "Preserve";
Text = "Создать заповедник";
ResumeLayout(false);
PerformLayout();
}
#endregion
private Button buttonAdd;
private Button buttonCancel;
private Label label1;
private TextBox textBoxPreserve;
private TextBox textBox1;
private Label label2;
}
}

View File

@ -1,20 +0,0 @@
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 ZooView
{
public partial class Preserve : Form
{
public Preserve()
{
InitializeComponent();
}
}
}

View File

@ -1,120 +0,0 @@
<?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>
</root>

View File

@ -1,133 +0,0 @@
namespace ZooView
{
partial class Preserves
{
/// <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()
{
dataGridView1 = new DataGridView();
buttonAddPreserve = new Button();
buttonUpdPreserves = new Button();
buttonDelsPreserves = new Button();
buttonRefPreserves = new Button();
PreserveId = new DataGridViewTextBoxColumn();
PreserveName = new DataGridViewTextBoxColumn();
PreserveCost = new DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
SuspendLayout();
//
// dataGridView1
//
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView1.Columns.AddRange(new DataGridViewColumn[] { PreserveId, PreserveName, PreserveCost });
dataGridView1.Location = new Point(2, 2);
dataGridView1.Name = "dataGridView1";
dataGridView1.RowTemplate.Height = 25;
dataGridView1.Size = new Size(240, 483);
dataGridView1.TabIndex = 0;
//
// buttonAddPreserve
//
buttonAddPreserve.Location = new Point(248, 29);
buttonAddPreserve.Name = "buttonAddPreserve";
buttonAddPreserve.Size = new Size(129, 37);
buttonAddPreserve.TabIndex = 1;
buttonAddPreserve.Text = "Добавить";
buttonAddPreserve.UseVisualStyleBackColor = true;
//
// buttonUpdPreserves
//
buttonUpdPreserves.Location = new Point(248, 82);
buttonUpdPreserves.Name = "buttonUpdPreserves";
buttonUpdPreserves.Size = new Size(129, 37);
buttonUpdPreserves.TabIndex = 2;
buttonUpdPreserves.Text = "Изменить";
buttonUpdPreserves.UseVisualStyleBackColor = true;
//
// buttonDelsPreserves
//
buttonDelsPreserves.Location = new Point(248, 136);
buttonDelsPreserves.Name = "buttonDelsPreserves";
buttonDelsPreserves.Size = new Size(129, 37);
buttonDelsPreserves.TabIndex = 3;
buttonDelsPreserves.Text = "Удалить";
buttonDelsPreserves.UseVisualStyleBackColor = true;
//
// buttonRefPreserves
//
buttonRefPreserves.Location = new Point(248, 191);
buttonRefPreserves.Name = "buttonRefPreserves";
buttonRefPreserves.Size = new Size(129, 37);
buttonRefPreserves.TabIndex = 4;
buttonRefPreserves.Text = "Обновить";
buttonRefPreserves.UseVisualStyleBackColor = true;
//
// PreserveId
//
PreserveId.HeaderText = "id";
PreserveId.Name = "PreserveId";
PreserveId.Visible = false;
//
// PreserveName
//
PreserveName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
PreserveName.HeaderText = "Название";
PreserveName.Name = "PreserveName";
//
// PreserveCost
//
PreserveCost.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
PreserveCost.HeaderText = "Стоимость";
PreserveCost.Name = "PreserveCost";
//
// Preserves
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(389, 490);
Controls.Add(buttonRefPreserves);
Controls.Add(buttonDelsPreserves);
Controls.Add(buttonUpdPreserves);
Controls.Add(buttonAddPreserve);
Controls.Add(dataGridView1);
Name = "Preserves";
Text = "Заповедники";
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
ResumeLayout(false);
}
#endregion
private DataGridView dataGridView1;
private Button buttonAddPreserve;
private Button buttonUpdPreserves;
private Button buttonDelsPreserves;
private Button buttonRefPreserves;
private DataGridViewTextBoxColumn PreserveId;
private DataGridViewTextBoxColumn PreserveName;
private DataGridViewTextBoxColumn PreserveCost;
}
}

View File

@ -1,20 +0,0 @@
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 ZooView
{
public partial class Preserves : Form
{
public Preserves()
{
InitializeComponent();
}
}
}

View File

@ -1,138 +0,0 @@
<?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>
<metadata name="PreserveId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreserveName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreserveCost.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreserveId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreserveName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreserveCost.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -1,219 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using ZooDataBaseImplement;
#nullable disable
namespace ZooDataBaseImplement.Migrations
{
[DbContext(typeof(ZooDatabase))]
[Migration("20240530120856_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.18")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("ZooDataBaseImplement.Models.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClientFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("EMail")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Employee", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("EmployeeFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Login")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Employees");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Preserve", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int?>("EmployeeId")
.HasColumnType("int");
b.Property<string>("PreserveName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("PreservePrice")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.ToTable("Preserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Route", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<DateTime>("DateFinish")
.HasColumnType("datetime2");
b.Property<DateTime>("DateStart")
.HasColumnType("datetime2");
b.Property<string>("RouteName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("RoutePrice")
.HasColumnType("float");
b.Property<int>("Status")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("Routes");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.RoutePreserve", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("PreserveID")
.HasColumnType("int");
b.Property<int>("RouteID")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PreserveID");
b.HasIndex("RouteID");
b.ToTable("RoutePreserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Preserve", b =>
{
b.HasOne("ZooDataBaseImplement.Models.Employee", null)
.WithMany("Preserves")
.HasForeignKey("EmployeeId");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Route", b =>
{
b.HasOne("ZooDataBaseImplement.Models.Client", "Client")
.WithMany("Routes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.RoutePreserve", b =>
{
b.HasOne("ZooDataBaseImplement.Models.Preserve", "Preserve")
.WithMany("RoutePreserves")
.HasForeignKey("PreserveID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ZooDataBaseImplement.Models.Route", "Route")
.WithMany("Preserves")
.HasForeignKey("RouteID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Preserve");
b.Navigation("Route");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Client", b =>
{
b.Navigation("Routes");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Employee", b =>
{
b.Navigation("Preserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Preserve", b =>
{
b.Navigation("RoutePreserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Route", b =>
{
b.Navigation("Preserves");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,154 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ZooDataBaseImplement.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Clients",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ClientFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
EMail = table.Column<string>(type: "nvarchar(max)", nullable: false),
Password = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Clients", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Employees",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
EmployeeFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
Login = table.Column<string>(type: "nvarchar(max)", nullable: false),
Password = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Employees", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Routes",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ClientId = table.Column<int>(type: "int", nullable: false),
RouteName = table.Column<string>(type: "nvarchar(max)", nullable: false),
RoutePrice = table.Column<double>(type: "float", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
DateStart = table.Column<DateTime>(type: "datetime2", nullable: false),
DateFinish = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Routes", x => x.Id);
table.ForeignKey(
name: "FK_Routes_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Preserves",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
PreserveName = table.Column<string>(type: "nvarchar(max)", nullable: false),
PreservePrice = table.Column<double>(type: "float", nullable: false),
EmployeeId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Preserves", x => x.Id);
table.ForeignKey(
name: "FK_Preserves_Employees_EmployeeId",
column: x => x.EmployeeId,
principalTable: "Employees",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "RoutePreserves",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RouteID = table.Column<int>(type: "int", nullable: false),
PreserveID = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RoutePreserves", x => x.Id);
table.ForeignKey(
name: "FK_RoutePreserves_Preserves_PreserveID",
column: x => x.PreserveID,
principalTable: "Preserves",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RoutePreserves_Routes_RouteID",
column: x => x.RouteID,
principalTable: "Routes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Preserves_EmployeeId",
table: "Preserves",
column: "EmployeeId");
migrationBuilder.CreateIndex(
name: "IX_RoutePreserves_PreserveID",
table: "RoutePreserves",
column: "PreserveID");
migrationBuilder.CreateIndex(
name: "IX_RoutePreserves_RouteID",
table: "RoutePreserves",
column: "RouteID");
migrationBuilder.CreateIndex(
name: "IX_Routes_ClientId",
table: "Routes",
column: "ClientId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RoutePreserves");
migrationBuilder.DropTable(
name: "Preserves");
migrationBuilder.DropTable(
name: "Routes");
migrationBuilder.DropTable(
name: "Employees");
migrationBuilder.DropTable(
name: "Clients");
}
}
}

View File

@ -1,216 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using ZooDataBaseImplement;
#nullable disable
namespace ZooDataBaseImplement.Migrations
{
[DbContext(typeof(ZooDatabase))]
partial class ZooDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.18")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("ZooDataBaseImplement.Models.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClientFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("EMail")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Employee", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("EmployeeFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Login")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Employees");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Preserve", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int?>("EmployeeId")
.HasColumnType("int");
b.Property<string>("PreserveName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("PreservePrice")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.ToTable("Preserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Route", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<DateTime>("DateFinish")
.HasColumnType("datetime2");
b.Property<DateTime>("DateStart")
.HasColumnType("datetime2");
b.Property<string>("RouteName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("RoutePrice")
.HasColumnType("float");
b.Property<int>("Status")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("Routes");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.RoutePreserve", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("PreserveID")
.HasColumnType("int");
b.Property<int>("RouteID")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PreserveID");
b.HasIndex("RouteID");
b.ToTable("RoutePreserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Preserve", b =>
{
b.HasOne("ZooDataBaseImplement.Models.Employee", null)
.WithMany("Preserves")
.HasForeignKey("EmployeeId");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Route", b =>
{
b.HasOne("ZooDataBaseImplement.Models.Client", "Client")
.WithMany("Routes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.RoutePreserve", b =>
{
b.HasOne("ZooDataBaseImplement.Models.Preserve", "Preserve")
.WithMany("RoutePreserves")
.HasForeignKey("PreserveID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ZooDataBaseImplement.Models.Route", "Route")
.WithMany("Preserves")
.HasForeignKey("RouteID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Preserve");
b.Navigation("Route");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Client", b =>
{
b.Navigation("Routes");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Employee", b =>
{
b.Navigation("Preserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Preserve", b =>
{
b.Navigation("RoutePreserves");
});
modelBuilder.Entity("ZooDataBaseImplement.Models.Route", b =>
{
b.Navigation("Preserves");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -8,19 +8,15 @@
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ZooContracts\ZooContracts.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project>

View File

@ -16,7 +16,7 @@ namespace ZooDataBaseImplement
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=.\SQLEXPRESS;Initial Catalog=ZooDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=jurasiczoo;Username=postgres;Password=1212");
}
base.OnConfiguring(optionsBuilder);
}