From 121bf60ad904fb11f0c012a0ed1327993f93f217 Mon Sep 17 00:00:00 2001 From: zw1st <144824777+zw1st@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:06:36 +0400 Subject: [PATCH 1/2] =?UTF-8?q?=D0=93=D0=9E=D0=9E=D0=9E=D0=9E=D0=9E=D0=9E?= =?UTF-8?q?=D0=9E=D0=9E=D0=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectTourismCompany/Entities/Check.cs | 21 ++ .../ProjectTourismCompany/Entities/Client.cs | 28 ++ .../ProjectTourismCompany/Entities/Company.cs | 24 ++ .../Entities/CompanyTrip.cs | 26 ++ .../ProjectTourismCompany/Entities/Country.cs | 21 ++ .../Entities/Enums/CleintStatus.cs | 16 ++ .../Entities/Enums/TravelType.cs | 18 ++ .../ProjectTourismCompany/Entities/Trip.cs | 38 +++ .../ProjectTourismCompany/Form1.Designer.cs | 39 --- .../ProjectTourismCompany/Form1.cs | 10 - .../FormTourismCompany.Designer.cs | 137 +++++++++ .../FormTourismCompany.cs | 87 ++++++ .../FormTourismCompany.resx | 123 ++++++++ .../Forms/FormCheck.Designer.cs | 195 +++++++++++++ .../ProjectTourismCompany/Forms/FormCheck.cs | 88 ++++++ .../{Form1.resx => Forms/FormCheck.resx} | 50 ++-- .../Forms/FormChecks.Designer.cs | 111 ++++++++ .../ProjectTourismCompany/Forms/FormChecks.cs | 100 +++++++ .../Forms/FormChecks.resx | 120 ++++++++ .../Forms/FormClient.Designer.cs | 166 +++++++++++ .../ProjectTourismCompany/Forms/FormClient.cs | 91 ++++++ .../Forms/FormClient.resx | 120 ++++++++ .../Forms/FormClients.Designer.cs | 122 ++++++++ .../Forms/FormClients.cs | 107 +++++++ .../Forms/FormClients.resx | 120 ++++++++ .../Forms/FormCompanies.Designer.cs | 126 +++++++++ .../Forms/FormCompanies.cs | 111 ++++++++ .../Forms/FormCompanies.resx | 120 ++++++++ .../Forms/FormCompany.Designer.cs | 174 ++++++++++++ .../Forms/FormCompany.cs | 103 +++++++ .../Forms/FormCompany.resx | 126 +++++++++ .../Forms/FormCountries.Designer.cs | 126 +++++++++ .../Forms/FormCountries.cs | 116 ++++++++ .../Forms/FormCountries.resx | 120 ++++++++ .../Forms/FormCountry.Designer.cs | 98 +++++++ .../Forms/FormCountry.cs | 81 ++++++ .../Forms/FormCountry.resx | 120 ++++++++ .../Forms/FormTrip.Designer.cs | 264 ++++++++++++++++++ .../ProjectTourismCompany/Forms/FormTrip.cs | 110 ++++++++ .../ProjectTourismCompany/Forms/FormTrip.resx | 120 ++++++++ .../Forms/FormTrips.Designer.cs | 98 +++++++ .../ProjectTourismCompany/Forms/FormTrips.cs | 64 +++++ .../Forms/FormTrips.resx | 120 ++++++++ .../ProjectTourismCompany/Program.cs | 41 ++- .../ProjectTourismCompany.csproj | 19 ++ ...TourismCompany.Entities.Country.datasource | 10 + .../Properties/Resources.Designer.cs | 103 +++++++ .../Properties/Resources.resx | 133 +++++++++ .../Repositories/ICheckRepository.cs | 18 ++ .../Repositories/IClientRepository.cs | 17 ++ .../Repositories/ICompanyRepository.cs | 18 ++ .../Repositories/ICountryRepository.cs | 17 ++ .../Repositories/ITripRepository.cs | 21 ++ .../Implementations/CheckRepository.cs | 34 +++ .../Implementations/ClientRepository.cs | 36 +++ .../Implementations/CompanyRepository.cs | 36 +++ .../Implementations/CountryRepository.cs | 36 +++ .../Implementations/TripRepository.cs | 26 ++ .../ProjectTourismCompany/Resources/minus.png | Bin 0 -> 2428 bytes .../Resources/pencil.jpg | Bin 0 -> 12382 bytes .../ProjectTourismCompany/Resources/plus.jpg | Bin 0 -> 6843 bytes .../Resources/Карта мира.jpg | Bin 0 -> 21842 bytes 62 files changed, 4652 insertions(+), 88 deletions(-) create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/Check.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/Client.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/CompanyTrip.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/Country.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/CleintStatus.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/TravelType.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs delete mode 100644 ProjectTourismCompany/ProjectTourismCompany/Form1.Designer.cs delete mode 100644 ProjectTourismCompany/ProjectTourismCompany/Form1.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.cs rename ProjectTourismCompany/ProjectTourismCompany/{Form1.resx => Forms/FormCheck.resx} (93%) create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Properties/DataSources/ProjectTourismCompany.Entities.Country.datasource create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.Designer.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.resx create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/ICheckRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/IClientRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/ICompanyRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/ICountryRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/ITripRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CheckRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/ClientRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CountryRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Resources/minus.png create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Resources/pencil.jpg create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Resources/plus.jpg create mode 100644 ProjectTourismCompany/ProjectTourismCompany/Resources/Карта мира.jpg diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Check.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Check.cs new file mode 100644 index 0000000..942eab8 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Check.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities; + +public class Check +{ + public int Id { get; private set; } + public string Title { get; private set; } = string.Empty; + public DateTime PurchaseDate { get; private set; } + public int Price { get; private set; } + public int TripId { get; private set; } + public int ClientId { get; private set; } + public static Check CreateCheck(int id, string title, DateTime purchaseDate, int price, int tripId, int clientId) + { + return new Check() { Id = id, Title = title, PurchaseDate = purchaseDate, Price = price, TripId = tripId, ClientId = clientId }; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Client.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Client.cs new file mode 100644 index 0000000..83a87e6 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Client.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities.Enums; + +public class Client +{ + public int Id { get; private set; } + public string Name { get; private set; } = string.Empty; + public DateTime BirthDate { get; private set; } + public ClientStatus Status { get; private set; } + public string Phone { get; private set; }= string.Empty; + public static Client CreateClient(int id, string name, DateTime birth, ClientStatus status, string phone) + { + return new Client() + { + Id = id, + Name = name, + BirthDate = birth, + Status = status, + Phone = phone + }; + + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs new file mode 100644 index 0000000..36853b0 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities; + +public class Company +{ + public int Id { get; private set; } + public string Name { get; private set; } = string.Empty; + public int CountryId { get; private set; } + public IEnumerable<CompanyTrip> CompanyTrip + { + get; + private set; + } = []; + + public static Company CreateCompany(int id, string name, int countryId, IEnumerable<CompanyTrip> companyTrip) + { + return new Company() { Id = id, Name = name, CountryId = countryId, CompanyTrip = companyTrip }; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/CompanyTrip.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/CompanyTrip.cs new file mode 100644 index 0000000..ac8d1dc --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/CompanyTrip.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities; + +public class CompanyTrip +{ + public int Id { get; private set; } + public int CompanyId { get; private set; } + public int TripId { get; private set; } + public int AdditionalPrice { get; private set; } + public static CompanyTrip CreateCompanyTrip(int id, int companyId, int tripId, int additionalPrice) + { + return new CompanyTrip() + { + Id = id, + CompanyId = companyId, + TripId = tripId, + AdditionalPrice = additionalPrice + }; + } + +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Country.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Country.cs new file mode 100644 index 0000000..a15c011 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Country.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities; + +public class Country +{ + public int Id { get; private set; } + public string CountryName { get; private set; }=string.Empty; + public static Country CreateCountry(int id, string countryName) + { + return new Country + { + Id = id, + CountryName = countryName, + }; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/CleintStatus.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/CleintStatus.cs new file mode 100644 index 0000000..397a129 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/CleintStatus.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities.Enums; + +public enum ClientStatus +{ + None = 0, + Student = 1, + Veteran = 3, + Invalid = 4, + Parent = 5, +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/TravelType.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/TravelType.cs new file mode 100644 index 0000000..117b222 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Enums/TravelType.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities.Enums; + +[Flags] +public enum TravelType +{ + None = 0, + Hiking = 1, + Bus = 2, + Sights = 4, + Water = 8, + Event = 16 +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs new file mode 100644 index 0000000..1442654 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs @@ -0,0 +1,38 @@ +using ProjectTourismCompany.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Entities; + +public class Trip +{ + public int Id { get; private set; } + public string Title { get; private set; } = string.Empty; + public int Price { get; private set; } + public int HumanCapacity { get; private set; } + public DateTime StartDate { get; private set; } + public DateTime EndDate { get; private set;} + public string StartCity { get; private set; }=string.Empty; + public string EndCity { get; private set;} =string.Empty; + public int CompanyId { get; private set; } + public TravelType TravelType { get; private set; } + + public static Trip CreateOpeartion(int id, string title, int price, int humanCapacity, DateTime startDate, DateTime endDate, string startCity, string endCity, TravelType travelType) + { + return new Trip + { + Title = title, + Id = id, + Price = price, + HumanCapacity = humanCapacity, + StartDate = startDate, + EndDate = endDate, + StartCity = startCity, + EndCity = endCity, + TravelType = travelType, + }; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Form1.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Form1.Designer.cs deleted file mode 100644 index a6d4b62..0000000 --- a/ProjectTourismCompany/ProjectTourismCompany/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectTourismCompany -{ - 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 - } -} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Form1.cs b/ProjectTourismCompany/ProjectTourismCompany/Form1.cs deleted file mode 100644 index e354936..0000000 --- a/ProjectTourismCompany/ProjectTourismCompany/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectTourismCompany -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} diff --git a/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.Designer.cs new file mode 100644 index 0000000..1018606 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.Designer.cs @@ -0,0 +1,137 @@ +namespace ProjectTourismCompany +{ + partial class FormTourismCompany + { + /// <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(); + ClientsToolStripMenuItem = new ToolStripMenuItem(); + CompaniesToolStripMenuItem = new ToolStripMenuItem(); + CountriesToolStripMenuItem = new ToolStripMenuItem(); + операцииToolStripMenuItem = new ToolStripMenuItem(); + ChecksToolStripMenuItem = new ToolStripMenuItem(); + ToursToolStripMenuItem = new ToolStripMenuItem(); + отчетыToolStripMenuItem = new ToolStripMenuItem(); + menuStrip1.SuspendLayout(); + SuspendLayout(); + // + // menuStrip1 + // + menuStrip1.ImageScalingSize = new Size(20, 20); + menuStrip1.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, операцииToolStripMenuItem, отчетыToolStripMenuItem }); + menuStrip1.Location = new Point(0, 0); + menuStrip1.Name = "menuStrip1"; + menuStrip1.Size = new Size(800, 28); + menuStrip1.TabIndex = 0; + menuStrip1.Text = "menuStrip1"; + // + // справочникиToolStripMenuItem + // + справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ClientsToolStripMenuItem, CompaniesToolStripMenuItem, CountriesToolStripMenuItem }); + справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem"; + справочникиToolStripMenuItem.Size = new Size(117, 24); + справочникиToolStripMenuItem.Text = "Справочники"; + // + // ClientsToolStripMenuItem + // + ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem"; + ClientsToolStripMenuItem.Size = new Size(165, 26); + ClientsToolStripMenuItem.Text = "Клиенты"; + ClientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click; + // + // CompaniesToolStripMenuItem + // + CompaniesToolStripMenuItem.Name = "CompaniesToolStripMenuItem"; + CompaniesToolStripMenuItem.Size = new Size(165, 26); + CompaniesToolStripMenuItem.Text = "Компании"; + CompaniesToolStripMenuItem.Click += CompaniesToolStripMenuItem_Click; + // + // CountriesToolStripMenuItem + // + CountriesToolStripMenuItem.Name = "CountriesToolStripMenuItem"; + CountriesToolStripMenuItem.Size = new Size(165, 26); + CountriesToolStripMenuItem.Text = "Страны"; + CountriesToolStripMenuItem.Click += CountriesToolStripMenuItem_Click; + // + // операцииToolStripMenuItem + // + операцииToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ChecksToolStripMenuItem, ToursToolStripMenuItem }); + операцииToolStripMenuItem.Name = "операцииToolStripMenuItem"; + операцииToolStripMenuItem.Size = new Size(95, 24); + операцииToolStripMenuItem.Text = "Операции"; + // + // ChecksToolStripMenuItem + // + ChecksToolStripMenuItem.Name = "ChecksToolStripMenuItem"; + ChecksToolStripMenuItem.Size = new Size(302, 26); + ChecksToolStripMenuItem.Text = "Заключение договоров (чеки)"; + ChecksToolStripMenuItem.Click += ChecksToolStripMenuItem_Click; + // + // ToursToolStripMenuItem + // + ToursToolStripMenuItem.Name = "ToursToolStripMenuItem"; + ToursToolStripMenuItem.Size = new Size(302, 26); + ToursToolStripMenuItem.Text = "Проведенные туры"; + ToursToolStripMenuItem.Click += TripsToolStripMenuItem_Click; + // + // отчетыToolStripMenuItem + // + отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem"; + отчетыToolStripMenuItem.Size = new Size(73, 24); + отчетыToolStripMenuItem.Text = "Отчеты"; + // + // FormTourismCompany + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + BackgroundImage = Properties.Resources.Карта_мира; + BackgroundImageLayout = ImageLayout.Stretch; + ClientSize = new Size(800, 450); + Controls.Add(menuStrip1); + MainMenuStrip = menuStrip1; + Name = "FormTourismCompany"; + Text = "Туристическое агенство"; + menuStrip1.ResumeLayout(false); + menuStrip1.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private MenuStrip menuStrip1; + private ToolStripMenuItem справочникиToolStripMenuItem; + private ToolStripMenuItem операцииToolStripMenuItem; + private ToolStripMenuItem отчетыToolStripMenuItem; + private ToolStripMenuItem ClientsToolStripMenuItem; + private ToolStripMenuItem CompaniesToolStripMenuItem; + private ToolStripMenuItem CountriesToolStripMenuItem; + private ToolStripMenuItem ChecksToolStripMenuItem; + private ToolStripMenuItem ToursToolStripMenuItem; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs new file mode 100644 index 0000000..57e8988 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs @@ -0,0 +1,87 @@ +using ProjectTourismCompany.Forms; +using System.ComponentModel; +using Unity; + +namespace ProjectTourismCompany; + +public partial class FormTourismCompany : Form +{ + private readonly IUnityContainer _container; + public FormTourismCompany(IUnityContainer container) + { + InitializeComponent(); + _container = container ?? throw new ArgumentNullException(nameof(container)); + } + + + private void TripsToolStripMenuItem_Click(object sender, + EventArgs e) + { + try + { + _container.Resolve<FormTrips>().ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "������ ��� ��������", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + + private void CompaniesToolStripMenuItem_Click(object sender, + EventArgs e) + { + try + { + _container.Resolve<FormCompanies>().ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "������ ��� ��������", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ChecksToolStripMenuItem_Click(object sender, + EventArgs e) + { + try + { + _container.Resolve<FormChecks>().ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "������ ��� ��������", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void CountriesToolStripMenuItem_Click(object sender, + EventArgs e) + { + try + { + _container.Resolve<FormCountries>().ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "������ ��� ��������", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ClientsToolStripMenuItem_Click(object sender, + EventArgs e) + { + try + { + _container.Resolve<FormClients>().ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "������ ��� ��������", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.resx b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.resx new file mode 100644 index 0000000..a0623c8 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.resx @@ -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="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.Designer.cs new file mode 100644 index 0000000..345125b --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.Designer.cs @@ -0,0 +1,195 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormCheck + { + /// <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() + { + buttonCancel = new Button(); + buttonSave = new Button(); + dateTimePickerPurchaseDate = new DateTimePicker(); + labelStartDate = new Label(); + label1 = new Label(); + numericUpDownPrice = new NumericUpDown(); + label2 = new Label(); + textBoxTitle = new TextBox(); + label3 = new Label(); + label4 = new Label(); + comboBoxClient = new ComboBox(); + comboBoxTrip = new ComboBox(); + ((System.ComponentModel.ISupportInitialize)numericUpDownPrice).BeginInit(); + SuspendLayout(); + // + // buttonCancel + // + buttonCancel.BackColor = Color.IndianRed; + buttonCancel.Location = new Point(221, 260); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(135, 51); + buttonCancel.TabIndex = 31; + buttonCancel.Text = "Отмена"; + buttonCancel.UseVisualStyleBackColor = false; + buttonCancel.Click += ButtonCancel_Click; + // + // buttonSave + // + buttonSave.BackColor = Color.LimeGreen; + buttonSave.Location = new Point(367, 260); + buttonSave.Name = "buttonSave"; + buttonSave.Size = new Size(135, 51); + buttonSave.TabIndex = 30; + buttonSave.Text = "Сохранить"; + buttonSave.UseVisualStyleBackColor = false; + buttonSave.Click += buttonSave_Click; + // + // dateTimePickerPurchaseDate + // + dateTimePickerPurchaseDate.Location = new Point(282, 66); + dateTimePickerPurchaseDate.Name = "dateTimePickerPurchaseDate"; + dateTimePickerPurchaseDate.Size = new Size(220, 27); + dateTimePickerPurchaseDate.TabIndex = 25; + // + // labelStartDate + // + labelStartDate.AutoSize = true; + labelStartDate.Location = new Point(45, 71); + labelStartDate.Name = "labelStartDate"; + labelStartDate.Size = new Size(92, 20); + labelStartDate.TabIndex = 18; + labelStartDate.Text = "Дата сделки"; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(64, 117); + label1.Name = "label1"; + label1.Size = new Size(45, 20); + label1.TabIndex = 34; + label1.Text = "Цена"; + // + // numericUpDownPrice + // + numericUpDownPrice.Location = new Point(284, 110); + numericUpDownPrice.Maximum = new decimal(new int[] { 1000000, 0, 0, 0 }); + numericUpDownPrice.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + numericUpDownPrice.Name = "numericUpDownPrice"; + numericUpDownPrice.Size = new Size(217, 27); + numericUpDownPrice.TabIndex = 35; + numericUpDownPrice.Value = new decimal(new int[] { 1, 0, 0, 0 }); + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(45, 163); + label2.Name = "label2"; + label2.Size = new Size(101, 20); + label2.TabIndex = 36; + label2.Text = "ФИО клиента"; + // + // textBoxTitle + // + textBoxTitle.Location = new Point(282, 22); + textBoxTitle.Name = "textBoxTitle"; + textBoxTitle.Size = new Size(220, 27); + textBoxTitle.TabIndex = 38; + // + // label3 + // + label3.AutoSize = true; + label3.Location = new Point(45, 22); + label3.Name = "label3"; + label3.Size = new Size(135, 20); + label3.TabIndex = 37; + label3.Text = "Название путевки"; + // + // label4 + // + label4.AutoSize = true; + label4.Location = new Point(45, 208); + label4.Name = "label4"; + label4.Size = new Size(64, 20); + label4.TabIndex = 39; + label4.Text = "Путевка"; + // + // comboBoxClient + // + comboBoxClient.DropDownStyle = ComboBoxStyle.DropDownList; + comboBoxClient.FormattingEnabled = true; + comboBoxClient.Location = new Point(282, 163); + comboBoxClient.Name = "comboBoxClient"; + comboBoxClient.Size = new Size(217, 28); + comboBoxClient.TabIndex = 41; + // + // comboBoxTrip + // + comboBoxTrip.DropDownStyle = ComboBoxStyle.DropDownList; + comboBoxTrip.FormattingEnabled = true; + comboBoxTrip.Location = new Point(282, 208); + comboBoxTrip.Name = "comboBoxTrip"; + comboBoxTrip.Size = new Size(217, 28); + comboBoxTrip.TabIndex = 42; + // + // FormCheck + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(513, 322); + Controls.Add(comboBoxTrip); + Controls.Add(comboBoxClient); + Controls.Add(label4); + Controls.Add(textBoxTitle); + Controls.Add(label3); + Controls.Add(label2); + Controls.Add(numericUpDownPrice); + Controls.Add(label1); + Controls.Add(buttonCancel); + Controls.Add(buttonSave); + Controls.Add(dateTimePickerPurchaseDate); + Controls.Add(labelStartDate); + Name = "FormCheck"; + StartPosition = FormStartPosition.CenterParent; + Text = "Чек"; + ((System.ComponentModel.ISupportInitialize)numericUpDownPrice).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Button buttonCancel; + private Button buttonSave; + private DateTimePicker dateTimePickerPurchaseDate; + private Label labelStartDate; + private Label label1; + private NumericUpDown numericUpDownPrice; + private Label label2; + private TextBox textBoxTitle; + private Label label3; + private Label label4; + private ComboBox comboBoxClient; + private ComboBox comboBoxTrip; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.cs new file mode 100644 index 0000000..29ca619 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.cs @@ -0,0 +1,88 @@ +using Microsoft.VisualBasic.FileIO; +using ProjectTourismCompany.Entities; +using ProjectTourismCompany.Repositories; +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 ProjectTourismCompany.Forms; + +public partial class FormCheck : Form +{ + private readonly ICheckRepository _checkRepository; + private int _checkId; + public int Id + { + set + { + try + { + var check = _checkRepository.ReadCheckById(value); + if (check == null) + { + throw new + InvalidDataException(nameof(check)); + } + textBoxTitle.Text = check.Title; + dateTimePickerPurchaseDate.Value = check.PurchaseDate; + numericUpDownPrice.Value = check.Price; + + comboBoxClient.SelectedItem = check.ClientId; + + comboBoxTrip.SelectedItem = check.TripId; + _checkId = value; + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при получении данных", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + } + } + public FormCheck(ICheckRepository checkRepository, IClientRepository clientRepository) + { + InitializeComponent(); + _checkRepository = checkRepository ?? throw new ArgumentNullException(nameof(checkRepository)); + + comboBoxClient.DataSource = clientRepository.ReadClients(); + comboBoxClient.DisplayMember = "Name"; + comboBoxClient.ValueMember = "Id"; + + comboBoxTrip.DisplayMember = "Title"; + comboBoxTrip.ValueMember = "Id"; + } + private void buttonSave_Click(object sender, EventArgs e) + { + try + { + if (string.IsNullOrWhiteSpace(textBoxTitle.Text) || + comboBoxTrip.SelectedIndex < 0 || + comboBoxClient.SelectedIndex < 0) + { + throw new Exception("Имеются незаполненные поля"); + } + _checkRepository.CreateCheck(Check.CreateCheck(_checkId, textBoxTitle.Text, dateTimePickerPurchaseDate.Value, + (int)numericUpDownPrice.Value, (int)comboBoxTrip.SelectedItem!, + (int)comboBoxClient.SelectedItem!)); + Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при сохранении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ButtonCancel_Click(object sender, EventArgs e) => + Close(); + + +} + + diff --git a/ProjectTourismCompany/ProjectTourismCompany/Form1.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.resx similarity index 93% rename from ProjectTourismCompany/ProjectTourismCompany/Form1.resx rename to ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.resx index 1af7de1..af32865 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Form1.resx +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCheck.resx @@ -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. --> diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs new file mode 100644 index 0000000..4979bab --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs @@ -0,0 +1,111 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormChecks + { + /// <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() + { + dataGridViewChecks = new DataGridView(); + panel1 = new Panel(); + buttonDelCheck = new Button(); + buttonAddCheck = new Button(); + ((System.ComponentModel.ISupportInitialize)dataGridViewChecks).BeginInit(); + panel1.SuspendLayout(); + SuspendLayout(); + // + // dataGridViewChecks + // + dataGridViewChecks.AllowUserToAddRows = false; + dataGridViewChecks.AllowUserToDeleteRows = false; + dataGridViewChecks.AllowUserToResizeColumns = false; + dataGridViewChecks.AllowUserToResizeRows = false; + dataGridViewChecks.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridViewChecks.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridViewChecks.Dock = DockStyle.Fill; + dataGridViewChecks.Location = new Point(0, 0); + dataGridViewChecks.MultiSelect = false; + dataGridViewChecks.Name = "dataGridViewChecks"; + dataGridViewChecks.ReadOnly = true; + dataGridViewChecks.RowHeadersVisible = false; + dataGridViewChecks.RowHeadersWidth = 51; + dataGridViewChecks.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dataGridViewChecks.Size = new Size(800, 450); + dataGridViewChecks.TabIndex = 0; + // + // panel1 + // + panel1.Controls.Add(buttonDelCheck); + panel1.Controls.Add(buttonAddCheck); + panel1.Dock = DockStyle.Right; + panel1.Location = new Point(643, 0); + panel1.Name = "panel1"; + panel1.Size = new Size(157, 450); + panel1.TabIndex = 1; + // + // buttonDelCheck + // + buttonDelCheck.BackgroundImage = Properties.Resources.minus; + buttonDelCheck.BackgroundImageLayout = ImageLayout.Stretch; + buttonDelCheck.Location = new Point(17, 184); + buttonDelCheck.Name = "buttonDelCheck"; + buttonDelCheck.Size = new Size(94, 80); + buttonDelCheck.TabIndex = 5; + buttonDelCheck.UseVisualStyleBackColor = true; + buttonDelCheck.Click += buttonDel_Click; + // + // buttonAddCheck + // + buttonAddCheck.BackgroundImage = Properties.Resources.plus; + buttonAddCheck.BackgroundImageLayout = ImageLayout.Stretch; + buttonAddCheck.Location = new Point(17, 12); + buttonAddCheck.Name = "buttonAddCheck"; + buttonAddCheck.Size = new Size(94, 80); + buttonAddCheck.TabIndex = 3; + buttonAddCheck.UseVisualStyleBackColor = true; + buttonAddCheck.Click += ButtonAdd_Click; + // + // FormChecks + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(panel1); + Controls.Add(dataGridViewChecks); + Name = "FormChecks"; + Text = "Чеки"; + ((System.ComponentModel.ISupportInitialize)dataGridViewChecks).EndInit(); + panel1.ResumeLayout(false); + ResumeLayout(false); + } + + #endregion + + private DataGridView dataGridViewChecks; + private Panel panel1; + private Button buttonDelCheck; + private Button buttonAddCheck; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.cs new file mode 100644 index 0000000..3464838 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.cs @@ -0,0 +1,100 @@ +using ProjectTourismCompany.Repositories; +using ProjectTourismCompany.Repositories.Implementations; +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; +using Unity; + +namespace ProjectTourismCompany.Forms; + +public partial class FormChecks : Form +{ + private readonly IUnityContainer _container; + private readonly ICheckRepository _checkRepository; + + public FormChecks(IUnityContainer container, ICheckRepository checkRepository) + { + InitializeComponent(); + _container = container ?? + throw new ArgumentNullException(nameof(container)); + _checkRepository = checkRepository ?? + throw new + ArgumentNullException(nameof(checkRepository)); + } + + + private void FormChecks_Load(object sender, EventArgs e) + { + try + { + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при загрузке", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + + private void ButtonAdd_Click(object sender, EventArgs e) + { + try + { + _container.Resolve<FormCheck>().ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при добавлении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonDel_Click(object sender, EventArgs e) + { + if (!TryGetIdentifierFromSelectedRow(out var findId)) + { + return; + } + if (MessageBox.Show("Удалить запись?", "Удаление", + MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return; + } + try + { + _checkRepository.DeleteCheck(findId); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при удалении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private bool TryGetIdentifierFromSelectedRow(out int id) + { + id = 0; + if (dataGridViewChecks.SelectedRows.Count < 1) + { + MessageBox.Show("Нет выбранной записи", "Ошибка", + MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } + id = Convert.ToInt32(dataGridViewChecks.SelectedRows[0].Cells["Id"].Value); + return true; + } + + + private void LoadList() => dataGridViewChecks.DataSource = + _checkRepository.ReadChecks(); +} + diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.Designer.cs new file mode 100644 index 0000000..d929217 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.Designer.cs @@ -0,0 +1,166 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormClient + { + /// <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() + { + textBoxName = new TextBox(); + textBoxPhoneNumber = new TextBox(); + label1 = new Label(); + dateTimePickerBirthDate = new DateTimePicker(); + label2 = new Label(); + label3 = new Label(); + label4 = new Label(); + buttonSave = new Button(); + buttonCancel = new Button(); + comboBoxStatus = new ComboBox(); + SuspendLayout(); + // + // textBoxName + // + textBoxName.Location = new Point(230, 12); + textBoxName.Name = "textBoxName"; + textBoxName.Size = new Size(198, 27); + textBoxName.TabIndex = 0; + // + // textBoxPhoneNumber + // + textBoxPhoneNumber.Location = new Point(230, 198); + textBoxPhoneNumber.Name = "textBoxPhoneNumber"; + textBoxPhoneNumber.Size = new Size(198, 27); + textBoxPhoneNumber.TabIndex = 1; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(63, 15); + label1.Name = "label1"; + label1.Size = new Size(42, 20); + label1.TabIndex = 2; + label1.Text = "ФИО"; + // + // dateTimePickerBirthDate + // + dateTimePickerBirthDate.Location = new Point(230, 45); + dateTimePickerBirthDate.Name = "dateTimePickerBirthDate"; + dateTimePickerBirthDate.Size = new Size(198, 27); + dateTimePickerBirthDate.TabIndex = 3; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(63, 50); + label2.Name = "label2"; + label2.Size = new Size(116, 20); + label2.TabIndex = 4; + label2.Text = "Дата рождения"; + // + // label3 + // + label3.AutoSize = true; + label3.Location = new Point(63, 121); + label3.Name = "label3"; + label3.Size = new Size(52, 20); + label3.TabIndex = 5; + label3.Text = "Статус"; + // + // label4 + // + label4.AutoSize = true; + label4.Location = new Point(63, 201); + label4.Name = "label4"; + label4.Size = new Size(69, 20); + label4.TabIndex = 6; + label4.Text = "Телефон"; + // + // buttonSave + // + buttonSave.BackColor = Color.LimeGreen; + buttonSave.Location = new Point(293, 281); + buttonSave.Name = "buttonSave"; + buttonSave.Size = new Size(135, 51); + buttonSave.TabIndex = 8; + buttonSave.Text = "Сохранить"; + buttonSave.UseVisualStyleBackColor = false; + buttonSave.Click += buttonSave_Click; + // + // buttonCancel + // + buttonCancel.BackColor = Color.IndianRed; + buttonCancel.Location = new Point(147, 281); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(135, 51); + buttonCancel.TabIndex = 9; + buttonCancel.Text = "Отмена"; + buttonCancel.UseVisualStyleBackColor = false; + buttonCancel.Click += ButtonCancel_Click; + // + // comboBoxStatus + // + comboBoxStatus.DropDownStyle = ComboBoxStyle.DropDownList; + comboBoxStatus.FormattingEnabled = true; + comboBoxStatus.Location = new Point(230, 121); + comboBoxStatus.Name = "comboBoxStatus"; + comboBoxStatus.Size = new Size(198, 28); + comboBoxStatus.TabIndex = 10; + // + // FormClient + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(442, 344); + Controls.Add(comboBoxStatus); + Controls.Add(buttonCancel); + Controls.Add(buttonSave); + Controls.Add(label4); + Controls.Add(label3); + Controls.Add(label2); + Controls.Add(dateTimePickerBirthDate); + Controls.Add(label1); + Controls.Add(textBoxPhoneNumber); + Controls.Add(textBoxName); + Name = "FormClient"; + StartPosition = FormStartPosition.CenterParent; + Text = "Клиент"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private TextBox textBoxName; + private TextBox textBoxPhoneNumber; + private Label label1; + private DateTimePicker dateTimePickerBirthDate; + private Label label2; + private Label label3; + private Label label4; + private Button buttonSave; + private Button buttonCancel; + private ComboBox comboBoxStatus; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.cs new file mode 100644 index 0000000..a6663d1 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.cs @@ -0,0 +1,91 @@ +using Microsoft.VisualBasic.FileIO; +using ProjectTourismCompany.Entities.Enums; +using ProjectTourismCompany.Repositories; +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 ProjectTourismCompany.Forms; + +public partial class FormClient : Form +{ + + private readonly IClientRepository _clientRepository; + private int? _clientId; + public int Id + { + set + { + try + { + var client = _clientRepository.ReadClientById(value); + if (client == null) + { + throw new InvalidDataException(nameof(client)); + } + + textBoxName.Text = client.Name; + textBoxPhoneNumber.Text = client.Phone; + comboBoxStatus.SelectedItem = client.Status; + dateTimePickerBirthDate.Value = client.BirthDate; + _clientId = value; + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при получении данных", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + } + } + + + public FormClient(IClientRepository clientRepository) + { + InitializeComponent(); + _clientRepository = clientRepository ?? + throw new + ArgumentNullException(nameof(clientRepository)); + comboBoxStatus.DataSource = +Enum.GetValues(typeof(ClientStatus)); + } + + private void buttonSave_Click(object sender, EventArgs e) + { + try + { + if (string.IsNullOrWhiteSpace(textBoxName.Text) + || + string.IsNullOrWhiteSpace(textBoxPhoneNumber.Text)) + { + throw new Exception("Имеются незаполненные поля"); + } + if (_clientId.HasValue) + { + _clientRepository.UpdateClient(CreateClient(_clientId.Value)); + } + else + { + _clientRepository.UpdateClient(CreateClient(0)); + } + Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при сохранении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void ButtonCancel_Click(object sender, EventArgs e) => Close(); + + private Client CreateClient(int id) + { + return Client.CreateClient(id, textBoxName.Text, dateTimePickerBirthDate.Value, (ClientStatus)comboBoxStatus.SelectedItem!, textBoxPhoneNumber.Text); + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClient.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs new file mode 100644 index 0000000..2f4f961 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs @@ -0,0 +1,122 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormClients + { + /// <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() + { + panel1 = new Panel(); + buttonDelClient = new Button(); + buttonUpdClient = new Button(); + buttonAddClient = new Button(); + dataGridViewClient = new DataGridView(); + panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)dataGridViewClient).BeginInit(); + SuspendLayout(); + // + // panel1 + // + panel1.Controls.Add(buttonDelClient); + panel1.Controls.Add(buttonUpdClient); + panel1.Controls.Add(buttonAddClient); + panel1.Dock = DockStyle.Right; + panel1.Location = new Point(669, 0); + panel1.Name = "panel1"; + panel1.Size = new Size(131, 450); + panel1.TabIndex = 0; + // + // buttonDelClient + // + buttonDelClient.BackgroundImage = Properties.Resources.minus; + buttonDelClient.BackgroundImageLayout = ImageLayout.Stretch; + buttonDelClient.Location = new Point(6, 184); + buttonDelClient.Name = "buttonDelClient"; + buttonDelClient.Size = new Size(94, 80); + buttonDelClient.TabIndex = 2; + buttonDelClient.UseVisualStyleBackColor = true; + buttonDelClient.Click += buttonDel_Click; + // + // buttonUpdClient + // + buttonUpdClient.BackgroundImage = Properties.Resources.pencil; + buttonUpdClient.BackgroundImageLayout = ImageLayout.Stretch; + buttonUpdClient.Location = new Point(6, 98); + buttonUpdClient.Name = "buttonUpdClient"; + buttonUpdClient.Size = new Size(94, 80); + buttonUpdClient.TabIndex = 1; + buttonUpdClient.UseVisualStyleBackColor = true; + buttonUpdClient.Click += buttonUpd_Click; + // + // buttonAddClient + // + buttonAddClient.BackgroundImage = Properties.Resources.plus; + buttonAddClient.BackgroundImageLayout = ImageLayout.Stretch; + buttonAddClient.Location = new Point(6, 12); + buttonAddClient.Name = "buttonAddClient"; + buttonAddClient.Size = new Size(94, 80); + buttonAddClient.TabIndex = 0; + buttonAddClient.UseVisualStyleBackColor = true; + buttonAddClient.Click += buttonAdd_Click; + // + // dataGridViewClient + // + dataGridViewClient.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridViewClient.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridViewClient.Dock = DockStyle.Fill; + dataGridViewClient.Location = new Point(0, 0); + dataGridViewClient.MultiSelect = false; + dataGridViewClient.Name = "dataGridViewClient"; + dataGridViewClient.ReadOnly = true; + dataGridViewClient.RowHeadersVisible = false; + dataGridViewClient.RowHeadersWidth = 51; + dataGridViewClient.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dataGridViewClient.Size = new Size(669, 450); + dataGridViewClient.TabIndex = 1; + // + // FormClients + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(dataGridViewClient); + Controls.Add(panel1); + Name = "FormClients"; + StartPosition = FormStartPosition.CenterParent; + Text = "Клиенты"; + panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)dataGridViewClient).EndInit(); + ResumeLayout(false); + } + + #endregion + + private Panel panel1; + private Button buttonDelClient; + private Button buttonUpdClient; + private Button buttonAddClient; + private DataGridView dataGridViewClient; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.cs new file mode 100644 index 0000000..47c4663 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.cs @@ -0,0 +1,107 @@ +using ProjectTourismCompany.Repositories; +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; +using Unity; + +namespace ProjectTourismCompany.Forms; + +public partial class FormClients : Form +{ + private readonly IUnityContainer _container; + private readonly IClientRepository _clientRepository; + public FormClients(IUnityContainer container, IClientRepository clientRepository) + { + InitializeComponent(); + _container = container ?? throw new ArgumentNullException(nameof(container)); + _clientRepository = clientRepository ?? throw new ArgumentNullException(nameof(clientRepository)); + } + private void FormClients_Load(object sender, EventArgs e) + { + try + { + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при загрузке", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void buttonAdd_Click(object sender, EventArgs e) + { + try + { + _container.Resolve<FormClient>().ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при добавлении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void buttonUpd_Click(object sender, EventArgs e) + { + if (!TryGetIdentifierFromSelectedRow(out var findId)) + { + return; + } + try + { + + var form = _container.Resolve<FormClient>(); + form.Id = findId; + form.ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при изменении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void buttonDel_Click(object sender, EventArgs e) + { + if (!TryGetIdentifierFromSelectedRow(out var findId)) + { + return; + } + if (MessageBox.Show("Удалить запись?", "Удаление", + MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return; + } + try + { + _clientRepository.DeleteClient(findId); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при удалении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void LoadList() => dataGridViewClient.DataSource = + _clientRepository.ReadClients(); + + private bool TryGetIdentifierFromSelectedRow(out int id) + { + id = 0; + if (dataGridViewClient.SelectedRows.Count < 1) + { + MessageBox.Show("Нет выбранной записи", "Ошибка", + MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } + id = Convert.ToInt32(dataGridViewClient.SelectedRows[0].Cells["Id"].Value); + return true; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs new file mode 100644 index 0000000..903e133 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs @@ -0,0 +1,126 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormCompanies + { + /// <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() + { + dataGridViewCompanies = new DataGridView(); + panel1 = new Panel(); + buttonDelCompany = new Button(); + buttonUpdCompany = new Button(); + buttonAddCompany = new Button(); + ((System.ComponentModel.ISupportInitialize)dataGridViewCompanies).BeginInit(); + panel1.SuspendLayout(); + SuspendLayout(); + // + // dataGridViewCompanies + // + dataGridViewCompanies.AllowUserToAddRows = false; + dataGridViewCompanies.AllowUserToDeleteRows = false; + dataGridViewCompanies.AllowUserToResizeColumns = false; + dataGridViewCompanies.AllowUserToResizeRows = false; + dataGridViewCompanies.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridViewCompanies.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridViewCompanies.Dock = DockStyle.Fill; + dataGridViewCompanies.Location = new Point(0, 0); + dataGridViewCompanies.MultiSelect = false; + dataGridViewCompanies.Name = "dataGridViewCompanies"; + dataGridViewCompanies.ReadOnly = true; + dataGridViewCompanies.RowHeadersVisible = false; + dataGridViewCompanies.RowHeadersWidth = 51; + dataGridViewCompanies.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dataGridViewCompanies.Size = new Size(800, 450); + dataGridViewCompanies.TabIndex = 0; + // + // panel1 + // + panel1.Controls.Add(buttonDelCompany); + panel1.Controls.Add(buttonUpdCompany); + panel1.Controls.Add(buttonAddCompany); + panel1.Dock = DockStyle.Right; + panel1.Location = new Point(665, 0); + panel1.Name = "panel1"; + panel1.Size = new Size(135, 450); + panel1.TabIndex = 1; + // + // buttonDelCompany + // + buttonDelCompany.BackgroundImage = Properties.Resources.minus; + buttonDelCompany.BackgroundImageLayout = ImageLayout.Stretch; + buttonDelCompany.Location = new Point(29, 183); + buttonDelCompany.Name = "buttonDelCompany"; + buttonDelCompany.Size = new Size(94, 80); + buttonDelCompany.TabIndex = 5; + buttonDelCompany.UseVisualStyleBackColor = true; + buttonDelCompany.Click += buttonDel_Click; + // + // buttonUpdCompany + // + buttonUpdCompany.BackgroundImage = Properties.Resources.pencil; + buttonUpdCompany.BackgroundImageLayout = ImageLayout.Stretch; + buttonUpdCompany.Location = new Point(29, 97); + buttonUpdCompany.Name = "buttonUpdCompany"; + buttonUpdCompany.Size = new Size(94, 80); + buttonUpdCompany.TabIndex = 4; + buttonUpdCompany.UseVisualStyleBackColor = true; + buttonUpdCompany.Click += buttonUpd_Click; + // + // buttonAddCompany + // + buttonAddCompany.BackgroundImage = Properties.Resources.plus; + buttonAddCompany.BackgroundImageLayout = ImageLayout.Stretch; + buttonAddCompany.Location = new Point(29, 11); + buttonAddCompany.Name = "buttonAddCompany"; + buttonAddCompany.Size = new Size(94, 80); + buttonAddCompany.TabIndex = 3; + buttonAddCompany.UseVisualStyleBackColor = true; + buttonAddCompany.Click += buttonAdd_Click; + // + // FormCompanies + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(panel1); + Controls.Add(dataGridViewCompanies); + Name = "FormCompanies"; + StartPosition = FormStartPosition.CenterParent; + Text = "Компании"; + ((System.ComponentModel.ISupportInitialize)dataGridViewCompanies).EndInit(); + panel1.ResumeLayout(false); + ResumeLayout(false); + } + + #endregion + + private DataGridView dataGridViewCompanies; + private Panel panel1; + private Button buttonDelCompany; + private Button buttonUpdCompany; + private Button buttonAddCompany; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.cs new file mode 100644 index 0000000..2e75024 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.cs @@ -0,0 +1,111 @@ +using ProjectTourismCompany.Repositories; +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; +using Unity; + +namespace ProjectTourismCompany.Forms; + +public partial class FormCompanies : Form +{ + private readonly IUnityContainer _container; + private readonly ICompanyRepository _companyRepository; + + + public FormCompanies(IUnityContainer container, ICompanyRepository + companyRepository) + { + InitializeComponent(); + _container = container ?? throw new ArgumentNullException(nameof(container)); + _companyRepository = companyRepository ?? throw new ArgumentNullException(nameof(companyRepository)); + } + + private void FormCompanies_Load(object sender, EventArgs e) + { + try + { + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при загрузке", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonAdd_Click(object sender, EventArgs e) + { + try + { + _container.Resolve<FormCompany>().ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при добавлении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void buttonUpd_Click(object sender, EventArgs e) + { + if (!TryGetIdentifierFromSelectedRow(out var findId)) + { + return; + } + try + { + var form = _container.Resolve<FormCompany>(); + form.Id = findId; + form.ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при изменении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void buttonDel_Click(object sender, EventArgs e) + { + if (!TryGetIdentifierFromSelectedRow(out var findId)) + { + return; + } + if (MessageBox.Show("Удалить запись?", "Удаление", + MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return; + } + try + { + _companyRepository.DeleteCompany(findId); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при удалении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void LoadList() => dataGridViewCompanies.DataSource = + _companyRepository.ReadCompanies(); + + private bool TryGetIdentifierFromSelectedRow(out int id) + { + id = 0; + if (dataGridViewCompanies.SelectedRows.Count < 1) + { + MessageBox.Show("Нет выбранной записи", "Ошибка", + MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } + id = Convert.ToInt32(dataGridViewCompanies.SelectedRows[0].Cells["Id"].Value); + return true; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs new file mode 100644 index 0000000..a44dd5a --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs @@ -0,0 +1,174 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormCompany + { + /// <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(); + textBoxName = new TextBox(); + buttonCancel = new Button(); + buttonSave = new Button(); + groupBox1 = new GroupBox(); + dataGridView1 = new DataGridView(); + ColumnTitle = new DataGridViewComboBoxColumn(); + ColumnAdditionalPrice = new DataGridViewButtonColumn(); + comboBoxCountry = new ComboBox(); + label2 = new Label(); + groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); + SuspendLayout(); + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(12, 9); + label1.Name = "label1"; + label1.Size = new Size(77, 20); + label1.TabIndex = 0; + label1.Text = "Название"; + // + // textBoxName + // + textBoxName.Location = new Point(107, 6); + textBoxName.Name = "textBoxName"; + textBoxName.Size = new Size(150, 27); + textBoxName.TabIndex = 3; + // + // buttonCancel + // + buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonCancel.BackColor = Color.IndianRed; + buttonCancel.Location = new Point(305, 318); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(135, 51); + buttonCancel.TabIndex = 17; + buttonCancel.Text = "Отмена"; + buttonCancel.UseVisualStyleBackColor = false; + buttonCancel.Click += ButtonCancel_Click; + // + // buttonSave + // + buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonSave.BackColor = Color.LimeGreen; + buttonSave.Location = new Point(446, 318); + buttonSave.Name = "buttonSave"; + buttonSave.Size = new Size(135, 51); + buttonSave.TabIndex = 16; + buttonSave.Text = "Сохранить"; + buttonSave.UseVisualStyleBackColor = false; + buttonSave.Click += ButtonSave_Click; + // + // groupBox1 + // + groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + groupBox1.Controls.Add(dataGridView1); + groupBox1.Location = new Point(283, 6); + groupBox1.Name = "groupBox1"; + groupBox1.Size = new Size(298, 306); + groupBox1.TabIndex = 19; + groupBox1.TabStop = false; + groupBox1.Text = "groupBox1"; + // + // dataGridView1 + // + dataGridView1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView1.Columns.AddRange(new DataGridViewColumn[] { ColumnTitle, ColumnAdditionalPrice }); + dataGridView1.Location = new Point(3, 23); + dataGridView1.MultiSelect = false; + dataGridView1.Name = "dataGridView1"; + dataGridView1.RowHeadersVisible = false; + dataGridView1.RowHeadersWidth = 51; + dataGridView1.Size = new Size(292, 280); + dataGridView1.TabIndex = 0; + // + // ColumnTitle + // + ColumnTitle.HeaderText = "Название путевки"; + ColumnTitle.MinimumWidth = 6; + ColumnTitle.Name = "ColumnTitle"; + // + // ColumnAdditionalPrice + // + ColumnAdditionalPrice.HeaderText = "Надбавка фирмы"; + ColumnAdditionalPrice.MinimumWidth = 6; + ColumnAdditionalPrice.Name = "ColumnAdditionalPrice"; + ColumnAdditionalPrice.Resizable = DataGridViewTriState.True; + // + // comboBoxCountry + // + comboBoxCountry.FormattingEnabled = true; + comboBoxCountry.Location = new Point(107, 67); + comboBoxCountry.Name = "comboBoxCountry"; + comboBoxCountry.Size = new Size(150, 28); + comboBoxCountry.TabIndex = 20; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(12, 67); + label2.Name = "label2"; + label2.Size = new Size(58, 20); + label2.TabIndex = 21; + label2.Text = "Страна"; + // + // FormCompany + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(593, 381); + Controls.Add(label2); + Controls.Add(comboBoxCountry); + Controls.Add(groupBox1); + Controls.Add(buttonCancel); + Controls.Add(buttonSave); + Controls.Add(textBoxName); + Controls.Add(label1); + Name = "FormCompany"; + StartPosition = FormStartPosition.CenterParent; + Text = "Компания"; + groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Label label1; + private TextBox textBoxName; + private Button buttonCancel; + private Button buttonSave; + private GroupBox groupBox1; + private DataGridView dataGridView1; + private DataGridViewComboBoxColumn ColumnTitle; + private DataGridViewButtonColumn ColumnAdditionalPrice; + private ComboBox comboBoxCountry; + private Label label2; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs new file mode 100644 index 0000000..d756f51 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs @@ -0,0 +1,103 @@ +using Microsoft.VisualBasic.FileIO; +using ProjectTourismCompany.Entities; +using ProjectTourismCompany.Entities.Enums; +using ProjectTourismCompany.Repositories; +using ProjectTourismCompany.Repositories.Implementations; +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 ProjectTourismCompany.Forms; + +public partial class FormCompany : Form +{ + private readonly ICompanyRepository _companyRepository; + private int? _companyId; + public int Id + { + set + { + try + { + var client = _companyRepository.ReadCompanyById(value); + if (client == null) + { + throw new InvalidDataException(nameof(client)); + } + + textBoxName.Text = client.Name; + comboBoxCountry.SelectedItem = client.CountryId; + _companyId = value; + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при получении данных", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + } + } + + + + + public FormCompany( + ICompanyRepository companyRepository, + ITripRepository tripRepository, + ICountryRepository countryRepository) + { + InitializeComponent(); + _companyRepository = companyRepository ?? + throw new ArgumentNullException(nameof(companyRepository)); + comboBoxCountry.DataSource = countryRepository.ReadCountries(); + comboBoxCountry.DisplayMember = "Name"; + comboBoxCountry.ValueMember = "Id"; + + ColumnTitle.DataSource = tripRepository.ReadTrips(); + ColumnTitle.DisplayMember = "Title"; + ColumnTitle.ValueMember = "Id"; + } + + + private void ButtonSave_Click(object sender, EventArgs e) + { + try + { + if (dataGridView1.RowCount < 1 || + comboBoxCountry.SelectedIndex < 0) + { + throw new Exception("Имеются незаполненные поля"); + } + _companyRepository.CreateCompany(Company.CreateCompany(0, textBoxName.Text, (int)comboBoxCountry.SelectedItem!, CreateListCompanyTripFromDataGrid())); + Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при сохранении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void ButtonCancel_Click(object sender, EventArgs e) => + Close(); + private List<CompanyTrip> CreateListCompanyTripFromDataGrid() + { + var list = new List<CompanyTrip>(); + foreach (DataGridViewRow row in dataGridView1.Rows) + { + if (row.Cells["ColumnAdditionalPrice"].Value == null || + row.Cells["ColumnTitle"].Value == null) + { + continue; + } + list.Add(CompanyTrip.CreateCompanyTrip(0, 0, + Convert.ToInt32(row.Cells["ColumnTitle"].Value), + Convert.ToInt32(row.Cells["ColumnAdditionalPrice"].Value))); + } + return list; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx new file mode 100644 index 0000000..25abefb --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx @@ -0,0 +1,126 @@ +<?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="ColumnTitle.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColumnAdditionalPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> +</root> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs new file mode 100644 index 0000000..8d9df93 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs @@ -0,0 +1,126 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormCountries + { + /// <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(); + panel1 = new Panel(); + buttonDelCountry = new Button(); + buttonUpdCountry = new Button(); + buttonAddCountry = new Button(); + ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); + panel1.SuspendLayout(); + SuspendLayout(); + // + // dataGridView1 + // + dataGridView1.AllowUserToAddRows = false; + dataGridView1.AllowUserToDeleteRows = false; + dataGridView1.AllowUserToResizeColumns = false; + dataGridView1.AllowUserToResizeRows = false; + dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView1.ColumnHeadersVisible = false; + dataGridView1.Dock = DockStyle.Fill; + dataGridView1.Location = new Point(0, 0); + dataGridView1.MultiSelect = false; + dataGridView1.Name = "dataGridView1"; + dataGridView1.ReadOnly = true; + dataGridView1.RowHeadersWidth = 51; + dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dataGridView1.Size = new Size(800, 450); + dataGridView1.TabIndex = 0; + // + // panel1 + // + panel1.Controls.Add(buttonDelCountry); + panel1.Controls.Add(buttonUpdCountry); + panel1.Controls.Add(buttonAddCountry); + panel1.Dock = DockStyle.Right; + panel1.Location = new Point(642, 0); + panel1.Name = "panel1"; + panel1.Size = new Size(158, 450); + panel1.TabIndex = 1; + // + // buttonDelCountry + // + buttonDelCountry.BackgroundImage = Properties.Resources.minus; + buttonDelCountry.BackgroundImageLayout = ImageLayout.Stretch; + buttonDelCountry.Location = new Point(38, 198); + buttonDelCountry.Name = "buttonDelCountry"; + buttonDelCountry.Size = new Size(94, 80); + buttonDelCountry.TabIndex = 7; + buttonDelCountry.UseVisualStyleBackColor = true; + buttonDelCountry.Click += buttonDel_Click; + // + // buttonUpdCountry + // + buttonUpdCountry.BackgroundImage = Properties.Resources.pencil; + buttonUpdCountry.BackgroundImageLayout = ImageLayout.Stretch; + buttonUpdCountry.Location = new Point(38, 112); + buttonUpdCountry.Name = "buttonUpdCountry"; + buttonUpdCountry.Size = new Size(94, 80); + buttonUpdCountry.TabIndex = 6; + buttonUpdCountry.UseVisualStyleBackColor = true; + buttonUpdCountry.Click += buttonUpd_Click; + // + // buttonAddCountry + // + buttonAddCountry.BackgroundImage = Properties.Resources.plus; + buttonAddCountry.BackgroundImageLayout = ImageLayout.Stretch; + buttonAddCountry.Location = new Point(38, 26); + buttonAddCountry.Name = "buttonAddCountry"; + buttonAddCountry.Size = new Size(94, 80); + buttonAddCountry.TabIndex = 4; + buttonAddCountry.UseVisualStyleBackColor = true; + buttonAddCountry.Click += buttonAdd_Click; + // + // FormCountries + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(panel1); + Controls.Add(dataGridView1); + Name = "FormCountries"; + StartPosition = FormStartPosition.CenterParent; + Text = "Страны"; + ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); + panel1.ResumeLayout(false); + ResumeLayout(false); + } + + #endregion + + private DataGridView dataGridView1; + private Panel panel1; + private Button buttonAddCountry; + private Button buttonDelCountry; + private Button buttonUpdCountry; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs new file mode 100644 index 0000000..3e6380d --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs @@ -0,0 +1,116 @@ +using ProjectTourismCompany.Repositories; +using ProjectTourismCompany.Repositories.Implementations; +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; +using Unity; + +namespace ProjectTourismCompany.Forms; + +public partial class FormCountries : Form +{ + private readonly IUnityContainer _container; + private readonly ICountryRepository _countryRepository; + + + public FormCountries(IUnityContainer container, ICountryRepository countryRepository) + { + InitializeComponent(); + _container = container ?? throw new ArgumentNullException(nameof(container)); + _countryRepository = countryRepository ?? throw new ArgumentNullException(nameof(countryRepository)); + } + + private void FormCompanies_Load(object sender, EventArgs e) + { + try + { + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при загрузке", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonAdd_Click(object sender, EventArgs e) + { + try + { + _container.Resolve<FormCountry>().ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при добавлении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonUpd_Click(object sender, EventArgs e) + { + if (!TryGetIdentifierFromSelectedRow(out var findId)) + { + return; + } + try + { + + var form = _container.Resolve<FormCountry>(); + form.Id = findId; + form.ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при изменении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonDel_Click(object sender, EventArgs e) + { + if (!TryGetIdentifierFromSelectedRow(out var findId)) + { + return; + } + if (MessageBox.Show("Удалить запись?", "Удаление", + MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return; + } + try + { + _countryRepository.DeleteCountry(findId); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при удалении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void LoadList() => dataGridView1.DataSource = + _countryRepository.ReadCountries(); + + private bool TryGetIdentifierFromSelectedRow(out int id) + { + id = 0; + if (dataGridView1.SelectedRows.Count < 1) + { + MessageBox.Show("Нет выбранной записи", "Ошибка", + MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } + id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Id"].Value); + return true; + } + +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.Designer.cs new file mode 100644 index 0000000..fc82c19 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.Designer.cs @@ -0,0 +1,98 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormCountry + { + /// <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() + { + buttonCancel = new Button(); + buttonSave = new Button(); + textBoxName = new TextBox(); + label1 = new Label(); + SuspendLayout(); + // + // buttonCancel + // + buttonCancel.BackColor = Color.IndianRed; + buttonCancel.Location = new Point(33, 76); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(135, 51); + buttonCancel.TabIndex = 17; + buttonCancel.Text = "Отмена"; + buttonCancel.UseVisualStyleBackColor = false; + buttonCancel.Click += buttonCancel_Click; + // + // buttonSave + // + buttonSave.BackColor = Color.LimeGreen; + buttonSave.Location = new Point(174, 76); + buttonSave.Name = "buttonSave"; + buttonSave.Size = new Size(135, 51); + buttonSave.TabIndex = 16; + buttonSave.Text = "Сохранить"; + buttonSave.UseVisualStyleBackColor = false; + buttonSave.Click += buttonSave_Click; + // + // textBoxName + // + textBoxName.Location = new Point(107, 6); + textBoxName.Name = "textBoxName"; + textBoxName.Size = new Size(150, 27); + textBoxName.TabIndex = 21; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(12, 9); + label1.Name = "label1"; + label1.Size = new Size(77, 20); + label1.TabIndex = 18; + label1.Text = "Название"; + // + // FormCountry + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(321, 139); + Controls.Add(textBoxName); + Controls.Add(label1); + Controls.Add(buttonCancel); + Controls.Add(buttonSave); + Name = "FormCountry"; + StartPosition = FormStartPosition.CenterParent; + Text = "Страна"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Button buttonCancel; + private Button buttonSave; + private TextBox textBoxName; + private Label label1; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.cs new file mode 100644 index 0000000..33731b3 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.cs @@ -0,0 +1,81 @@ +using ProjectTourismCompany.Entities; +using ProjectTourismCompany.Repositories; +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 ProjectTourismCompany.Forms; + +public partial class FormCountry : Form +{ + + private readonly ICountryRepository _countryRepository; + private int? _countryId; + public int Id + { + set + { + try + { + var country = _countryRepository.ReadCountryById(value); + if (country == null) + { + throw new InvalidDataException(nameof(country)); + } + + textBoxName.Text = country.CountryName; + _countryId = value; + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при получении данных", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + } + } + + + public FormCountry(ICountryRepository countryRepository) + { + InitializeComponent(); + _countryRepository = countryRepository ?? throw new ArgumentNullException(nameof(countryRepository)); + } + + private void buttonSave_Click(object sender, EventArgs e) + { + try + { + if (string.IsNullOrWhiteSpace(textBoxName.Text)) + { + throw new Exception("Имеются незаполненные поля"); + } + if (_countryId.HasValue) + { + _countryRepository.UpdateCountry(CreateCountry(_countryId.Value)); + } + else + { + _countryRepository.UpdateCountry(CreateCountry(0)); + } + Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при сохранении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonCancel_Click(object sender, EventArgs e) => Close(); + + private Country CreateCountry(int id) + { + return Country.CreateCountry(id, textBoxName.Text); + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountry.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs new file mode 100644 index 0000000..d2e3da6 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs @@ -0,0 +1,264 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormTrip + { + /// <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() + { + labelPrice = new Label(); + labelHumanCapacity = new Label(); + labelStartDate = new Label(); + labelEndDate = new Label(); + labelStartCity = new Label(); + labelEndCity = new Label(); + labelTravelType = new Label(); + numericUpDownPrice = new NumericUpDown(); + numericUpDownHumanCapacity = new NumericUpDown(); + dateTimePickerStartDate = new DateTimePicker(); + dateTimePickerEndDate = new DateTimePicker(); + textBoxStartCity = new TextBox(); + textBoxEndCity = new TextBox(); + checkedListBoxTravelType = new CheckedListBox(); + buttonCancel = new Button(); + buttonSave = new Button(); + label1 = new Label(); + textBoxTitle = new TextBox(); + ((System.ComponentModel.ISupportInitialize)numericUpDownPrice).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDownHumanCapacity).BeginInit(); + SuspendLayout(); + // + // labelPrice + // + labelPrice.AutoSize = true; + labelPrice.Location = new Point(36, 71); + labelPrice.Name = "labelPrice"; + labelPrice.Size = new Size(45, 20); + labelPrice.TabIndex = 0; + labelPrice.Text = "Цена"; + // + // labelHumanCapacity + // + labelHumanCapacity.AutoSize = true; + labelHumanCapacity.Location = new Point(36, 116); + labelHumanCapacity.Name = "labelHumanCapacity"; + labelHumanCapacity.Size = new Size(142, 20); + labelHumanCapacity.TabIndex = 1; + labelHumanCapacity.Text = "Человек максимум"; + // + // labelStartDate + // + labelStartDate.AutoSize = true; + labelStartDate.Location = new Point(36, 172); + labelStartDate.Name = "labelStartDate"; + labelStartDate.Size = new Size(94, 20); + labelStartDate.TabIndex = 2; + labelStartDate.Text = "Дата начала"; + // + // labelEndDate + // + labelEndDate.AutoSize = true; + labelEndDate.Location = new Point(36, 227); + labelEndDate.Name = "labelEndDate"; + labelEndDate.Size = new Size(87, 20); + labelEndDate.TabIndex = 3; + labelEndDate.Text = "Дата конца"; + // + // labelStartCity + // + labelStartCity.AutoSize = true; + labelStartCity.Location = new Point(36, 285); + labelStartCity.Name = "labelStartCity"; + labelStartCity.Size = new Size(129, 20); + labelStartCity.TabIndex = 4; + labelStartCity.Text = "Стартовый город"; + // + // labelEndCity + // + labelEndCity.AutoSize = true; + labelEndCity.Location = new Point(36, 339); + labelEndCity.Name = "labelEndCity"; + labelEndCity.Size = new Size(126, 20); + labelEndCity.TabIndex = 5; + labelEndCity.Text = "Конечный город"; + // + // labelTravelType + // + labelTravelType.AutoSize = true; + labelTravelType.Location = new Point(35, 427); + labelTravelType.Name = "labelTravelType"; + labelTravelType.Size = new Size(127, 20); + labelTravelType.TabIndex = 6; + labelTravelType.Text = "Тип путешествия"; + // + // numericUpDownPrice + // + numericUpDownPrice.Location = new Point(273, 69); + numericUpDownPrice.Maximum = new decimal(new int[] { 1000000, 0, 0, 0 }); + numericUpDownPrice.Minimum = new decimal(new int[] { 10000, 0, 0, 0 }); + numericUpDownPrice.Name = "numericUpDownPrice"; + numericUpDownPrice.Size = new Size(220, 27); + numericUpDownPrice.TabIndex = 7; + numericUpDownPrice.Value = new decimal(new int[] { 10000, 0, 0, 0 }); + // + // numericUpDownHumanCapacity + // + numericUpDownHumanCapacity.Location = new Point(273, 114); + numericUpDownHumanCapacity.Minimum = new decimal(new int[] { 5, 0, 0, 0 }); + numericUpDownHumanCapacity.Name = "numericUpDownHumanCapacity"; + numericUpDownHumanCapacity.Size = new Size(220, 27); + numericUpDownHumanCapacity.TabIndex = 8; + numericUpDownHumanCapacity.Value = new decimal(new int[] { 5, 0, 0, 0 }); + // + // dateTimePickerStartDate + // + dateTimePickerStartDate.Location = new Point(273, 167); + dateTimePickerStartDate.Name = "dateTimePickerStartDate"; + dateTimePickerStartDate.Size = new Size(220, 27); + dateTimePickerStartDate.TabIndex = 9; + // + // dateTimePickerEndDate + // + dateTimePickerEndDate.Location = new Point(273, 222); + dateTimePickerEndDate.Name = "dateTimePickerEndDate"; + dateTimePickerEndDate.Size = new Size(220, 27); + dateTimePickerEndDate.TabIndex = 10; + // + // textBoxStartCity + // + textBoxStartCity.Location = new Point(273, 285); + textBoxStartCity.Name = "textBoxStartCity"; + textBoxStartCity.Size = new Size(220, 27); + textBoxStartCity.TabIndex = 11; + // + // textBoxEndCity + // + textBoxEndCity.Location = new Point(273, 339); + textBoxEndCity.Name = "textBoxEndCity"; + textBoxEndCity.Size = new Size(220, 27); + textBoxEndCity.TabIndex = 12; + // + // checkedListBoxTravelType + // + checkedListBoxTravelType.FormattingEnabled = true; + checkedListBoxTravelType.Location = new Point(273, 383); + checkedListBoxTravelType.Name = "checkedListBoxTravelType"; + checkedListBoxTravelType.Size = new Size(220, 114); + checkedListBoxTravelType.TabIndex = 13; + // + // buttonCancel + // + buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCancel.BackColor = Color.IndianRed; + buttonCancel.Location = new Point(214, 512); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(135, 51); + buttonCancel.TabIndex = 15; + buttonCancel.Text = "Отмена"; + buttonCancel.UseVisualStyleBackColor = false; + buttonCancel.Click += ButtonCancel_Click; + // + // buttonSave + // + buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonSave.BackColor = Color.LimeGreen; + buttonSave.Location = new Point(361, 512); + buttonSave.Name = "buttonSave"; + buttonSave.Size = new Size(135, 51); + buttonSave.TabIndex = 14; + buttonSave.Text = "Сохранить"; + buttonSave.UseVisualStyleBackColor = false; + buttonSave.Click += ButtonSave_Click; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(36, 12); + label1.Name = "label1"; + label1.Size = new Size(111, 20); + label1.TabIndex = 16; + label1.Text = "Название тура"; + // + // textBoxTitle + // + textBoxTitle.Location = new Point(273, 12); + textBoxTitle.Name = "textBoxTitle"; + textBoxTitle.Size = new Size(220, 27); + textBoxTitle.TabIndex = 17; + // + // FormTrip + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(508, 573); + Controls.Add(textBoxTitle); + Controls.Add(label1); + Controls.Add(buttonCancel); + Controls.Add(buttonSave); + Controls.Add(checkedListBoxTravelType); + Controls.Add(textBoxEndCity); + Controls.Add(textBoxStartCity); + Controls.Add(dateTimePickerEndDate); + Controls.Add(dateTimePickerStartDate); + Controls.Add(numericUpDownHumanCapacity); + Controls.Add(numericUpDownPrice); + Controls.Add(labelTravelType); + Controls.Add(labelEndCity); + Controls.Add(labelStartCity); + Controls.Add(labelEndDate); + Controls.Add(labelStartDate); + Controls.Add(labelHumanCapacity); + Controls.Add(labelPrice); + Name = "FormTrip"; + StartPosition = FormStartPosition.CenterParent; + Text = "Туры"; + ((System.ComponentModel.ISupportInitialize)numericUpDownPrice).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDownHumanCapacity).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Label labelPrice; + private Label labelHumanCapacity; + private Label labelStartDate; + private Label labelEndDate; + private Label labelStartCity; + private Label labelEndCity; + private Label labelTravelType; + private NumericUpDown numericUpDownPrice; + private NumericUpDown numericUpDownHumanCapacity; + private DateTimePicker dateTimePickerStartDate; + private DateTimePicker dateTimePickerEndDate; + private TextBox textBoxStartCity; + private TextBox textBoxEndCity; + private CheckedListBox checkedListBoxTravelType; + private Button buttonCancel; + private Button buttonSave; + private Label label1; + private TextBox textBoxTitle; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs new file mode 100644 index 0000000..0735bfe --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs @@ -0,0 +1,110 @@ +using Microsoft.VisualBasic.FileIO; +using ProjectTourismCompany.Entities; +using ProjectTourismCompany.Entities.Enums; +using ProjectTourismCompany.Repositories; +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 ProjectTourismCompany.Forms; + +public partial class FormTrip : Form +{ + private readonly ITripRepository _tripRepository; + private int? _tripId; + public int Id + { + set + { + try + { + var trip = _tripRepository.ReadTripById(value); + if (trip == null) + { + throw new + InvalidDataException(nameof(trip)); + } + textBoxStartCity.Text = trip.StartCity; + textBoxEndCity.Text = trip.EndCity; + numericUpDownHumanCapacity.Value = trip.HumanCapacity; + numericUpDownPrice.Value = trip.Price; + dateTimePickerEndDate.Value = trip.EndDate; + dateTimePickerStartDate.Value = trip.StartDate; + _tripId = value; + + foreach (TravelType elem in +Enum.GetValues(typeof(TravelType))) + { + if ((elem & trip.TravelType) != 0) + { + checkedListBoxTravelType.SetItemChecked(checkedListBoxTravelType.Items.IndexOf( + elem), true); + } + } + + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при получении данных", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + } + } + public FormTrip(ITripRepository tripRepository) + { + InitializeComponent(); + _tripRepository = tripRepository ?? throw new ArgumentNullException(nameof(tripRepository)); + foreach (var elem in Enum.GetValues(typeof(TravelType))) + { + checkedListBoxTravelType.Items.Add(elem); + } + + } + private void ButtonSave_Click(object sender, EventArgs e) + { + try + { + if (string.IsNullOrWhiteSpace(textBoxStartCity.Text) || + string.IsNullOrWhiteSpace(textBoxEndCity.Text)) + { + throw new Exception("Имеются незаполненные поля"); + } + + if (_tripId.HasValue) + { + _tripRepository.CreateTrip(CreateTrip(_tripId.Value)); + } + else + { + _tripRepository.CreateTrip(CreateTrip(0)); + } + + Close(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при сохранении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void ButtonCancel_Click(object sender, EventArgs e) => + Close(); + + private Trip CreateTrip(int id) + { + TravelType tr = TravelType.None; + foreach (var elem in checkedListBoxTravelType.CheckedItems) + { + tr |= (TravelType)elem; + } + return Trip.CreateOpeartion(0, textBoxTitle.Text, (int)numericUpDownPrice.Value, + (int)numericUpDownHumanCapacity.Value, dateTimePickerStartDate.Value, dateTimePickerEndDate.Value, + textBoxStartCity.Text, textBoxEndCity.Text, tr); + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs new file mode 100644 index 0000000..f62873e --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs @@ -0,0 +1,98 @@ +namespace ProjectTourismCompany.Forms +{ + partial class FormTrips + { + /// <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(); + panel1 = new Panel(); + buttonAddTrip = new Button(); + ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); + panel1.SuspendLayout(); + SuspendLayout(); + // + // dataGridView1 + // + dataGridView1.AllowUserToAddRows = false; + dataGridView1.AllowUserToDeleteRows = false; + dataGridView1.AllowUserToResizeColumns = false; + dataGridView1.AllowUserToResizeRows = false; + dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView1.ColumnHeadersVisible = false; + dataGridView1.Dock = DockStyle.Fill; + dataGridView1.Location = new Point(0, 0); + dataGridView1.MultiSelect = false; + dataGridView1.Name = "dataGridView1"; + dataGridView1.ReadOnly = true; + dataGridView1.RowHeadersWidth = 51; + dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dataGridView1.Size = new Size(800, 450); + dataGridView1.TabIndex = 0; + // + // panel1 + // + panel1.Controls.Add(buttonAddTrip); + panel1.Dock = DockStyle.Right; + panel1.Location = new Point(645, 0); + panel1.Name = "panel1"; + panel1.Size = new Size(155, 450); + panel1.TabIndex = 1; + // + // buttonAddTrip + // + buttonAddTrip.BackgroundImage = Properties.Resources.plus; + buttonAddTrip.BackgroundImageLayout = ImageLayout.Stretch; + buttonAddTrip.Location = new Point(34, 31); + buttonAddTrip.Name = "buttonAddTrip"; + buttonAddTrip.Size = new Size(94, 80); + buttonAddTrip.TabIndex = 5; + buttonAddTrip.UseVisualStyleBackColor = true; + buttonAddTrip.Click += ButtonAdd_Click; + // + // FormTrips + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(panel1); + Controls.Add(dataGridView1); + Name = "FormTrips"; + StartPosition = FormStartPosition.CenterParent; + Text = "Туры"; + ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); + panel1.ResumeLayout(false); + ResumeLayout(false); + } + + #endregion + + private DataGridView dataGridView1; + private Panel panel1; + private Button buttonAddTrip; + } +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs new file mode 100644 index 0000000..178adaa --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs @@ -0,0 +1,64 @@ +using ProjectTourismCompany.Repositories; +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; +using Unity; + +namespace ProjectTourismCompany.Forms; + +public partial class FormTrips : Form +{ + private readonly IUnityContainer _container; + private readonly ITripRepository _tripRepository; + + public FormTrips(IUnityContainer container, ITripRepository tripRepository) + { + InitializeComponent(); + _container = container ?? + throw new ArgumentNullException(nameof(container)); + _tripRepository = tripRepository ?? + throw new + ArgumentNullException(nameof(tripRepository)); + } + + + private void FormChecks_Load(object sender, EventArgs e) + { + try + { + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при загрузке", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + + private void ButtonAdd_Click(object sender, EventArgs e) + { + try + { + _container.Resolve<FormTrip>().ShowDialog(); + LoadList(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка при добавлении", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + + + private void LoadList() => dataGridView1.DataSource = + _tripRepository.ReadTrips(); +} + diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.resx @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Program.cs b/ProjectTourismCompany/ProjectTourismCompany/Program.cs index 332a19c..aeeef48 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Program.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Program.cs @@ -1,17 +1,30 @@ -namespace ProjectTourismCompany +using Unity.Lifetime; +using Unity; +using ProjectTourismCompany.Repositories; +using ProjectTourismCompany.Repositories.Implementations; +using ProjectTourismCompany; + +internal static class Program { - internal static class Program + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() { - /// <summary> - /// The main entry point for the application. - /// </summary> - [STAThread] - static void Main() - { - // To customize application configuration such as set high DPI settings or default font, - // see https://aka.ms/applicationconfiguration. - ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); - } + + ApplicationConfiguration.Initialize(); + Application.Run(CreateContainer().Resolve<FormTourismCompany>()); } -} \ No newline at end of file + private static IUnityContainer CreateContainer() + { + var container = new UnityContainer(); + container.RegisterType<ICheckRepository, CheckRepository>(new TransientLifetimeManager()); + container.RegisterType<IClientRepository, ClientRepository>(new TransientLifetimeManager()); + container.RegisterType<ICompanyRepository, CompanyRepository>(new TransientLifetimeManager()); + container.RegisterType<ICountryRepository, CountryRepository>(new TransientLifetimeManager()); + container.RegisterType<ITripRepository, TripRepository>(new TransientLifetimeManager()); + + return container; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/ProjectTourismCompany.csproj b/ProjectTourismCompany/ProjectTourismCompany/ProjectTourismCompany.csproj index 663fdb8..accbdf0 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/ProjectTourismCompany.csproj +++ b/ProjectTourismCompany/ProjectTourismCompany/ProjectTourismCompany.csproj @@ -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> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Properties/DataSources/ProjectTourismCompany.Entities.Country.datasource b/ProjectTourismCompany/ProjectTourismCompany/Properties/DataSources/ProjectTourismCompany.Entities.Country.datasource new file mode 100644 index 0000000..b1aa628 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Properties/DataSources/ProjectTourismCompany.Entities.Country.datasource @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="Country" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>ProjectTourismCompany.Entities.Country, ProjectTourismCompany, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.Designer.cs new file mode 100644 index 0000000..5c40735 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace ProjectTourismCompany.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("ProjectTourismCompany.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 minus { + get { + object obj = ResourceManager.GetObject("minus", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap pencil { + get { + object obj = ResourceManager.GetObject("pencil", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap plus { + get { + object obj = ResourceManager.GetObject("plus", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap Карта_мира { + get { + object obj = ResourceManager.GetObject("Карта мира", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.resx b/ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.resx new file mode 100644 index 0000000..9c7b01f --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Properties/Resources.resx @@ -0,0 +1,133 @@ +<?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="pencil" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\pencil.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="plus" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\plus.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Карта мира" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Карта мира.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="minus" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\minus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> +</root> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICheckRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICheckRepository.cs new file mode 100644 index 0000000..957364f --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICheckRepository.cs @@ -0,0 +1,18 @@ +using ProjectTourismCompany.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories; + +public interface ICheckRepository +{ + IEnumerable<Check> ReadChecks(DateTime? dateFrom = +null, DateTime? dateTo = null, +int? tripId = null, int? clientId = null); + Check ReadCheckById(int id); + void CreateCheck(Check check); + void DeleteCheck(int id); +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/IClientRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/IClientRepository.cs new file mode 100644 index 0000000..ce2b68c --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/IClientRepository.cs @@ -0,0 +1,17 @@ +using ProjectTourismCompany.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories; + +public interface IClientRepository +{ + IEnumerable<Client> ReadClients(); + Client ReadClientById(int id); + void CreateClient(Client client); + void UpdateClient(Client client); + void DeleteClient(int id); +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICompanyRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICompanyRepository.cs new file mode 100644 index 0000000..a6b1bef --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICompanyRepository.cs @@ -0,0 +1,18 @@ +using ProjectTourismCompany.Entities; +using ProjectTourismCompany.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories; + +public interface ICompanyRepository +{ + IEnumerable<Company> ReadCompanies(); + Company ReadCompanyById(int id); + void CreateCompany(Company company); + void UpdateCompany(Company company); + void DeleteCompany(int id); +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICountryRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICountryRepository.cs new file mode 100644 index 0000000..c269d32 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ICountryRepository.cs @@ -0,0 +1,17 @@ +using ProjectTourismCompany.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories; + +public interface ICountryRepository +{ + IEnumerable<Country> ReadCountries(); + Country ReadCountryById(int id); + void CreateCountry(Country country); + void UpdateCountry(Country country); + void DeleteCountry(int id); +} \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/ITripRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ITripRepository.cs new file mode 100644 index 0000000..74a1e73 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/ITripRepository.cs @@ -0,0 +1,21 @@ +using ProjectTourismCompany.Entities; +using ProjectTourismCompany.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories; + +public interface ITripRepository +{ + IEnumerable<Trip> ReadTrips(DateTime? dateForm = null, +DateTime? dateTo = null, int? tripId = null, +int? companyId = null, int? countryId = null); + + Trip ReadTripById(int id); + + void CreateTrip(Trip trip); +} + diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CheckRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CheckRepository.cs new file mode 100644 index 0000000..4d1dd34 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CheckRepository.cs @@ -0,0 +1,34 @@ +using Microsoft.VisualBasic.FileIO; +using ProjectTourismCompany.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories.Implementations; + +internal class CheckRepository : ICheckRepository +{ + + + public void CreateCheck(Check check) + { + + } + + public void DeleteCheck(int id) + { + + } + + public IEnumerable<Check> ReadChecks(DateTime? dateFrom = null, DateTime? dateTo = null, int? tripId = null, int? clientId = null) + { + return []; + } + + public Check ReadCheckById(int id) + { + return Check.CreateCheck(0, "title", DateTime.Now, 500, 1, 2); + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/ClientRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/ClientRepository.cs new file mode 100644 index 0000000..086a418 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/ClientRepository.cs @@ -0,0 +1,36 @@ +using ProjectTourismCompany.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories.Implementations; + +internal class ClientRepository : IClientRepository +{ + public void CreateClient(Client client) + { + + } + + public void DeleteClient(int id) + { + + } + + public Client ReadClientById(int id) + { + return Client.CreateClient(0, string.Empty, DateTime.Now, ClientStatus.None, "1") ; + } + + public IEnumerable<Client> ReadClients() + { + return []; + } + + public void UpdateClient(Client client) + { + + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs new file mode 100644 index 0000000..1c7f6c2 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs @@ -0,0 +1,36 @@ +using ProjectTourismCompany.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories.Implementations; + +internal class CompanyRepository : ICompanyRepository +{ + public void CreateCompany(Company company) + { + + } + + public void DeleteCompany(int id) + { + + } + + public IEnumerable<Company> ReadCompanies() + { + return []; + } + + public Company ReadCompanyById(int id) + { + return Company.CreateCompany(1, "randomName", 73, []); + } + + public void UpdateCompany(Company company) + { + + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CountryRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CountryRepository.cs new file mode 100644 index 0000000..bfc7d47 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CountryRepository.cs @@ -0,0 +1,36 @@ +using ProjectTourismCompany.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories.Implementations; + +internal class CountryRepository : ICountryRepository +{ + public void CreateCountry(Country country) + { + + } + + public void DeleteCountry(int id) + { + + } + + public IEnumerable<Country> ReadCountries() + { + return []; + } + + public Country ReadCountryById(int id) + { + return Country.CreateCountry(73, "Russia"); + } + + public void UpdateCountry(Country country) + { + + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs new file mode 100644 index 0000000..6ec44e3 --- /dev/null +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs @@ -0,0 +1,26 @@ +using ProjectTourismCompany.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTourismCompany.Repositories.Implementations; + +internal class TripRepository : ITripRepository +{ + public void CreateTrip(Trip trip) + { + + } + + public Trip ReadTripById(int id) + { + return Trip.CreateOpeartion(0, "a", 0, 0, DateTime.Now, DateTime.Now, "Moscow", "Piter", Entities.Enums.TravelType.None); + } + + public IEnumerable<Trip> ReadTrips(DateTime? dateForm = null, DateTime? dateTo = null, int? tripId = null, int? companyId = null, int? countryId = null) + { + return []; + } +} diff --git a/ProjectTourismCompany/ProjectTourismCompany/Resources/minus.png b/ProjectTourismCompany/ProjectTourismCompany/Resources/minus.png new file mode 100644 index 0000000000000000000000000000000000000000..6d2738c3eab3dd6cac7643af1cd2545e31147247 GIT binary patch literal 2428 zcmV-?34`{DP)<h;3K|Lk000e1NJLTq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any/ProjectTourismCompany/Resources/pencil.jpg b/ProjectTourismCompany/ProjectTourismCompany/Resources/pencil.jpg new file mode 100644 index 0000000000000000000000000000000000000000..72caf93d9b134f63169c1dd83c53ce07e20ef9da GIT binary patch literal 12382 zcmeHN2{@GP`hRD$)7T};7_!D#vyPpRoi;^g!(=xjYZ+46vX!*jm(-`UX-`C2WNERK zQdEeFs8I2LXGYTbX1?z%|8uVEoa=k93(ws5@4kQc_CD`o=DO!z07wU0ds_ek9xEU# z0ATJVK(mP^`vHKxy(+*3000aSfIxwj;7S|(k%S-s2>3Su{8=`?4g=Tp!-Iee!r_BR zC~7DQ7ZQV_kYh<2sI?>lH8cWc9~2Zxp+?}S<j@e5jjIPrOA}>F4kBr+0Nv3&{`foh z5^*emN)0o@U_vMwIASQCq(KM`#zf=7Fj^X#7{J6VIt)h$BvDa#l0P{Fi~ew>4viuc zvFLSrPMS_(R-^#3U2Fu&Bi7lI5F1D^B%;ksc}${>qJzVNNmLvvIyfkVVib)<Gn^ZN zYq}VNHs#?qi6HtJxm(-LW57>X^n5T;QBfLEIvSx7{unJoLqm+FHbz@p9Ym;8VnV36 zX!Q_^JlzG;hc$^ph#-eCvZedP;X@;-STuUxaaceoHIxz%8n)p6ms}UrjEsL6*@saH zx?mDkp%J77JCK9G2#P`_ViqG9ri@fEXcTImcNK|Bjj<2L`I9KC>}@?4yntRc{OLL} zL&qq%KiQA^3qO&tfDem|2x71j2^dlkDVP*OrGQv1kcwH|FtFPTXfU@(3W+Xa*aQ*% zFd*T)?|B1y9yZZniRR1AGA|H-(bm*7P}kH}*EU=r1D&~({R61KF#djWA{ZFZYN5PF zRuLp386;)Y1;s238ud3-GP0mhNK|`kELuxjYvoEUO&v`=dY<#7M(ap;4=Rqzr~)&7 z3OKy<c_CA%p@cvN9iyZ{B!65GCWuTRg-}T9IR6L|!^kX>8oW6ej3hD`3(glVgiKJx z1&0~a#gx#<2m%S~9~$Z(L|Tv%KsAo+AA+Tq3G4-!6Ifj%YaA8l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ic!yh^vLX{=|rXLSa?*$Q^9Q`Uh$$6CuFboOQAtKn@X=N?SU zOtuGquBMz1JbEJZ{8H(Cl&o08mM3TYK4r?9=jFN>)ziq%%9j(8>-8NPGb=7#n$(qY cSSRy1*5T9R%6C4ww43M6B_Q7{%;tLj5A>$a_W%F@ literal 0 HcmV?d00001 diff --git a/ProjectTourismCompany/ProjectTourismCompany/Resources/plus.jpg b/ProjectTourismCompany/ProjectTourismCompany/Resources/plus.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a8c3671221e2d213fa86328b64150e21d35540b3 GIT binary patch literal 6843 zcmd5g3p|ti`|oC0$hD$e+J+>TA%xgm$K*1Xq>E~{H<sOO!zdw~QaT}|JBifk#t}*h zxpX;otW*Ee<&<(H5#<u4_Io$mPIWr{e&_!`pY!{Fx4qxz`F@}K^L(H8eJ8vpd;+NZ z5{Lu<1`TtVIRFT|fC4W*Z5;p*i3<QE0044;Dhv)Rfgl^`HwPvUz@Rx9`sqsGOb8YY zcRHC8gJRR;xF{|yifM@=vA8rIEgnR16B&^#I*P_+(aAiJiefQQ3DGnjh>C<bqByKL zCe;!Z22yw|4$6xZVr^v(=@6-r&cZJFbJ08=+X;(haxKYJRwQUiVKK0LG8=1cX@v!x z@q9KU3*@09!6+Kj1v6NG34@|hT`<e+{H^@i9$+-hCy4`wBn5<0l42;1R16-c<ji;C zGuRA}M@I1(bSBq{?}8BvcY<KiG8ThVn&!-*u5$|ZBuHo=%mpJcCLtlgGGU=5ixY*l zc64;aTG?Q2Y%CxO3vMElN9J2FxrQPUQ!+e3E`>v5^JtL&BAMh!Rvga-gOLbkN3(b= zZZwN66aSg7vTd=)QYIpsN3n&R@L+L386TvBA~uT4qhdd$5VMM1#bQt>iC%Az$4ewK z$Wb8In@9+iNr9wVMv3-l;yrP|qiE}RpXsMkWc2Jf4qdF3O2LA3kO4AzT!_{hQZ*G_ zQEAAiA>ZP-plC_VL#M98LJB3aB@7}zy!cRvB;o$5Ul0M-#>&dU!pg?N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FIJNN!|I&bpp+10AbC`+ypUS!y9i!#$ zxxm5w2hm*tirT(r>)x&knK|5n%`i2%S6$Lr>qWn{8^LcMGjO>Z5hwZj{R&UBPQa_| z>{W4H67%elbUlK70{sI?an1*X;)?1Q@;5p<hi$2isYtoo_TSFsH<FE<9ucUrpvWv| z+Z@lcp>anDx|2pY3xT&+&XxFU+jXP6uU>CHvs!aS1b$YxT}~(O@rmWf0*Ryy!^@2U zuHl>Hei$X(Q-=XmpQb(MZaX9&>+vkn)A(3;ruBxyzG%4WB;@TC!NM$kev4plbCeM1 sn46d5UWw{k|4_ALf?&+&ag1MteY`gRQEczn;l(7j0}N_okA<E80>=>I9RL6T literal 0 HcmV?d00001 diff --git a/ProjectTourismCompany/ProjectTourismCompany/Resources/Карта мира.jpg b/ProjectTourismCompany/ProjectTourismCompany/Resources/Карта мира.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9986cea6bc492c3471ea11881aa097d7ead30312 GIT binary patch literal 21842 zcmeFYWmH|w)-JekcXxMp+qk>C1b6o!L4&(PaCg@L!QI_Sun-^wmjFrbChs}tySMK* zZg>CgF4icjraWb{_Lx;`u0QL4z5wV7GV(G21Ox;i2mS;8Yypx0EHn%(3^Xh(3@jWR zEIcAQA|e6;A~q@-GCCeMK0Y2cE-oPn4H+R36)`R@IWsvGEgb_R0|6NeI}1HK4Lt+> zD+mM}92_D%A{HVd7Cj*@A^rdB^k)#jfQNL4bcceV1RyaWpfDi*3<E>}1ON#I?(Kgi z7+6RsXt-A<_WwfvEAeL&K!yUVphKYp0K}cxf2sZdrT>RB;N~Pq+<2Jo6PCMEB14n2 zCH8|=u*jZfRdVLzoQ%6yFaW?dHKO=4(PXPN=ZOK3qEuZ2yZ?o4K`dW#2mtm|kPUQ1 zgZd)w=alT}IK~1Bgk^0*#Oo1y5rGSXOTt>+WMX#jnGt^lODSGs7`qD)KqN?zip)h5 zFiGtRGpKYX7Dy||IAonnBI%oXd=uJq=VelZD`p@mtI}@!+ZrUM1Q3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_lDE literal 0 HcmV?d00001 -- 2.25.1 From 5c5f741db563876d5b5902886ed379e00808e0c6 Mon Sep 17 00:00:00 2001 From: zw1st <144824777+zw1st@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:55:50 +0400 Subject: [PATCH 2/2] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectTourismCompany/Entities/Company.cs | 10 +-- .../ProjectTourismCompany/Entities/Trip.cs | 11 +++- .../FormTourismCompany.cs | 1 + .../Forms/FormChecks.Designer.cs | 1 + .../Forms/FormClients.Designer.cs | 1 + .../Forms/FormCompanies.Designer.cs | 1 + .../Forms/FormCompany.Designer.cs | 57 +---------------- .../Forms/FormCompany.cs | 26 +------- .../Forms/FormCompany.resx | 6 -- .../Forms/FormCountries.Designer.cs | 6 +- .../Forms/FormCountries.cs | 3 +- .../Forms/FormTrip.Designer.cs | 64 ++++++++++++++++++- .../ProjectTourismCompany/Forms/FormTrip.cs | 29 +++++++-- .../ProjectTourismCompany/Forms/FormTrip.resx | 6 ++ .../Forms/FormTrips.Designer.cs | 6 +- .../ProjectTourismCompany/Forms/FormTrips.cs | 3 +- .../Implementations/CompanyRepository.cs | 2 +- .../Implementations/TripRepository.cs | 2 +- 18 files changed, 126 insertions(+), 109 deletions(-) diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs index 36853b0..1b5e39d 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Company.cs @@ -11,14 +11,10 @@ public class Company public int Id { get; private set; } public string Name { get; private set; } = string.Empty; public int CountryId { get; private set; } - public IEnumerable<CompanyTrip> CompanyTrip - { - get; - private set; - } = []; - public static Company CreateCompany(int id, string name, int countryId, IEnumerable<CompanyTrip> companyTrip) + + public static Company CreateCompany(int id, string name, int countryId) { - return new Company() { Id = id, Name = name, CountryId = countryId, CompanyTrip = companyTrip }; + return new Company() { Id = id, Name = name, CountryId = countryId}; } } diff --git a/ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs b/ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs index 1442654..e0d65ad 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Entities/Trip.cs @@ -19,8 +19,14 @@ public class Trip public string EndCity { get; private set;} =string.Empty; public int CompanyId { get; private set; } public TravelType TravelType { get; private set; } - - public static Trip CreateOpeartion(int id, string title, int price, int humanCapacity, DateTime startDate, DateTime endDate, string startCity, string endCity, TravelType travelType) + + public IEnumerable<CompanyTrip> CompanyTrip + { + get; + private set; + } = []; + + public static Trip CreateOpeartion(int id, string title, int price, int humanCapacity, DateTime startDate, DateTime endDate, string startCity, string endCity, TravelType travelType, IEnumerable<CompanyTrip> companyTrip) { return new Trip { @@ -33,6 +39,7 @@ public class Trip StartCity = startCity, EndCity = endCity, TravelType = travelType, + CompanyTrip = companyTrip }; } } diff --git a/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs index 57e8988..f199ce5 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/FormTourismCompany.cs @@ -83,5 +83,6 @@ public partial class FormTourismCompany : Form MessageBox.Show(ex.Message, "������ ��� ��������", MessageBoxButtons.OK, MessageBoxIcon.Error); } + } } diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs index 4979bab..711e716 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormChecks.Designer.cs @@ -96,6 +96,7 @@ Controls.Add(dataGridViewChecks); Name = "FormChecks"; Text = "Чеки"; + Load += FormChecks_Load; ((System.ComponentModel.ISupportInitialize)dataGridViewChecks).EndInit(); panel1.ResumeLayout(false); ResumeLayout(false); diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs index 2f4f961..94cc393 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormClients.Designer.cs @@ -106,6 +106,7 @@ Name = "FormClients"; StartPosition = FormStartPosition.CenterParent; Text = "Клиенты"; + Load += FormClients_Load; panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridViewClient).EndInit(); ResumeLayout(false); diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs index 903e133..adf58b3 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompanies.Designer.cs @@ -110,6 +110,7 @@ Name = "FormCompanies"; StartPosition = FormStartPosition.CenterParent; Text = "Компании"; + Load += FormCompanies_Load; ((System.ComponentModel.ISupportInitialize)dataGridViewCompanies).EndInit(); panel1.ResumeLayout(false); ResumeLayout(false); diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs index a44dd5a..9e7d532 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.Designer.cs @@ -32,14 +32,8 @@ textBoxName = new TextBox(); buttonCancel = new Button(); buttonSave = new Button(); - groupBox1 = new GroupBox(); - dataGridView1 = new DataGridView(); - ColumnTitle = new DataGridViewComboBoxColumn(); - ColumnAdditionalPrice = new DataGridViewButtonColumn(); comboBoxCountry = new ComboBox(); label2 = new Label(); - groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); SuspendLayout(); // // label1 @@ -62,7 +56,7 @@ // buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonCancel.BackColor = Color.IndianRed; - buttonCancel.Location = new Point(305, 318); + buttonCancel.Location = new Point(17, 117); buttonCancel.Name = "buttonCancel"; buttonCancel.Size = new Size(135, 51); buttonCancel.TabIndex = 17; @@ -74,7 +68,7 @@ // buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonSave.BackColor = Color.LimeGreen; - buttonSave.Location = new Point(446, 318); + buttonSave.Location = new Point(158, 117); buttonSave.Name = "buttonSave"; buttonSave.Size = new Size(135, 51); buttonSave.TabIndex = 16; @@ -82,44 +76,6 @@ buttonSave.UseVisualStyleBackColor = false; buttonSave.Click += ButtonSave_Click; // - // groupBox1 - // - groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - groupBox1.Controls.Add(dataGridView1); - groupBox1.Location = new Point(283, 6); - groupBox1.Name = "groupBox1"; - groupBox1.Size = new Size(298, 306); - groupBox1.TabIndex = 19; - groupBox1.TabStop = false; - groupBox1.Text = "groupBox1"; - // - // dataGridView1 - // - dataGridView1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView1.Columns.AddRange(new DataGridViewColumn[] { ColumnTitle, ColumnAdditionalPrice }); - dataGridView1.Location = new Point(3, 23); - dataGridView1.MultiSelect = false; - dataGridView1.Name = "dataGridView1"; - dataGridView1.RowHeadersVisible = false; - dataGridView1.RowHeadersWidth = 51; - dataGridView1.Size = new Size(292, 280); - dataGridView1.TabIndex = 0; - // - // ColumnTitle - // - ColumnTitle.HeaderText = "Название путевки"; - ColumnTitle.MinimumWidth = 6; - ColumnTitle.Name = "ColumnTitle"; - // - // ColumnAdditionalPrice - // - ColumnAdditionalPrice.HeaderText = "Надбавка фирмы"; - ColumnAdditionalPrice.MinimumWidth = 6; - ColumnAdditionalPrice.Name = "ColumnAdditionalPrice"; - ColumnAdditionalPrice.Resizable = DataGridViewTriState.True; - // // comboBoxCountry // comboBoxCountry.FormattingEnabled = true; @@ -141,10 +97,9 @@ // AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(593, 381); + ClientSize = new Size(305, 180); Controls.Add(label2); Controls.Add(comboBoxCountry); - Controls.Add(groupBox1); Controls.Add(buttonCancel); Controls.Add(buttonSave); Controls.Add(textBoxName); @@ -152,8 +107,6 @@ Name = "FormCompany"; StartPosition = FormStartPosition.CenterParent; Text = "Компания"; - groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -164,10 +117,6 @@ private TextBox textBoxName; private Button buttonCancel; private Button buttonSave; - private GroupBox groupBox1; - private DataGridView dataGridView1; - private DataGridViewComboBoxColumn ColumnTitle; - private DataGridViewButtonColumn ColumnAdditionalPrice; private ComboBox comboBoxCountry; private Label label2; } diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs index d756f51..43ff829 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.cs @@ -57,10 +57,6 @@ public partial class FormCompany : Form comboBoxCountry.DataSource = countryRepository.ReadCountries(); comboBoxCountry.DisplayMember = "Name"; comboBoxCountry.ValueMember = "Id"; - - ColumnTitle.DataSource = tripRepository.ReadTrips(); - ColumnTitle.DisplayMember = "Title"; - ColumnTitle.ValueMember = "Id"; } @@ -68,12 +64,11 @@ public partial class FormCompany : Form { try { - if (dataGridView1.RowCount < 1 || - comboBoxCountry.SelectedIndex < 0) + if (string.IsNullOrEmpty(textBoxName.Text)) { throw new Exception("Имеются незаполненные поля"); } - _companyRepository.CreateCompany(Company.CreateCompany(0, textBoxName.Text, (int)comboBoxCountry.SelectedItem!, CreateListCompanyTripFromDataGrid())); + _companyRepository.CreateCompany(Company.CreateCompany(0, textBoxName.Text, (int)comboBoxCountry.SelectedItem!)); Close(); } catch (Exception ex) @@ -84,20 +79,5 @@ public partial class FormCompany : Form } private void ButtonCancel_Click(object sender, EventArgs e) => Close(); - private List<CompanyTrip> CreateListCompanyTripFromDataGrid() - { - var list = new List<CompanyTrip>(); - foreach (DataGridViewRow row in dataGridView1.Rows) - { - if (row.Cells["ColumnAdditionalPrice"].Value == null || - row.Cells["ColumnTitle"].Value == null) - { - continue; - } - list.Add(CompanyTrip.CreateCompanyTrip(0, 0, - Convert.ToInt32(row.Cells["ColumnTitle"].Value), - Convert.ToInt32(row.Cells["ColumnAdditionalPrice"].Value))); - } - return list; - } + } diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx index 25abefb..af32865 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCompany.resx @@ -117,10 +117,4 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="ColumnTitle.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="ColumnAdditionalPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> </root> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs index 8d9df93..2b715f3 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.Designer.cs @@ -45,7 +45,6 @@ dataGridView1.AllowUserToResizeRows = false; dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView1.ColumnHeadersVisible = false; dataGridView1.Dock = DockStyle.Fill; dataGridView1.Location = new Point(0, 0); dataGridView1.MultiSelect = false; @@ -53,7 +52,7 @@ dataGridView1.ReadOnly = true; dataGridView1.RowHeadersWidth = 51; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dataGridView1.Size = new Size(800, 450); + dataGridView1.Size = new Size(642, 450); dataGridView1.TabIndex = 0; // // panel1 @@ -105,11 +104,12 @@ AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(800, 450); - Controls.Add(panel1); Controls.Add(dataGridView1); + Controls.Add(panel1); Name = "FormCountries"; StartPosition = FormStartPosition.CenterParent; Text = "Страны"; + Load += FormCountries_Load; ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); panel1.ResumeLayout(false); ResumeLayout(false); diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs index 3e6380d..17c828a 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormCountries.cs @@ -24,9 +24,10 @@ public partial class FormCountries : Form InitializeComponent(); _container = container ?? throw new ArgumentNullException(nameof(container)); _countryRepository = countryRepository ?? throw new ArgumentNullException(nameof(countryRepository)); + } - private void FormCompanies_Load(object sender, EventArgs e) + private void FormCountries_Load(object sender, EventArgs e) { try { diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs index d2e3da6..4520584 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.Designer.cs @@ -46,8 +46,14 @@ buttonSave = new Button(); label1 = new Label(); textBoxTitle = new TextBox(); + groupBox1 = new GroupBox(); + dataGridView1 = new DataGridView(); + columnCompanyName = new DataGridViewComboBoxColumn(); + ColumnAdditionalPrice = new DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)numericUpDownPrice).BeginInit(); ((System.ComponentModel.ISupportInitialize)numericUpDownHumanCapacity).BeginInit(); + groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); SuspendLayout(); // // labelPrice @@ -172,7 +178,7 @@ // buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonCancel.BackColor = Color.IndianRed; - buttonCancel.Location = new Point(214, 512); + buttonCancel.Location = new Point(605, 512); buttonCancel.Name = "buttonCancel"; buttonCancel.Size = new Size(135, 51); buttonCancel.TabIndex = 15; @@ -184,7 +190,7 @@ // buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonSave.BackColor = Color.LimeGreen; - buttonSave.Location = new Point(361, 512); + buttonSave.Location = new Point(796, 512); buttonSave.Name = "buttonSave"; buttonSave.Size = new Size(135, 51); buttonSave.TabIndex = 14; @@ -208,11 +214,57 @@ textBoxTitle.Size = new Size(220, 27); textBoxTitle.TabIndex = 17; // + // groupBox1 + // + groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + groupBox1.Controls.Add(dataGridView1); + groupBox1.Location = new Point(499, 12); + groupBox1.Name = "groupBox1"; + groupBox1.Size = new Size(432, 476); + groupBox1.TabIndex = 20; + groupBox1.TabStop = false; + groupBox1.Text = "groupBox1"; + // + // dataGridView1 + // + dataGridView1.AllowUserToDeleteRows = false; + dataGridView1.AllowUserToResizeColumns = false; + dataGridView1.AllowUserToResizeRows = false; + dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView1.Columns.AddRange(new DataGridViewColumn[] { columnCompanyName, ColumnAdditionalPrice }); + dataGridView1.Dock = DockStyle.Fill; + dataGridView1.Location = new Point(3, 23); + dataGridView1.MultiSelect = false; + dataGridView1.Name = "dataGridView1"; + dataGridView1.ReadOnly = true; + dataGridView1.RowHeadersVisible = false; + dataGridView1.RowHeadersWidth = 51; + dataGridView1.Size = new Size(426, 450); + dataGridView1.TabIndex = 0; + // + // columnCompanyName + // + columnCompanyName.HeaderText = "Название компании"; + columnCompanyName.MinimumWidth = 6; + columnCompanyName.Name = "columnCompanyName"; + columnCompanyName.ReadOnly = true; + // + // ColumnAdditionalPrice + // + ColumnAdditionalPrice.HeaderText = "Добавочная стоимость"; + ColumnAdditionalPrice.MinimumWidth = 6; + ColumnAdditionalPrice.Name = "ColumnAdditionalPrice"; + ColumnAdditionalPrice.ReadOnly = true; + ColumnAdditionalPrice.Resizable = DataGridViewTriState.True; + ColumnAdditionalPrice.SortMode = DataGridViewColumnSortMode.NotSortable; + // // FormTrip // AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(508, 573); + ClientSize = new Size(943, 573); + Controls.Add(groupBox1); Controls.Add(textBoxTitle); Controls.Add(label1); Controls.Add(buttonCancel); @@ -236,6 +288,8 @@ Text = "Туры"; ((System.ComponentModel.ISupportInitialize)numericUpDownPrice).EndInit(); ((System.ComponentModel.ISupportInitialize)numericUpDownHumanCapacity).EndInit(); + groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -260,5 +314,9 @@ private Button buttonSave; private Label label1; private TextBox textBoxTitle; + private GroupBox groupBox1; + private DataGridView dataGridView1; + private DataGridViewComboBoxColumn columnCompanyName; + private DataGridViewTextBoxColumn ColumnAdditionalPrice; } } \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs index 0735bfe..bde80bd 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.cs @@ -2,6 +2,7 @@ using ProjectTourismCompany.Entities; using ProjectTourismCompany.Entities.Enums; using ProjectTourismCompany.Repositories; +using ProjectTourismCompany.Repositories.Implementations; using System; using System.Collections.Generic; using System.ComponentModel; @@ -56,7 +57,7 @@ Enum.GetValues(typeof(TravelType))) } } } - public FormTrip(ITripRepository tripRepository) + public FormTrip(ITripRepository tripRepository, ICompanyRepository companyRepository) { InitializeComponent(); _tripRepository = tripRepository ?? throw new ArgumentNullException(nameof(tripRepository)); @@ -64,14 +65,16 @@ Enum.GetValues(typeof(TravelType))) { checkedListBoxTravelType.Items.Add(elem); } - + columnCompanyName.DataSource = companyRepository.ReadCompanies(); + columnCompanyName.DisplayMember = "Name"; + columnCompanyName.ValueMember = "Id"; } private void ButtonSave_Click(object sender, EventArgs e) { try { if (string.IsNullOrWhiteSpace(textBoxStartCity.Text) || - string.IsNullOrWhiteSpace(textBoxEndCity.Text)) + string.IsNullOrWhiteSpace(textBoxEndCity.Text) || dataGridView1.RowCount < 1) { throw new Exception("Имеются незаполненные поля"); } @@ -105,6 +108,24 @@ Enum.GetValues(typeof(TravelType))) } return Trip.CreateOpeartion(0, textBoxTitle.Text, (int)numericUpDownPrice.Value, (int)numericUpDownHumanCapacity.Value, dateTimePickerStartDate.Value, dateTimePickerEndDate.Value, - textBoxStartCity.Text, textBoxEndCity.Text, tr); + textBoxStartCity.Text, textBoxEndCity.Text, tr, CreateListCompanyTripFromDataGrid()); + } + + + private List<CompanyTrip> CreateListCompanyTripFromDataGrid() + { + var list = new List<CompanyTrip>(); + foreach (DataGridViewRow row in dataGridView1.Rows) + { + if (row.Cells["ColumnAdditionalPrice"].Value == null || + row.Cells["ColumnCompanyName"].Value == null) + { + continue; + } + list.Add(CompanyTrip.CreateCompanyTrip(0, 0, + Convert.ToInt32(row.Cells["ColumnCompanyName"].Value), + Convert.ToInt32(row.Cells["ColumnAdditionalPrice"].Value))); + } + return list; } } diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx index af32865..5b6b78e 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrip.resx @@ -117,4 +117,10 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="columnCompanyName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="ColumnAdditionalPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> </root> \ No newline at end of file diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs index f62873e..e57b191 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.Designer.cs @@ -43,7 +43,6 @@ dataGridView1.AllowUserToResizeRows = false; dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView1.ColumnHeadersVisible = false; dataGridView1.Dock = DockStyle.Fill; dataGridView1.Location = new Point(0, 0); dataGridView1.MultiSelect = false; @@ -51,7 +50,7 @@ dataGridView1.ReadOnly = true; dataGridView1.RowHeadersWidth = 51; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dataGridView1.Size = new Size(800, 450); + dataGridView1.Size = new Size(645, 450); dataGridView1.TabIndex = 0; // // panel1 @@ -79,11 +78,12 @@ AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(800, 450); - Controls.Add(panel1); Controls.Add(dataGridView1); + Controls.Add(panel1); Name = "FormTrips"; StartPosition = FormStartPosition.CenterParent; Text = "Туры"; + Load += FormTrips_Load; ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); panel1.ResumeLayout(false); ResumeLayout(false); diff --git a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs index 178adaa..a50652e 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Forms/FormTrips.cs @@ -28,7 +28,7 @@ public partial class FormTrips : Form } - private void FormChecks_Load(object sender, EventArgs e) + private void FormTrips_Load(object sender, EventArgs e) { try { @@ -60,5 +60,6 @@ public partial class FormTrips : Form private void LoadList() => dataGridView1.DataSource = _tripRepository.ReadTrips(); + } diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs index 1c7f6c2..42e5d46 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/CompanyRepository.cs @@ -26,7 +26,7 @@ internal class CompanyRepository : ICompanyRepository public Company ReadCompanyById(int id) { - return Company.CreateCompany(1, "randomName", 73, []); + return Company.CreateCompany(1, "randomName", 73); } public void UpdateCompany(Company company) diff --git a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs index 6ec44e3..af0cfd4 100644 --- a/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs +++ b/ProjectTourismCompany/ProjectTourismCompany/Repositories/Implementations/TripRepository.cs @@ -16,7 +16,7 @@ internal class TripRepository : ITripRepository public Trip ReadTripById(int id) { - return Trip.CreateOpeartion(0, "a", 0, 0, DateTime.Now, DateTime.Now, "Moscow", "Piter", Entities.Enums.TravelType.None); + return Trip.CreateOpeartion(0, "a", 0, 0, DateTime.Now, DateTime.Now, "Moscow", "Piter", Entities.Enums.TravelType.None, []); } public IEnumerable<Trip> ReadTrips(DateTime? dateForm = null, DateTime? dateTo = null, int? tripId = null, int? companyId = null, int? countryId = null) -- 2.25.1