Compare commits

...

5 Commits
main ... Lab1

Author SHA1 Message Date
a2be1354e8 еЩЕ ВОЗНЯ 2024-11-26 02:13:34 +04:00
f570941eaa revert 9dee8b2be8
revert ffghy
2024-11-26 02:12:11 +04:00
9dee8b2be8 ffghy 2024-11-18 09:25:44 +04:00
7815fb6477 Ну, я пытался 2024-11-13 00:12:08 +04:00
191dd5dfd3 Пошла возня 2024-10-30 11:13:10 +04:00
29 changed files with 1119 additions and 67 deletions

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities.Enums;
public enum PreparatoryWorkStatus
{
None = 0,
Waiting = 1,
InProgress = 2,
Completed = 3,
Canceled = 4
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities.Enums;
[Flags]
public enum TicketStatus
{
None = 0,
Paid = 1,
Canceled = 2,
Refunded = 4
}

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities;
public class Flight
{
public int Id { get; private set; }
public DateTime DatetimeDeparture { 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 dateTimeArrival, string arrivalLocation, int ticketPrice)
{
return new Flight
{
Id = id,
DatetimeDeparture = dateTimeDeparture,
DateTimeArrival = dateTimeArrival,
ArrivalLocation = arrivalLocation,
TicketPrice = ticketPrice
};
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities;
public class Passanger
{
public int Id { get; private set; }
public string Name { get; private set; } = string.Empty;
public static Passanger CreatePassanger(int id, string name)
{
return new Passanger
{
Id = id,
Name = name,
};
}
}

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities;
public class Plane
{
public int Id { get; private set; }
public string Name { get; private set; } = string.Empty;
public int Capacity { get; private set; }
public static Plane CreatePlane(int id, string name, int capacity)
{
return new Plane
{
Id = id,
Name = name,
Capacity = capacity
};
}
}

View File

@ -0,0 +1,30 @@
using ProjectAirline.Entities.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities;
public class PreparatoryWork
{
public int Id { get; private set; }
public DateTime StartDate { get; private set; }
public DateTime EndDate { get; private set; }
public PreparatoryWorkStatus Status { get; private set; }
public static PreparatoryWork CreatePrerapatoryWork(int id, DateTime StartDate, DateTime EndDate, PreparatoryWorkStatus Status)
{
return new PreparatoryWork
{
Id = id,
StartDate = StartDate,
EndDate = EndDate,
Status = Status
};
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities;
public class Ticket
{
public int Id { get; private set; }
public DateTime DateBuy { get; private set; }
public static Ticket CreateTicket(int id)
{
return new Ticket
{
Id = id,
DateBuy = DateTime.Now,
};
}
}

View File

@ -1,39 +0,0 @@
namespace ProjectAirline
{
partial class Form1
{
/// <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()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "Form1";
}
#endregion
}
}

132
ProjectAirline/FormAirline.Designer.cs generated Normal file
View File

@ -0,0 +1,132 @@
namespace ProjectAirline
{
partial class FormAirline
{
/// <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()
{
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

@ -1,10 +1,11 @@
namespace ProjectAirline namespace ProjectAirline
{ {
public partial class Form1 : Form public partial class FormAirline : Form
{ {
public Form1() public FormAirline()
{ {
InitializeComponent(); InitializeComponent();
} }
} }
} }

View File

@ -0,0 +1,123 @@
<?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="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

@ -1,3 +1,7 @@
using ProjectAirline.Repositories;
using ProjectAirline.Repositories.Implementations;
using Unity;
namespace ProjectAirline namespace ProjectAirline
{ {
internal static class Program internal static class Program
@ -11,7 +15,20 @@ namespace ProjectAirline
// To customize application configuration such as set high DPI settings or default font, // To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration. // see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize(); ApplicationConfiguration.Initialize();
Application.Run(new Form1()); 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> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </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> </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,25 @@
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(DateTime? dateFrom = null, DateTime? dateTo = null, int? flightId = null);
void CreateFlight(Flight flight);
//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,18 @@
using ProjectAirline.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Repositories;
public interface IPreparatoryWorkRepository
{
IEnumerable<PreparatoryWork> ReadPreparatoryWork(DateTime? dateFrom = null, DateTime? dateTo = null, int? preparatoryWorkId = null,
PreparatoryWork? preparatoryWorkStatus = null);
void CreatePreparatoryWork(PreparatoryWork preparatoryWork);
void DeletePreparatoryWork(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 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,39 @@
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 IEnumerable<Flight> ReadFlights(DateTime? dateFrom = null, DateTime? dateTo = null, int? flightId = null)
{
return [];
}
//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,24 @@
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 PreparatoryWorkRepository : IPreparatoryWorkRepository
{
public void CreatePreparatoryWork(PreparatoryWork preparatoryWork)
{
}
public void DeletePreparatoryWork(int id)
{
}
public IEnumerable<PreparatoryWork> ReadPreparatoryWork(DateTime? dateFrom = null, DateTime? dateTo = null, int? preparatoryWorkId = null, PreparatoryWork? preparatoryWorkStatus = null)
{
return [];
}
}

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