Ну, я пытался

This commit is contained in:
ivans 2024-11-13 00:12:08 +04:00
parent 191dd5dfd3
commit 7815fb6477
23 changed files with 892 additions and 33 deletions

View File

@ -12,19 +12,19 @@ public class Flight
public DateTime DatetimeDeparture { get; private set; }
public DateTime ArrivalTime { get; private set; }
public DateTime DateTimeArrival { get; private set; }
public string ArrivalLocation { get; private set; } = string.Empty;
public int TicketPrice { get; private set; }
public static Flight CreateFlight(int id, DateTime dateTimeDeparture, DateTime arrivalTime, string arrivalLocation, int ticketPrice)
public static Flight CreateFlight(int id, DateTime dateTimeDeparture, DateTime dateTimeArrival, string arrivalLocation, int ticketPrice)
{
return new Flight
{
Id = id,
DatetimeDeparture = dateTimeDeparture,
ArrivalTime = arrivalTime,
DateTimeArrival = dateTimeArrival,
ArrivalLocation = arrivalLocation,
TicketPrice = ticketPrice
};

View File

@ -12,4 +12,13 @@ public class Ticket
public DateTime DateBuy { get; private set; }
public static Ticket CreateTicket(int id)
{
return new Ticket
{
Id = id,
DateBuy = DateTime.Now,
};
}
}

View File

@ -28,12 +28,105 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "Form1";
menuStrip = new MenuStrip();
справочникиToolStripMenuItem = new ToolStripMenuItem();
полетToolStripMenuItem = new ToolStripMenuItem();
операцииToolStripMenuItem = new ToolStripMenuItem();
отчетыToolStripMenuItem = new ToolStripMenuItem();
пассажирыToolStripMenuItem = new ToolStripMenuItem();
самолетыToolStripMenuItem = new ToolStripMenuItem();
билетыToolStripMenuItem = new ToolStripMenuItem();
подготовительныеРаботыToolStripMenuItem = new ToolStripMenuItem();
menuStrip.SuspendLayout();
SuspendLayout();
//
// menuStrip
//
menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, операцииToolStripMenuItem, отчетыToolStripMenuItem });
menuStrip.Location = new Point(0, 0);
menuStrip.Name = "menuStrip";
menuStrip.Size = new Size(784, 24);
menuStrip.TabIndex = 0;
menuStrip.Text = "menuStrip";
//
// справочникиToolStripMenuItem
//
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { полетToolStripMenuItem, пассажирыToolStripMenuItem, самолетыToolStripMenuItem, билетыToolStripMenuItem });
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
справочникиToolStripMenuItem.Size = new Size(94, 20);
справочникиToolStripMenuItem.Text = "Справочники";
//
// полетToolStripMenuItem
//
полетToolStripMenuItem.Name = "полетToolStripMenuItem";
полетToolStripMenuItem.Size = new Size(180, 22);
полетToolStripMenuItem.Text = "Полеты";
//
// операцииToolStripMenuItem
//
операцииToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { подготовительныеРаботыToolStripMenuItem });
операцииToolStripMenuItem.Name = "операцииToolStripMenuItem";
операцииToolStripMenuItem.Size = new Size(75, 20);
операцииToolStripMenuItem.Text = "Операции";
//
// отчетыToolStripMenuItem
//
отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
отчетыToolStripMenuItem.Size = new Size(60, 20);
отчетыToolStripMenuItem.Text = "Отчеты";
//
// пассажирыToolStripMenuItem
//
пассажирыToolStripMenuItem.Name = "пассажирыToolStripMenuItem";
пассажирыToolStripMenuItem.Size = new Size(180, 22);
пассажирыToolStripMenuItem.Text = "Пассажиры";
//
// самолетыToolStripMenuItem
//
самолетыToolStripMenuItem.Name = "самолетыToolStripMenuItem";
самолетыToolStripMenuItem.Size = new Size(180, 22);
самолетыToolStripMenuItem.Text = "Самолеты";
//
// билетыToolStripMenuItem
//
билетыToolStripMenuItem.Name = "билетыToolStripMenuItem";
билетыToolStripMenuItem.Size = new Size(180, 22);
билетыToolStripMenuItem.Text = "Билеты";
//
// подготовительныеРаботыToolStripMenuItem
//
подготовительныеРаботыToolStripMenuItem.Name = "подготовительныеРаботыToolStripMenuItem";
подготовительныеРаботыToolStripMenuItem.Size = new Size(223, 22);
подготовительныеРаботыToolStripMenuItem.Text = "Подготовительные работы";
//
// FormAirline
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackgroundImage = Properties.Resources.scale_1200;
BackgroundImageLayout = ImageLayout.Stretch;
ClientSize = new Size(784, 411);
Controls.Add(menuStrip);
MainMenuStrip = menuStrip;
Name = "FormAirline";
StartPosition = FormStartPosition.CenterScreen;
Text = "Авиакомпания";
menuStrip.ResumeLayout(false);
menuStrip.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion
private MenuStrip menuStrip;
private ToolStripMenuItem справочникиToolStripMenuItem;
private ToolStripMenuItem полетToolStripMenuItem;
private ToolStripMenuItem операцииToolStripMenuItem;
private ToolStripMenuItem отчетыToolStripMenuItem;
private ToolStripMenuItem пассажирыToolStripMenuItem;
private ToolStripMenuItem самолетыToolStripMenuItem;
private ToolStripMenuItem билетыToolStripMenuItem;
private ToolStripMenuItem подготовительныеРаботыToolStripMenuItem;
}
}

View File

@ -6,5 +6,6 @@ namespace ProjectAirline
{
InitializeComponent();
}
}
}

View File

@ -1,17 +1,17 @@
<?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
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>
@ -26,36 +26,36 @@
<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
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
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
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
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
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
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
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,142 @@
namespace ProjectAirline.Forms
{
partial class FormFlight
{
/// <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()
{
label1 = new Label();
label2 = new Label();
label3 = new Label();
textBox1 = new TextBox();
label4 = new Label();
numericUpDown1 = new NumericUpDown();
buttonFlightSave = new Button();
buttonFlightCancel = new Button();
((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(32, 35);
label1.Name = "label1";
label1.Size = new Size(74, 15);
label1.TabIndex = 0;
label1.Text = "Дата вылета";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(32, 71);
label2.Name = "label2";
label2.Size = new Size(90, 15);
label2.TabIndex = 1;
label2.Text = "Дата прибытия";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(32, 109);
label3.Name = "label3";
label3.Size = new Size(100, 15);
label3.TabIndex = 2;
label3.Text = "Место прибытия";
//
// textBox1
//
textBox1.Location = new Point(145, 106);
textBox1.Name = "textBox1";
textBox1.Size = new Size(100, 23);
textBox1.TabIndex = 3;
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(32, 148);
label4.Name = "label4";
label4.Size = new Size(76, 15);
label4.TabIndex = 4;
label4.Text = "Цена билета";
//
// numericUpDown1
//
numericUpDown1.Location = new Point(145, 146);
numericUpDown1.Name = "numericUpDown1";
numericUpDown1.Size = new Size(100, 23);
numericUpDown1.TabIndex = 5;
//
// buttonFlightSave
//
buttonFlightSave.Location = new Point(30, 223);
buttonFlightSave.Name = "buttonFlightSave";
buttonFlightSave.Size = new Size(75, 23);
buttonFlightSave.TabIndex = 6;
buttonFlightSave.Text = "Сохранить";
buttonFlightSave.UseVisualStyleBackColor = true;
//
// buttonFlightCancel
//
buttonFlightCancel.Location = new Point(152, 223);
buttonFlightCancel.Name = "buttonFlightCancel";
buttonFlightCancel.Size = new Size(75, 23);
buttonFlightCancel.TabIndex = 7;
buttonFlightCancel.Text = "Отмена";
buttonFlightCancel.UseVisualStyleBackColor = true;
//
// FormFlight
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(273, 282);
Controls.Add(buttonFlightCancel);
Controls.Add(buttonFlightSave);
Controls.Add(numericUpDown1);
Controls.Add(label4);
Controls.Add(textBox1);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Name = "FormFlight";
StartPosition = FormStartPosition.CenterParent;
Text = "Полет";
((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private Label label1;
private Label label2;
private Label label3;
private TextBox textBox1;
private Label label4;
private NumericUpDown numericUpDown1;
private Button buttonFlightSave;
private Button buttonFlightCancel;
}
}

View File

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

View File

@ -0,0 +1,120 @@
<?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,3 +1,7 @@
using ProjectAirline.Repositories;
using ProjectAirline.Repositories.Implementations;
using Unity;
namespace ProjectAirline
{
internal static class Program
@ -11,7 +15,20 @@ namespace ProjectAirline
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new FormAirline());
Application.Run(CreateContainer().Resolve<FormAirline>());
}
private static IUnityContainer CreateContainer()
{
var container = new UnityContainer();
container.RegisterType<IFlightRepository, FlightRepository>();
container.RegisterType<IPassangerRepository, PassangerRepository>();
container.RegisterType<IPlaneRepository, PlaneRepository>();
container.RegisterType<IPreparatoryWorkRepository, PreparatoryWorkRepository>();
container.RegisterType<ITicketRepository, TicketRepository>();
return container;
}
}
}

View File

@ -8,4 +8,23 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Unity" Version="5.11.10" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ProjectAirline.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("ProjectAirline.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 scale_1200 {
get {
object obj = ResourceManager.GetObject("scale_1200", 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="scale_1200" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\scale_1200.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -0,0 +1,21 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories;
public interface IFlightRepository
{
IEnumerable<Flight> ReadFlights();
Flight ReadFlightById(int id);
void CreateFlight(Flight flight);
void UpdateFlight(Flight flight);
void DeleteFlight(int id);
}

View File

@ -0,0 +1,21 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories;
public interface IPassangerRepository
{
IEnumerable<Passanger> ReadPassangers();
Passanger ReadPassangerById(int id);
void CreatePassanger(Passanger passanger);
void UpdatePassanger(Passanger passanger);
void DeletePassanger(int id);
}

View File

@ -0,0 +1,21 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories;
public interface IPlaneRepository
{
IEnumerable<Plane> ReadPlanes();
Plane ReadPlaneById(int id);
void CreatePlane(Plane plane);
void UpdatePlane(Plane plane);
void DeletePlane(int id);
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories;
public interface IPreparatoryWorkRepository
{
}

View File

@ -0,0 +1,21 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories;
public interface ITicketRepository
{
IEnumerable<Ticket> ReadTickets();
Ticket ReadTicketById(int id);
void CreateTicket(Ticket ticket);
void UpdateTicket(Ticket ticket);
void DeleteTicket(int id);
}

View File

@ -0,0 +1,33 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories.Implementations;
public class FlightRepository : IFlightRepository
{
public void CreateFlight(Flight flight)
{
}
public void DeleteFlight(int id)
{
}
public Flight ReadFlightById(int id)
{
return Flight.CreateFlight(0, DateTime.Now, DateTime.Now, string.Empty, 0);
}
public IEnumerable<Flight> ReadFlights()
{
return [];
}
public void UpdateFlight(Flight flight)
{
}
}

View File

@ -0,0 +1,33 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories.Implementations;
public class PassangerRepository : IPassangerRepository
{
public void CreatePassanger(Passanger passanger)
{
}
public void DeletePassanger(int id)
{
}
public Passanger ReadPassangerById(int id)
{
return Passanger.CreatePassanger(0, string.Empty);
}
public IEnumerable<Passanger> ReadPassangers()
{
return [];
}
public void UpdatePassanger(Passanger passanger)
{
}
}

View File

@ -0,0 +1,32 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories.Implementations;
public class PlaneRepository : IPlaneRepository
{
public void CreatePlane(Plane plane)
{
}
public void DeletePlane(int id)
{
}
public Plane ReadPlaneById(int id)
{
return Plane.CreatePlane(0, string.Empty, 0);
}
public IEnumerable<Plane> ReadPlanes()
{
return [];
}
public void UpdatePlane(Plane plane)
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories.Implementations;
public class PreparatoryWorkRepository : IPreparatoryWorkRepository
{
}

View File

@ -0,0 +1,33 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories.Implementations;
public class TicketRepository : ITicketRepository
{
public void CreateTicket(Ticket ticket)
{
}
public void DeleteTicket(int id)
{
}
public Ticket ReadTicketById(int id)
{
return Ticket.CreateTicket(0);
}
public IEnumerable<Ticket> ReadTickets()
{
return [];
}
public void UpdateTicket(Ticket ticket)
{
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB