Пошла возня
This commit is contained in:
parent
6cc9387ccd
commit
191dd5dfd3
32
ProjectAirline/Entities/Flight.cs
Normal file
32
ProjectAirline/Entities/Flight.cs
Normal 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 ArrivalTime { 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)
|
||||
{
|
||||
return new Flight
|
||||
{
|
||||
Id = id,
|
||||
DatetimeDeparture = dateTimeDeparture,
|
||||
ArrivalTime = arrivalTime,
|
||||
ArrivalLocation = arrivalLocation,
|
||||
TicketPrice = ticketPrice
|
||||
};
|
||||
}
|
||||
}
|
23
ProjectAirline/Entities/Passanger.cs
Normal file
23
ProjectAirline/Entities/Passanger.cs
Normal 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,
|
||||
};
|
||||
}
|
||||
}
|
26
ProjectAirline/Entities/Plane.cs
Normal file
26
ProjectAirline/Entities/Plane.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
12
ProjectAirline/Entities/PreparatoryWork.cs
Normal file
12
ProjectAirline/Entities/PreparatoryWork.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectAirline.Entities;
|
||||
|
||||
public class PreparatoryWork
|
||||
{
|
||||
|
||||
}
|
15
ProjectAirline/Entities/Ticket.cs
Normal file
15
ProjectAirline/Entities/Ticket.cs
Normal file
@ -0,0 +1,15 @@
|
||||
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; }
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
namespace ProjectAirline
|
||||
{
|
||||
partial class Form1
|
||||
partial class FormAirline
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
@ -1,8 +1,8 @@
|
||||
namespace ProjectAirline
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
public partial class FormAirline : Form
|
||||
{
|
||||
public Form1()
|
||||
public FormAirline()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
@ -11,7 +11,7 @@ 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 Form1());
|
||||
Application.Run(new FormAirline());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user