Пошла возня

This commit is contained in:
ivans 2024-10-30 11:13:10 +04:00
parent 6cc9387ccd
commit 191dd5dfd3
9 changed files with 112 additions and 4 deletions

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 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
};
}
}

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,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectAirline.Entities;
public class PreparatoryWork
{
}

View 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; }
}

View File

@ -1,6 +1,6 @@
namespace ProjectAirline namespace ProjectAirline
{ {
partial class Form1 partial class FormAirline
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

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

View File

@ -11,7 +11,7 @@ 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(new FormAirline());
} }
} }
} }