bad romance

This commit is contained in:
platoff aeeee 2024-05-29 21:15:54 +04:00
parent bbe18107b6
commit 058652dd90
137 changed files with 3335 additions and 75387 deletions

View File

@ -19,8 +19,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TravelCompanyDataModels", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TravelCompanyDatabaseImplement", "TravelCompanyDatabaseImplement\TravelCompanyDatabaseImplement.csproj", "{7625604D-02E5-4833-86BC-5CC0731A7DFD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TravelCompanyWebApp", "TravelCompanyWebApp\TravelCompanyWebApp.csproj", "{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TravelCompanyRestApi", "TravelCompanyRestApi\TravelCompanyRestApi.csproj", "{2DBAB1C5-EAA2-47A0-BA8E-405CE59674FE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TravelCompanyGuarantorApp", "TravelCompanyGuarantorApp\TravelCompanyGuarantorApp.csproj", "{78D13B4F-A8DC-4BD1-A306-067B83F40F18}"
@ -97,18 +95,6 @@ Global
{7625604D-02E5-4833-86BC-5CC0731A7DFD}.Release|x64.Build.0 = Release|Any CPU
{7625604D-02E5-4833-86BC-5CC0731A7DFD}.Release|x86.ActiveCfg = Release|Any CPU
{7625604D-02E5-4833-86BC-5CC0731A7DFD}.Release|x86.Build.0 = Release|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Debug|x64.ActiveCfg = Debug|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Debug|x64.Build.0 = Debug|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Debug|x86.ActiveCfg = Debug|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Debug|x86.Build.0 = Debug|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Release|Any CPU.Build.0 = Release|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Release|x64.ActiveCfg = Release|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Release|x64.Build.0 = Release|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Release|x86.ActiveCfg = Release|Any CPU
{1EBA3F5C-2FB8-4C6A-997B-E1D18793D86F}.Release|x86.Build.0 = Release|Any CPU
{2DBAB1C5-EAA2-47A0-BA8E-405CE59674FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DBAB1C5-EAA2-47A0-BA8E-405CE59674FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DBAB1C5-EAA2-47A0-BA8E-405CE59674FE}.Debug|x64.ActiveCfg = Debug|Any CPU

View File

@ -90,7 +90,7 @@ namespace TravelCompanyBusinessLogic
{
ColumnName = "C",
RowIndex = rowIndex,
Text = place.PlaceAddress,
Text = place.PlaceDescription,
StyleInfo = ExcelStyleInfoType.TextWithBorder
});

View File

@ -29,7 +29,7 @@ namespace TravelCompanyBusinessLogic
{
CreateRow(new PdfRowParameters
{
Texts = new List<string> { tour.Tour.TourName, tour.Tour.Price.ToString(), tour.Tour.TourDate.ToShortDateString(), "", "", "" },
Texts = new List<string> { tour.Tour.TourName, tour.Tour.TourDate.ToShortDateString(), "", "", "" },
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Left
});
@ -37,7 +37,7 @@ namespace TravelCompanyBusinessLogic
{
CreateRow(new PdfRowParameters
{
Texts = new List<string> { "", "", "", excursionGroup.ExcursionGroupName, excursionGroup.ParticipantsAmount.ToString(), excursionGroup.GuideFIO },
Texts = new List<string> { "", "", "", excursionGroup.ExcursionGroupName, excursionGroup.PeopleAmount.ToString()},
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Left
});

View File

@ -59,7 +59,7 @@ namespace TravelCompanyBusinessLogic
{
Texts = new List<(string, WordTextProperties)>
{
($"{place.PlaceName} - {place.PlaceAddress}", new WordTextProperties { Bold = false, Size = "24" })
($"{place.PlaceName} - {place.PlaceDescription}", new WordTextProperties { Bold = false, Size = "24" })
},
TextProperties = new WordTextProperties
{

View File

@ -46,7 +46,7 @@ namespace TravelCompanyBusinessLogic.BusinessLogic.Guarantor
public List<GuarantorViewModel>? ReadList(GuarantorSearchModel model)
{
_logger.LogInformation("ReadList. ClientId:{Id}", model?.Id);
_logger.LogInformation("ReadList. GuarantorId:{Id}", model?.Id);
var list = model == null ? _guarantorStorage.GetFullList() : _guarantorStorage.GetFilteredList(model);

View File

@ -1,6 +1,7 @@
using System.ComponentModel;
using TravelCompanyDataModels.Models;
using TravelCompanyDataModels.Models.Contractor;
using TravelCompanyDataModels.Models.Guarantor;
namespace TravelCompanyContracts.BindingModels.Contractor
{
@ -10,5 +11,7 @@ namespace TravelCompanyContracts.BindingModels.Contractor
public string ExcursionName { get; set; } = string.Empty;
public double ExcursionPrice { get; set; }
public int ContractorID { get; set; }
public Dictionary<int, ITourModel> ExcursionTours { get; set; } = new();
//public Dictionary<int, IGuideModel> ExcursionGuides { get; set; } = new();
}
}

View File

@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
using TravelCompanyDataModels.Models.Guarantor;
namespace TravelCompanyContracts.BindingModels.Contractor
{

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Guarantor;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.BindingModels.Guarantor
{
@ -16,5 +17,7 @@ namespace TravelCompanyContracts.BindingModels.Guarantor
public double GuidePrice { get; set; }
public int GuarantorId { get; set; }
public Dictionary<int, ITripModel> GuideTrips { get; set; } = new();
public Dictionary<int, IExcursionModel> GuideExcursions { get; set; } = new();
}
}

View File

@ -13,5 +13,6 @@ namespace TravelCompanyContracts.BindingModels.Guarantor
public string TripName { get; set; } = string.Empty;
public DateTime TripDate { get; set; }
public int GuarantorId { get; set; }
}
}

View File

@ -14,7 +14,8 @@ namespace TravelCompanyContracts.BindingModels
public DateTime? DateTo { get; set; }
public int UserId { get; set; }
public int GuarantorId { get; set; }
public int ContratorId { get; set; }
public List<int>? Tours = new();
}

View File

@ -16,5 +16,7 @@ namespace TravelCompanyContracts.ViewModels.Contractor.ViewModels
[DisplayName("Стоимость экскурсии")]
public double ExcursionPrice { get; set; }
public int ContractorID { get; set; }
//public int PlaceId { get; set; }
//public Dictionary<int, ITourModel> ExcursionTours { get; set; } = new();
}
}

View File

@ -18,8 +18,11 @@ namespace TravelCompanyContracts.ViewModels.Guarantor.ViewModels
[DisplayName("Описание места")]
public string PlaceDescription { get; set; } = string.Empty;
public int GuarantorId { get; set; }
public int ExcursionGroupId { get; set; }
[DisplayName("Наименование экскурсионной группы")]
public string ExcursionGroupName { get; set; } = string.Empty;
public int GuarantorId { get; set; }
}
}

View File

@ -1,8 +0,0 @@
namespace TravelAgencyContracts.ViewModels
{
public class ReportPlaceTourViewModel
{
public string TourName { get; set; } = string.Empty;
public List<string> Places { get; set; } = new();
}
}

View File

@ -1,9 +1,13 @@
namespace TravelAgencyContracts.ViewModels
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
namespace TravelCompanyContracts.ViewModels
{
public class ReportTourPeriodViewModel
{
public string TourName { get; set; } = string.Empty;
public List<string> ExcursionGroups { get; set; } = new();
public List<string> Guides { get; set; } = new();
public TourViewModel Tour { get; set; } = new();
public HashSet<ExcursionGroupViewModel> ExcursionGroups { get; set; } = new();
public HashSet<GuideViewModel> Guides { get; set; } = new();
}
}

View File

@ -0,0 +1,12 @@
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
namespace TravelCompanyContracts.ViewModels
{
public class ReportTourPlaceViewModel
{
public TourViewModel Tour { get; set; } = new();
public HashSet<PlaceViewModel> Places { get; set; } = new();
}
}

View File

@ -11,7 +11,7 @@ using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class ContractorStorage : IContractorStorage
{

View File

@ -10,7 +10,7 @@ using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class ExcursionGroupStorage : IExcursionGroupStorage
{
@ -56,8 +56,8 @@ namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
using var context = new TravelCompanyDatabase();
return context.ExcursionGroups
.Include(x => x.Contractor)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.ExcursionGroupName) && x.ExcursionGroupName == model.ExcursionGroupName) ||
(model.Id.HasValue && x.Id == model.Id))
.FirstOrDefault(x => !string.IsNullOrEmpty(model.ExcursionGroupName) && x.ExcursionGroupName == model.ExcursionGroupName ||
model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}

View File

@ -10,7 +10,7 @@ using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class ExcursionStorage : IExcursionStorage
{
@ -53,8 +53,8 @@ namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
}
using var context = new TravelCompanyDatabase();
return context.Excursions.Include(x => x.Contractor)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.ExcursionName) && x.ExcursionName == model.ExcursionName) ||
(model.Id.HasValue && x.Id == model.Id))
.FirstOrDefault(x => !string.IsNullOrEmpty(model.ExcursionName) && x.ExcursionName == model.ExcursionName ||
model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}

View File

@ -12,7 +12,7 @@ using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.GuarantorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class GuarantorStorage : IGuarantorStorage
{

View File

@ -10,7 +10,7 @@ using TravelCompanyContracts.StoragesModels.Guarantor;
using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.GuarantorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class GuideStorage : IGuideStorage
{
@ -53,8 +53,8 @@ namespace TravelCompanyDatabaseImplement.Implements.GuarantorImplements
}
using var context = new TravelCompanyDatabase();
return context.Guides.Include(x => x.Guarantor)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.GuideFIO) && x.GuideFIO == model.GuideFIO) ||
(model.Id.HasValue && x.Id == model.Id))
.FirstOrDefault(x => !string.IsNullOrEmpty(model.GuideFIO) && x.GuideFIO == model.GuideFIO ||
model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}

View File

@ -10,7 +10,7 @@ using TravelCompanyContracts.StoragesModels.Guarantor;
using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.GuarantorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class PlaceStorage : IPlaceStorage
{
@ -53,8 +53,8 @@ namespace TravelCompanyDatabaseImplement.Implements.GuarantorImplements
}
using var context = new TravelCompanyDatabase();
return context.Places.Include(x => x.Guarantor)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.PlaceName) && x.PlaceName == model.PlaceName) ||
(model.Id.HasValue && x.Id == model.Id))
.FirstOrDefault(x => !string.IsNullOrEmpty(model.PlaceName) && x.PlaceName == model.PlaceName ||
model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}

View File

@ -10,7 +10,7 @@ using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class TourStorage : ITourStorage
{
@ -53,8 +53,8 @@ namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
}
using var context = new TravelCompanyDatabase();
return context.Tours.Include(x => x.Contractor)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.TourName) && x.TourName == model.TourName) ||
(model.Id.HasValue && x.Id == model.Id))
.FirstOrDefault(x => !string.IsNullOrEmpty(model.TourName) && x.TourName == model.TourName ||
model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}

View File

@ -10,7 +10,7 @@ using TravelCompanyContracts.StoragesModels.Guarantor;
using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
using TravelCompanyDatabaseImplement.Models;
namespace TravelCompanyDatabaseImplement.Implements.GuarantorImplements
namespace TravelCompanyDatabaseImplement.Implements
{
public class TripStorage : ITripStorage
{
@ -52,8 +52,8 @@ namespace TravelCompanyDatabaseImplement.Implements.GuarantorImplements
}
using var context = new TravelCompanyDatabase();
return context.Trips.Include(x => x.Guarantor)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.TripName) && x.TripName == model.TripName) ||
(model.Id.HasValue && x.Id == model.Id))
.FirstOrDefault(x => !string.IsNullOrEmpty(model.TripName) && x.TripName == model.TripName ||
model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}
public TripViewModel? Insert(TripBindingModel model)

View File

@ -0,0 +1,622 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using TravelCompanyDatabaseImplement;
#nullable disable
namespace TravelCompanyDatabaseImplement.Migrations
{
[DbContext(typeof(TravelCompanyDatabase))]
[Migration("20240529170555_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.18")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Contractor", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("MobilePhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Patronymic")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Surname")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Contractors");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Excursion", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ContractorID")
.HasColumnType("int");
b.Property<string>("ExcursionName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("ExcursionPrice")
.HasColumnType("float");
b.Property<int?>("GuideId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ContractorID");
b.HasIndex("GuideId");
b.ToTable("Excursions");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroup", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ContractorID")
.HasColumnType("int");
b.Property<string>("ExcursionGroupName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("PeopleAmount")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ContractorID");
b.ToTable("ExcursionGroups");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroupTour", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionGroupId")
.HasColumnType("int");
b.Property<int>("TourId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ExcursionGroupId");
b.HasIndex("TourId");
b.ToTable("ExcursionGroupTours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGuide", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionId")
.HasColumnType("int");
b.Property<int>("GuideId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ExcursionId");
b.HasIndex("GuideId");
b.ToTable("ExcursionGuides");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionTour", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionId")
.HasColumnType("int");
b.Property<int>("TourId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ExcursionId");
b.HasIndex("TourId");
b.ToTable("ExcursionTours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guarantor", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("MobilePhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Patronymic")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Surname")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Guarantors");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guide", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("GuarantorId")
.HasColumnType("int");
b.Property<string>("GuideFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("GuidePrice")
.HasColumnType("float");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("GuarantorId");
b.ToTable("Guides");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Place", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionGroupId")
.HasColumnType("int");
b.Property<int>("GuarantorId")
.HasColumnType("int");
b.Property<string>("PlaceDescription")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("PlaceName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ExcursionGroupId");
b.HasIndex("GuarantorId");
b.ToTable("Places");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.PlaceTrip", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("PlaceId")
.HasColumnType("int");
b.Property<int>("TripId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PlaceId");
b.HasIndex("TripId");
b.ToTable("PlaceTrips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Tour", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ContractorID")
.HasColumnType("int");
b.Property<DateTime>("TourDate")
.HasColumnType("datetime2");
b.Property<string>("TourName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ContractorID");
b.ToTable("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Trip", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("GuarantorId")
.HasColumnType("int");
b.Property<int?>("GuideId")
.HasColumnType("int");
b.Property<DateTime>("TripDate")
.HasColumnType("datetime2");
b.Property<string>("TripName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("GuarantorId");
b.HasIndex("GuideId");
b.ToTable("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.TripGuide", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("GuideId")
.HasColumnType("int");
b.Property<int>("TripId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("GuideId");
b.HasIndex("TripId");
b.ToTable("TripGuides");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Excursion", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Contractor", "Contractor")
.WithMany("Excursions")
.HasForeignKey("ContractorID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", null)
.WithMany("Excursions")
.HasForeignKey("GuideId");
b.Navigation("Contractor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroup", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Contractor", "Contractor")
.WithMany("ExcursionGroups")
.HasForeignKey("ContractorID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Contractor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroupTour", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.ExcursionGroup", "ExcursionGroup")
.WithMany("Tours")
.HasForeignKey("ExcursionGroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Tour", "Tour")
.WithMany("ExcursionGroups")
.HasForeignKey("TourId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ExcursionGroup");
b.Navigation("Tour");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGuide", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Excursion", "Excursion")
.WithMany("Guides")
.HasForeignKey("ExcursionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", "Guide")
.WithMany()
.HasForeignKey("GuideId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Excursion");
b.Navigation("Guide");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionTour", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Excursion", "Excursion")
.WithMany("Tours")
.HasForeignKey("ExcursionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Tour", "Tour")
.WithMany("Excursions")
.HasForeignKey("TourId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Excursion");
b.Navigation("Tour");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guide", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Guarantor", "Guarantor")
.WithMany("Guides")
.HasForeignKey("GuarantorId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Guarantor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Place", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.ExcursionGroup", "ExcursionGroup")
.WithMany()
.HasForeignKey("ExcursionGroupId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guarantor", "Guarantor")
.WithMany("Places")
.HasForeignKey("GuarantorId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("ExcursionGroup");
b.Navigation("Guarantor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.PlaceTrip", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Place", "Place")
.WithMany("Trips")
.HasForeignKey("PlaceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Trip", "Trip")
.WithMany("PlaceTrips")
.HasForeignKey("TripId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Place");
b.Navigation("Trip");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Tour", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Contractor", "Contractor")
.WithMany("Tours")
.HasForeignKey("ContractorID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Contractor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Trip", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Guarantor", "Guarantor")
.WithMany("Trips")
.HasForeignKey("GuarantorId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", null)
.WithMany("Trips")
.HasForeignKey("GuideId");
b.Navigation("Guarantor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.TripGuide", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", "Guide")
.WithMany()
.HasForeignKey("GuideId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Trip", "Trip")
.WithMany("TripGuides")
.HasForeignKey("TripId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Guide");
b.Navigation("Trip");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Contractor", b =>
{
b.Navigation("ExcursionGroups");
b.Navigation("Excursions");
b.Navigation("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Excursion", b =>
{
b.Navigation("Guides");
b.Navigation("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroup", b =>
{
b.Navigation("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guarantor", b =>
{
b.Navigation("Guides");
b.Navigation("Places");
b.Navigation("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guide", b =>
{
b.Navigation("Excursions");
b.Navigation("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Place", b =>
{
b.Navigation("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Tour", b =>
{
b.Navigation("ExcursionGroups");
b.Navigation("Excursions");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Trip", b =>
{
b.Navigation("PlaceTrips");
b.Navigation("TripGuides");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,465 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TravelCompanyDatabaseImplement.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Contractors",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Surname = table.Column<string>(type: "nvarchar(max)", nullable: false),
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
Patronymic = table.Column<string>(type: "nvarchar(max)", nullable: false),
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
MobilePhone = table.Column<string>(type: "nvarchar(max)", nullable: false),
Password = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Contractors", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Guarantors",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
Surname = table.Column<string>(type: "nvarchar(max)", nullable: false),
Patronymic = table.Column<string>(type: "nvarchar(max)", nullable: false),
Password = table.Column<string>(type: "nvarchar(max)", nullable: false),
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
MobilePhone = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Guarantors", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ExcursionGroups",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ExcursionGroupName = table.Column<string>(type: "nvarchar(max)", nullable: false),
PeopleAmount = table.Column<int>(type: "int", nullable: false),
ContractorID = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ExcursionGroups", x => x.Id);
table.ForeignKey(
name: "FK_ExcursionGroups_Contractors_ContractorID",
column: x => x.ContractorID,
principalTable: "Contractors",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Tours",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TourName = table.Column<string>(type: "nvarchar(max)", nullable: false),
TourDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ContractorID = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Tours", x => x.Id);
table.ForeignKey(
name: "FK_Tours_Contractors_ContractorID",
column: x => x.ContractorID,
principalTable: "Contractors",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Guides",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
GuideFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
GuidePrice = table.Column<double>(type: "float", nullable: false),
GuarantorId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Guides", x => x.Id);
table.ForeignKey(
name: "FK_Guides_Guarantors_GuarantorId",
column: x => x.GuarantorId,
principalTable: "Guarantors",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Places",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
PlaceName = table.Column<string>(type: "nvarchar(max)", nullable: false),
PlaceDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
GuarantorId = table.Column<int>(type: "int", nullable: false),
ExcursionGroupId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Places", x => x.Id);
table.ForeignKey(
name: "FK_Places_ExcursionGroups_ExcursionGroupId",
column: x => x.ExcursionGroupId,
principalTable: "ExcursionGroups",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Places_Guarantors_GuarantorId",
column: x => x.GuarantorId,
principalTable: "Guarantors",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "ExcursionGroupTours",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ExcursionGroupId = table.Column<int>(type: "int", nullable: false),
TourId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ExcursionGroupTours", x => x.Id);
table.ForeignKey(
name: "FK_ExcursionGroupTours_ExcursionGroups_ExcursionGroupId",
column: x => x.ExcursionGroupId,
principalTable: "ExcursionGroups",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ExcursionGroupTours_Tours_TourId",
column: x => x.TourId,
principalTable: "Tours",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Excursions",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ExcursionName = table.Column<string>(type: "nvarchar(max)", nullable: false),
ExcursionPrice = table.Column<double>(type: "float", nullable: false),
ContractorID = table.Column<int>(type: "int", nullable: false),
GuideId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Excursions", x => x.Id);
table.ForeignKey(
name: "FK_Excursions_Contractors_ContractorID",
column: x => x.ContractorID,
principalTable: "Contractors",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Excursions_Guides_GuideId",
column: x => x.GuideId,
principalTable: "Guides",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "Trips",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TripName = table.Column<string>(type: "nvarchar(max)", nullable: false),
TripDate = table.Column<DateTime>(type: "datetime2", nullable: false),
GuarantorId = table.Column<int>(type: "int", nullable: false),
GuideId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Trips", x => x.Id);
table.ForeignKey(
name: "FK_Trips_Guarantors_GuarantorId",
column: x => x.GuarantorId,
principalTable: "Guarantors",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Trips_Guides_GuideId",
column: x => x.GuideId,
principalTable: "Guides",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "ExcursionGuides",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ExcursionId = table.Column<int>(type: "int", nullable: false),
GuideId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ExcursionGuides", x => x.Id);
table.ForeignKey(
name: "FK_ExcursionGuides_Excursions_ExcursionId",
column: x => x.ExcursionId,
principalTable: "Excursions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ExcursionGuides_Guides_GuideId",
column: x => x.GuideId,
principalTable: "Guides",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ExcursionTours",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ExcursionId = table.Column<int>(type: "int", nullable: false),
TourId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ExcursionTours", x => x.Id);
table.ForeignKey(
name: "FK_ExcursionTours_Excursions_ExcursionId",
column: x => x.ExcursionId,
principalTable: "Excursions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ExcursionTours_Tours_TourId",
column: x => x.TourId,
principalTable: "Tours",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "PlaceTrips",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
PlaceId = table.Column<int>(type: "int", nullable: false),
TripId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PlaceTrips", x => x.Id);
table.ForeignKey(
name: "FK_PlaceTrips_Places_PlaceId",
column: x => x.PlaceId,
principalTable: "Places",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_PlaceTrips_Trips_TripId",
column: x => x.TripId,
principalTable: "Trips",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TripGuides",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TripId = table.Column<int>(type: "int", nullable: false),
GuideId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TripGuides", x => x.Id);
table.ForeignKey(
name: "FK_TripGuides_Guides_GuideId",
column: x => x.GuideId,
principalTable: "Guides",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TripGuides_Trips_TripId",
column: x => x.TripId,
principalTable: "Trips",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_ExcursionGroups_ContractorID",
table: "ExcursionGroups",
column: "ContractorID");
migrationBuilder.CreateIndex(
name: "IX_ExcursionGroupTours_ExcursionGroupId",
table: "ExcursionGroupTours",
column: "ExcursionGroupId");
migrationBuilder.CreateIndex(
name: "IX_ExcursionGroupTours_TourId",
table: "ExcursionGroupTours",
column: "TourId");
migrationBuilder.CreateIndex(
name: "IX_ExcursionGuides_ExcursionId",
table: "ExcursionGuides",
column: "ExcursionId");
migrationBuilder.CreateIndex(
name: "IX_ExcursionGuides_GuideId",
table: "ExcursionGuides",
column: "GuideId");
migrationBuilder.CreateIndex(
name: "IX_Excursions_ContractorID",
table: "Excursions",
column: "ContractorID");
migrationBuilder.CreateIndex(
name: "IX_Excursions_GuideId",
table: "Excursions",
column: "GuideId");
migrationBuilder.CreateIndex(
name: "IX_ExcursionTours_ExcursionId",
table: "ExcursionTours",
column: "ExcursionId");
migrationBuilder.CreateIndex(
name: "IX_ExcursionTours_TourId",
table: "ExcursionTours",
column: "TourId");
migrationBuilder.CreateIndex(
name: "IX_Guides_GuarantorId",
table: "Guides",
column: "GuarantorId");
migrationBuilder.CreateIndex(
name: "IX_Places_ExcursionGroupId",
table: "Places",
column: "ExcursionGroupId");
migrationBuilder.CreateIndex(
name: "IX_Places_GuarantorId",
table: "Places",
column: "GuarantorId");
migrationBuilder.CreateIndex(
name: "IX_PlaceTrips_PlaceId",
table: "PlaceTrips",
column: "PlaceId");
migrationBuilder.CreateIndex(
name: "IX_PlaceTrips_TripId",
table: "PlaceTrips",
column: "TripId");
migrationBuilder.CreateIndex(
name: "IX_Tours_ContractorID",
table: "Tours",
column: "ContractorID");
migrationBuilder.CreateIndex(
name: "IX_TripGuides_GuideId",
table: "TripGuides",
column: "GuideId");
migrationBuilder.CreateIndex(
name: "IX_TripGuides_TripId",
table: "TripGuides",
column: "TripId");
migrationBuilder.CreateIndex(
name: "IX_Trips_GuarantorId",
table: "Trips",
column: "GuarantorId");
migrationBuilder.CreateIndex(
name: "IX_Trips_GuideId",
table: "Trips",
column: "GuideId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ExcursionGroupTours");
migrationBuilder.DropTable(
name: "ExcursionGuides");
migrationBuilder.DropTable(
name: "ExcursionTours");
migrationBuilder.DropTable(
name: "PlaceTrips");
migrationBuilder.DropTable(
name: "TripGuides");
migrationBuilder.DropTable(
name: "Excursions");
migrationBuilder.DropTable(
name: "Tours");
migrationBuilder.DropTable(
name: "Places");
migrationBuilder.DropTable(
name: "Trips");
migrationBuilder.DropTable(
name: "ExcursionGroups");
migrationBuilder.DropTable(
name: "Guides");
migrationBuilder.DropTable(
name: "Contractors");
migrationBuilder.DropTable(
name: "Guarantors");
}
}
}

View File

@ -0,0 +1,619 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using TravelCompanyDatabaseImplement;
#nullable disable
namespace TravelCompanyDatabaseImplement.Migrations
{
[DbContext(typeof(TravelCompanyDatabase))]
partial class TravelCompanyDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.18")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Contractor", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("MobilePhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Patronymic")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Surname")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Contractors");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Excursion", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ContractorID")
.HasColumnType("int");
b.Property<string>("ExcursionName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("ExcursionPrice")
.HasColumnType("float");
b.Property<int?>("GuideId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ContractorID");
b.HasIndex("GuideId");
b.ToTable("Excursions");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroup", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ContractorID")
.HasColumnType("int");
b.Property<string>("ExcursionGroupName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("PeopleAmount")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ContractorID");
b.ToTable("ExcursionGroups");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroupTour", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionGroupId")
.HasColumnType("int");
b.Property<int>("TourId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ExcursionGroupId");
b.HasIndex("TourId");
b.ToTable("ExcursionGroupTours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGuide", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionId")
.HasColumnType("int");
b.Property<int>("GuideId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ExcursionId");
b.HasIndex("GuideId");
b.ToTable("ExcursionGuides");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionTour", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionId")
.HasColumnType("int");
b.Property<int>("TourId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ExcursionId");
b.HasIndex("TourId");
b.ToTable("ExcursionTours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guarantor", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("MobilePhone")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Patronymic")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Surname")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Guarantors");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guide", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("GuarantorId")
.HasColumnType("int");
b.Property<string>("GuideFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("GuidePrice")
.HasColumnType("float");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("GuarantorId");
b.ToTable("Guides");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Place", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ExcursionGroupId")
.HasColumnType("int");
b.Property<int>("GuarantorId")
.HasColumnType("int");
b.Property<string>("PlaceDescription")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("PlaceName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ExcursionGroupId");
b.HasIndex("GuarantorId");
b.ToTable("Places");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.PlaceTrip", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("PlaceId")
.HasColumnType("int");
b.Property<int>("TripId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PlaceId");
b.HasIndex("TripId");
b.ToTable("PlaceTrips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Tour", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ContractorID")
.HasColumnType("int");
b.Property<DateTime>("TourDate")
.HasColumnType("datetime2");
b.Property<string>("TourName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ContractorID");
b.ToTable("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Trip", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("GuarantorId")
.HasColumnType("int");
b.Property<int?>("GuideId")
.HasColumnType("int");
b.Property<DateTime>("TripDate")
.HasColumnType("datetime2");
b.Property<string>("TripName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("GuarantorId");
b.HasIndex("GuideId");
b.ToTable("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.TripGuide", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("GuideId")
.HasColumnType("int");
b.Property<int>("TripId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("GuideId");
b.HasIndex("TripId");
b.ToTable("TripGuides");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Excursion", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Contractor", "Contractor")
.WithMany("Excursions")
.HasForeignKey("ContractorID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", null)
.WithMany("Excursions")
.HasForeignKey("GuideId");
b.Navigation("Contractor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroup", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Contractor", "Contractor")
.WithMany("ExcursionGroups")
.HasForeignKey("ContractorID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Contractor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroupTour", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.ExcursionGroup", "ExcursionGroup")
.WithMany("Tours")
.HasForeignKey("ExcursionGroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Tour", "Tour")
.WithMany("ExcursionGroups")
.HasForeignKey("TourId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ExcursionGroup");
b.Navigation("Tour");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGuide", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Excursion", "Excursion")
.WithMany("Guides")
.HasForeignKey("ExcursionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", "Guide")
.WithMany()
.HasForeignKey("GuideId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Excursion");
b.Navigation("Guide");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionTour", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Excursion", "Excursion")
.WithMany("Tours")
.HasForeignKey("ExcursionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Tour", "Tour")
.WithMany("Excursions")
.HasForeignKey("TourId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Excursion");
b.Navigation("Tour");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guide", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Guarantor", "Guarantor")
.WithMany("Guides")
.HasForeignKey("GuarantorId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Guarantor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Place", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.ExcursionGroup", "ExcursionGroup")
.WithMany()
.HasForeignKey("ExcursionGroupId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guarantor", "Guarantor")
.WithMany("Places")
.HasForeignKey("GuarantorId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("ExcursionGroup");
b.Navigation("Guarantor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.PlaceTrip", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Place", "Place")
.WithMany("Trips")
.HasForeignKey("PlaceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Trip", "Trip")
.WithMany("PlaceTrips")
.HasForeignKey("TripId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Place");
b.Navigation("Trip");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Tour", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Contractor", "Contractor")
.WithMany("Tours")
.HasForeignKey("ContractorID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Contractor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Trip", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Guarantor", "Guarantor")
.WithMany("Trips")
.HasForeignKey("GuarantorId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", null)
.WithMany("Trips")
.HasForeignKey("GuideId");
b.Navigation("Guarantor");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.TripGuide", b =>
{
b.HasOne("TravelCompanyDatabaseImplement.Models.Guide", "Guide")
.WithMany()
.HasForeignKey("GuideId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TravelCompanyDatabaseImplement.Models.Trip", "Trip")
.WithMany("TripGuides")
.HasForeignKey("TripId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Guide");
b.Navigation("Trip");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Contractor", b =>
{
b.Navigation("ExcursionGroups");
b.Navigation("Excursions");
b.Navigation("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Excursion", b =>
{
b.Navigation("Guides");
b.Navigation("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.ExcursionGroup", b =>
{
b.Navigation("Tours");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guarantor", b =>
{
b.Navigation("Guides");
b.Navigation("Places");
b.Navigation("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Guide", b =>
{
b.Navigation("Excursions");
b.Navigation("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Place", b =>
{
b.Navigation("Trips");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Tour", b =>
{
b.Navigation("ExcursionGroups");
b.Navigation("Excursions");
});
modelBuilder.Entity("TravelCompanyDatabaseImplement.Models.Trip", b =>
{
b.Navigation("PlaceTrips");
b.Navigation("TripGuides");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -33,13 +33,13 @@ namespace TravelCompanyDatabaseImplement.Models
[Required]
public string MobilePhone { get; set; } = string.Empty;
[ForeignKey("GuarantorID")]
[ForeignKey("GuarantorId")]
public virtual List<Guide> Guides { get; set; } = new();
[ForeignKey("GuarantorID")]
[ForeignKey("GuarantorId")]
public virtual List<Trip> Trips { get; set; } = new();
[ForeignKey("GuarantorID")]
[ForeignKey("GuarantorId")]
public virtual List<Place> Places { get; set; } = new();
public static Guarantor Create(GuarantorBindingModel model)
{

View File

@ -7,9 +7,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.17">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.18">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@ -21,6 +21,8 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Implements\ContractorImplements\" />
<Folder Include="Implements\GuarantorImplements\" />
<Folder Include="Models\ContractorModels\" />
<Folder Include="Models\GuarantorModels\" />
</ItemGroup>

View File

@ -0,0 +1,160 @@
using DocumentFormat.OpenXml.Presentation;
using Microsoft.AspNetCore.Mvc;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.BusinessLogicsContracts.Contractor;
using TravelCompanyContracts.BusinessLogicsContracts.Guarantor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyDatabaseImplement.Models;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyGuarantorApp.Controllers
{
public class ExcursionController : Controller
{
private readonly ILogger<ExcursionController> _logger;
private readonly IExcursionLogic _excursionLogic;
private readonly ITourLogic _tourLogic;
private readonly IPlaceLogic _placeLogic;
public ExcursionController(ILogger<ExcursionController> logger, IExcursionLogic excursionLogic, ITourLogic tourLogic, IPlaceLogic placeLogic)
{
_logger = logger;
_excursionLogic = excursionLogic;
_tourLogic = tourLogic;
_placeLogic = placeLogic;
}
[HttpGet]
public IActionResult Excursions()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View(_excursionLogic.ReadList(new ExcursionSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
}));
}
[HttpGet]
public IActionResult CreateExcursion()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
ViewBag.Tours = _tourLogic.ReadList(new TourSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
ViewBag.Places = _placeLogic.ReadList(null);
return View();
}
[HttpPost]
public void CreateExcursion(string excursionName, double excursionPrice, List<int> tours)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (string.IsNullOrEmpty(excursionName) || excursionPrice <= 0 || tours == null)
{
throw new Exception("Введены не все данные!");
}
Dictionary<int, ITourModel> excursionTours = new Dictionary<int, ITourModel>();
foreach (var tourId in tours)
{
excursionTours.Add(tourId, _tourLogic.ReadElement(new TourSearchModel { Id = tourId })!);
}
_excursionLogic.Create(new ExcursionBindingModel
{
ExcursionName = excursionName,
ExcursionPrice = excursionPrice,
ContractorID = LoggedinGuarantor.Guarantor.Id,
ExcursionTours = excursionTours
});
Response.Redirect("/Excursion/Excursions");
}
[HttpGet]
public IActionResult UpdateExcursion(int id)
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
ViewBag.Tours = _tourLogic.ReadList(new TourSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
ViewBag.Places = _placeLogic.ReadList(null);
return View(_excursionLogic.ReadElement(new ExcursionSearchModel
{
Id = id
}));
}
[HttpPost]
public void UpdateExcursion(int id, string excursionName, double excursionPrice, List<int> tours)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (string.IsNullOrEmpty(excursionName) || excursionPrice <= 0 || tours == null)
{
throw new Exception("Введены не все данные!");
}
Dictionary<int, ITourModel> excursionTours = new Dictionary<int, ITourModel>();
foreach (var tourId in tours)
{
excursionTours.Add(tourId, _tourLogic.ReadElement(new TourSearchModel { Id = tourId })!);
}
_excursionLogic.Update(new ExcursionBindingModel
{
Id = id,
ExcursionName = excursionName,
ExcursionPrice = excursionPrice,
ContractorID = LoggedinGuarantor.Guarantor.Id,
ExcursionTours = excursionTours
});
Response.Redirect("/Excursion/Excursions");
}
[HttpPost]
public void DeleteExcursion(int id)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
_excursionLogic.Delete(new ExcursionBindingModel
{
Id = id
});
Response.Redirect("/Excursion/Excursions");
}
}
}

View File

@ -0,0 +1,222 @@
using DocumentFormat.OpenXml.Office2010.Excel;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.BusinessLogicsContracts.Contractor;
using TravelCompanyContracts.BusinessLogicsContracts.Guarantor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyDatabaseImplement.Models;
using TravelCompanyDatabaseImplement.Implements;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyGuarantorApp.Controllers
{
public class ExcursionGroupController : Controller
{
private readonly ILogger<ExcursionGroupController> _logger;
private readonly IExcursionGroupLogic _excursionGroupLogic;
private readonly ITourLogic _tourLogic;
private readonly IGuideLogic _guideLogic;
private readonly IPlaceLogic _placeLogic;
public ExcursionGroupController(ILogger<ExcursionGroupController> logger, IExcursionGroupLogic excursionGroupLogic, ITourLogic tourLogic, IGuideLogic guideLogic, IPlaceLogic placeLogic)
{
_logger = logger;
_excursionGroupLogic = excursionGroupLogic;
_tourLogic = tourLogic;
_guideLogic = guideLogic;
_placeLogic = placeLogic;
}
[HttpGet]
public IActionResult ExcursionGroups()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View(_excursionGroupLogic.ReadList(new ExcursionGroupSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
}));
}
[HttpGet]
public IActionResult CreateExcursionGroup()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
ViewBag.Tours = _tourLogic.ReadList(new TourSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
ViewBag.Guides = _guideLogic.ReadList(null);
return View();
}
[HttpPost]
public void CreateExcursionGroup(string excursionGroupName, int peopleAmount, List<int> tours)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (string.IsNullOrEmpty(excursionGroupName) || peopleAmount < 1 || tours == null)
{
throw new Exception("Введены не все данные!");
}
Dictionary<int, ITourModel> excursionGroupTours = new Dictionary<int, ITourModel>();
foreach (var tourId in tours)
{
excursionGroupTours.Add(tourId, _tourLogic.ReadElement(new TourSearchModel { Id = tourId })!);
}
_excursionGroupLogic.Create(new ExcursionGroupBindingModel
{
ExcursionGroupName = excursionGroupName,
PeopleAmount = peopleAmount,
ContractorID = LoggedinGuarantor.Guarantor.Id,
ExcursionGroupTours = excursionGroupTours
});
Response.Redirect("/ExcursionGroup/ExcursionGroups");
}
[HttpGet]
public IActionResult UpdateExcursionGroup(int id)
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
ViewBag.Tours = _tourLogic.ReadList(new TourSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
ViewBag.Guides = _guideLogic.ReadList(null);
return View(_excursionGroupLogic.ReadElement(new ExcursionGroupSearchModel
{
Id = id
}));
}
[HttpPost]
public void UpdateExcursionGroup(int id, string excursionGroupName, int peopleAmount, List<int> tours)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (string.IsNullOrEmpty(excursionGroupName) || peopleAmount < 1 || tours == null)
{
throw new Exception("Введены не все данные!");
}
Dictionary<int, ITourModel> excursionGroupTours = new Dictionary<int, ITourModel>();
foreach (var tourId in tours)
{
excursionGroupTours.Add(tourId, _tourLogic.ReadElement(new TourSearchModel { Id = tourId })!);
}
var excursionGroup = _excursionGroupLogic.ReadElement(new ExcursionGroupSearchModel() { Id = id });
_excursionGroupLogic.Update(new ExcursionGroupBindingModel
{
Id = id,
ExcursionGroupName = excursionGroupName,
PeopleAmount = peopleAmount,
ContractorID = LoggedinGuarantor.Guarantor.Id,
ExcursionGroupTours = excursionGroupTours
});
Response.Redirect("/ExcursionGroup/ExcursionGroups");
}
[HttpPost]
public void DeleteExcursionGroup(int id)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
_excursionGroupLogic.Delete(new ExcursionGroupBindingModel
{
Id = id
});
Response.Redirect("/ExcursionGroup/ExcursionGroups");
}
[HttpGet]
public IActionResult ConnectGroupToPlace()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
ViewBag.ExcursionGroups = _excursionGroupLogic.ReadList(new ExcursionGroupSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
ViewBag.Places = _placeLogic.ReadList(null);
return View();
}
[HttpPost]
public IActionResult ConnectGroupToPlace(int excursionGroupId, int placeId)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (excursionGroupId <= 0 || placeId <= 0)
{
throw new Exception("Введены не все данные!");
}
var excursionGroup = _excursionGroupLogic.ReadElement(new ExcursionGroupSearchModel() { Id = excursionGroupId });
//Dictionary<int, IPlaceModel> excursionGroupPlaces = excursionGroup.ExcursionGroupPlaces;
//if (!excursionGroupPlaces.ContainsKey(placeId))
// excursionGroupPlaces.Add(placeId, _placeLogic.ReadElement(new PlaceSearchModel { Id = placeId })!);
_excursionGroupLogic.Update(new ExcursionGroupBindingModel
{
Id = excursionGroupId,
ExcursionGroupName = excursionGroup.ExcursionGroupName,
PeopleAmount = excursionGroup.PeopleAmount,
ContractorID = LoggedinGuarantor.Guarantor.Id,
ExcursionGroupTours = excursionGroup.ExcursionGroupTours
});
ViewBag.ExcursionGroups = _excursionGroupLogic.ReadList(new ExcursionGroupSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
ViewBag.Places = _placeLogic.ReadList(null);
return View();
}
}
}

View File

@ -1,6 +1,20 @@
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using TravelCompanyContracts.BindingModels;
using TravelCompanyContracts.BindingModels.Guarantor;
using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
using TravelCompanyGuarantorApp.Models;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using TravelCompanyContracts.BusinessLogicsContracts;
using TravelCompanyContracts.BusinessLogicsContracts.Guarantor;
using TravelCompanyContracts.BusinessLogicsContracts.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.SearchModels.Guarantor;
using TravelCompanyBusinessLogic;
using TravelCompanyBusinessLogic.OfficePackage;
using TravelCompanyBusinessLogic.MailWorker;
using TravelCompanyDatabaseImplement.Models;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml.Wordprocessing;
namespace TravelCompanyGuarantorApp.Controllers
{
@ -8,19 +22,83 @@ namespace TravelCompanyGuarantorApp.Controllers
{
private readonly ILogger<HomeController> _logger;
public HomeController(ILogger<HomeController> logger)
private readonly IGuarantorLogic _guarantorLogic;
private readonly IReportLogic _reportLogic;
private readonly ITourLogic _tourLogic;
private readonly IGuideLogic _guideLogic;
private readonly AbstractSaveToPdf _pdfLogic;
private readonly AbstractMailWorker _mailLogic;
public HomeController(ILogger<HomeController> logger, IGuarantorLogic guarantorLogic, IReportLogic reportLogic, ITourLogic tourLogic, IGuideLogic guideLogic, AbstractSaveToPdf pdfLogic, AbstractMailWorker mailLogic)
{
_logger = logger;
_guarantorLogic = guarantorLogic;
_reportLogic = reportLogic;
_tourLogic = tourLogic;
_guideLogic = guideLogic;
_pdfLogic = pdfLogic;
_mailLogic = mailLogic;
}
public IActionResult Index()
{
return View();
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View(LoggedinGuarantor.Guarantor);
}
[HttpGet]
public IActionResult Privacy()
{
return View();
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View(LoggedinGuarantor.Guarantor);
}
[HttpPost]
public void Privacy(string name, string surname, string patronymic, string email, string mobilePhone, string password)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(surname) || string.IsNullOrEmpty(patronymic) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(mobilePhone) || string.IsNullOrEmpty(password))
{
throw new Exception("Введены не все данные!");
}
_guarantorLogic.Update(new GuarantorBindingModel
{
Id = LoggedinGuarantor.Guarantor.Id,
Name = name,
Surname = surname,
Patronymic = patronymic,
Email = email,
MobilePhone = mobilePhone,
Password = password
});
LoggedinGuarantor.Guarantor.Name = name;
LoggedinGuarantor.Guarantor.Surname = surname;
LoggedinGuarantor.Guarantor.Patronymic = patronymic;
LoggedinGuarantor.Guarantor.Email = email;
LoggedinGuarantor.Guarantor.MobilePhone = mobilePhone;
LoggedinGuarantor.Guarantor.Password = password;
Response.Redirect("Privacy");
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
@ -28,5 +106,224 @@ namespace TravelCompanyGuarantorApp.Controllers
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
[HttpGet]
public IActionResult Enter()
{
if (LoggedinGuarantor.Guarantor != null)
{
throw new Exception("Вы уже авторизовались!");
}
return View();
}
[HttpPost]
public void Enter(string email, string password)
{
if (string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password))
{
throw new Exception("Введены не все данные!");
}
LoggedinGuarantor.Guarantor = _guarantorLogic.ReadElement(new GuarantorSearchModel
{
Email = email,
Password = password
});
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Неверный логин/пароль");
}
Response.Redirect("Index");
}
[HttpGet]
public IActionResult Register()
{
if (LoggedinGuarantor.Guarantor != null)
{
throw new Exception("Вы уже зарегистрировались!");
}
return View();
}
[HttpPost]
public void Register(string name, string surname, string patronymic, string email, string password, string mobilePhone)
{
if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password))
{
throw new Exception("Введены не все данные!");
}
_guarantorLogic.Create(new GuarantorBindingModel
{
Name = name,
Surname = surname,
Patronymic = patronymic,
Email = email,
MobilePhone = mobilePhone,
Password = password
});
Response.Redirect("Enter");
}
public void Logout()
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
LoggedinGuarantor.Guarantor = null;
Response.Redirect("Enter");
}
[HttpGet]
public IActionResult ReportMenu()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View();
}
[HttpGet]
public IActionResult ReportTourPlace()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
ViewBag.Tours = _tourLogic.ReadList(new TourSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
return View();
}
[HttpGet]
public IActionResult ReportTourPeriod()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View();
}
[HttpPost]
public IActionResult ReportTourPeriod(DateTime dateFrom, DateTime dateTo)
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
if (dateFrom == DateTime.MinValue || dateTo == DateTime.MinValue)
{
throw new Exception("Введены не все данные!");
}
ViewBag.DateFrom = dateFrom;
ViewBag.DateTo = dateTo;
return View(_reportLogic.GetTourPeriod(new ReportBindingModel
{
DateFrom = dateFrom,
DateTo = dateTo,
GuarantorId = LoggedinGuarantor.Guarantor.Id
}));
}
[HttpPost]
public IActionResult CreateReport(List<int> tours, string type)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (tours == null)
{
throw new Exception("Выберите туры!");
}
if (type.Equals("docx"))
{
_reportLogic.SaveTourPlacesToWordFile(new ReportBindingModel
{
FileName = $@"C:\Users\User\Downloads\Список мест по турам{DateTime.Now.ToString("dd-MM-yyyy HH-mm-ss")}.docx",
GuarantorId = LoggedinGuarantor.Guarantor.Id,
Tours = tours
});
}
else if (type.Equals("xlsx"))
{
_reportLogic.SaveTourPlacesToExcelFile(new ReportBindingModel
{
FileName = $@"C:\Users\User\Downloads\Список мест по турам{DateTime.Now.ToString("dd-MM-yyyy HH-mm-ss")}.xlsx",
GuarantorId = LoggedinGuarantor.Guarantor.Id,
Tours = tours
});
}
ViewBag.Tours = _tourLogic.ReadList(new TourSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
});
return View("ReportTourPlace", tours);
}
[HttpPost]
public void SentPdfToMail(DateTime dateFrom, DateTime dateTo)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (dateFrom == DateTime.MinValue || dateTo == DateTime.MinValue)
{
throw new Exception("Введены не все данные!");
}
using (MemoryStream memoryStream = new MemoryStream())
{
SendMailReport(dateFrom, dateTo, memoryStream);
}
Response.Redirect("/Home/ReportTourPeriod");
}
public void SendMailReport(DateTime? dateFrom, DateTime? dateTo, MemoryStream stream)
{
var tours = _reportLogic.GetTourPeriod(new ReportBindingModel
{
DateFrom = dateFrom,
DateTo = dateTo,
GuarantorId = LoggedinGuarantor.Guarantor.Id,
});
if (tours == null)
return;
_pdfLogic.CreateDoc(new()
{
DateFrom = dateFrom!.Value,
DateTo = dateTo!.Value,
FileName = stream,
Tours = tours,
Title = "Отчет"
});
byte[] report = stream.GetBuffer();
_mailLogic.MailSendAsync(new() { MailAddress = LoggedinGuarantor.Guarantor.Email, Subject = "Отчет", FileName = "PdfReport.pdf", Pdf = report });
}
}
}
}

View File

@ -0,0 +1,122 @@
using Microsoft.AspNetCore.Mvc;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.BusinessLogicsContracts.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
namespace TravelCompanyGuarantorApp.Controllers
{
public class TourController : Controller
{
private readonly ILogger<TourController> _logger;
private readonly ITourLogic _tourLogic;
public TourController(ILogger<TourController> logger, ITourLogic tourLogic)
{
_logger = logger;
_tourLogic = tourLogic;
}
[HttpGet]
public IActionResult Tours()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View(_tourLogic.ReadList(new TourSearchModel
{
ContractorID = LoggedinGuarantor.Guarantor.Id,
}));
}
[HttpGet]
public IActionResult CreateTour()
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View();
}
[HttpPost]
public void CreateTour(string tourName, DateTime tourDate)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (string.IsNullOrEmpty(tourName) || tourDate == DateTime.MinValue)
{
throw new Exception("Введены не все данные!");
}
_tourLogic.Create(new TourBindingModel
{
TourName = tourName,
TourDate = tourDate,
ContractorID = LoggedinGuarantor.Guarantor.Id
});
Response.Redirect("/Tour/Tours");
}
[HttpGet]
public IActionResult UpdateTour(int id)
{
if (LoggedinGuarantor.Guarantor == null)
{
return Redirect("~/Home/Enter");
}
return View(_tourLogic.ReadElement(new TourSearchModel
{
Id = id
}));
}
[HttpPost]
public void UpdateTour(int id, string tourName, DateTime tourDate)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
if (string.IsNullOrEmpty(tourName) || tourDate == DateTime.MinValue)
{
throw new Exception("Введены не все данные!");
}
_tourLogic.Update(new TourBindingModel
{
Id = id,
TourName = tourName,
TourDate = tourDate,
ContractorID = LoggedinGuarantor.Guarantor.Id
});
Response.Redirect("/Tour/Tours");
}
[HttpPost]
public void DeleteTour(int id)
{
if (LoggedinGuarantor.Guarantor == null)
{
throw new Exception("Необходимо авторизоваться!");
}
_tourLogic.Delete(new TourBindingModel
{
Id = id
});
Response.Redirect("/Tour/Tours");
}
}
}

View File

@ -0,0 +1,10 @@

using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
namespace TravelCompanyGuarantorApp
{
public static class LoggedinGuarantor
{
public static GuarantorViewModel? Guarantor { get; set; } = null;
}
}

View File

@ -0,0 +1,112 @@
//using DocumentFormat.OpenXml.Bibliography;
//using System.Drawing;
//using TravelCompanyBusinessLogic.BusinessLogic.Guarantor;
//using TravelCompanyContracts.BindingModels.Contractor;
//using TravelCompanyContracts.BusinessLogicsContracts.Contractor;
//using TravelCompanyContracts.SearchModels.Guarantor;
//using TravelCompanyContracts.ViewModels;
//using TravelCompanyDatabaseImplement.Models;
//using TravelCompanyDataModels.Models;
//using TravelCompanyContracts.BindingModels.Guarantor;
//using TravelCompanyContracts.BusinessLogicsContracts.Guarantor;
//using TravelCompanyDataModels.Models.Guarantor;
//namespace TravelCompanyGuarantorApp
//{
// public class SeedingService
// {
// private readonly IGuideLogic _guideLogic;
// private readonly ITripLogic _tripLogic;
// private readonly IPlaceLogic _placeLogic;
// public SeedingService(IGuideLogic guideLogic, ITripLogic tripLogic, IPlaceLogic placeLogic)
// {
// _guideLogic = guideLogic;
// _tripLogic = tripLogic;
// _placeLogic = placeLogic;
// }
// public void SeedGuarantor()
// {
// if (_guideLogic.ReadList(null) == null || _guideLogic.ReadList(null)?.ToList().Count < 1)
// {
// string[] domains = { "gmail.com", "yahoo.com", "hotmail.com", "outlook.com" };
// string[] prefixes = { "ivan", "pavel", "", "anna", "sergei", "vasili" };
// string[] firstNames = { "Иван", "Петр", "Алексей" };
// string[] lastNames = { "Иванов", "Петров", "Сидоров" };
// string[] middleNames = { "Иванович", "Петрович", "Алексеевич" };
// Random random = new Random();
// for (int i = 0; i < 10; i++)
// {
// string areaCode = random.Next(100, 1000).ToString();
// string firstPart = random.Next(100, 1000).ToString();
// string secondPart = random.Next(1000, 10000).ToString();
// string randomPrefix = prefixes[random.Next(prefixes.Length)];
// string randomDomain = domains[random.Next(domains.Length)];
// string firstName = firstNames[random.Next(firstNames.Length)];
// string lastName = lastNames[random.Next(lastNames.Length)];
// string middleName = middleNames[random.Next(middleNames.Length)];
// _guideLogic.Create(new GuideBindingModel
// {
// GuideFIO = $"{lastName} {firstName} {middleName}",
// PhoneNumber = $"+7 ({areaCode}) {firstPart}-{secondPart}",
// GuidePrice = Double.Parse("{areaCode}")
// });
// }
// }
// if (_placeLogic.ReadList(null) == null || _placeLogic.ReadList(null)?.ToList().Count < 1)
// {
// string[] streets = { "Цветной бульвар", "Ленинградский проспект", "Тверская улица", "Пресненская набережная", "Садовая улица" };
// string[] cities = { "Москва", "Санкт-Петербург", "Новосибирск", "Екатеринбург" };
// Random random = new Random();
// for (int i = 0; i < 10; i++)
// {
// string street = streets[random.Next(streets.Length)];
// string city = cities[random.Next(cities.Length)];
// int houseNumber = random.Next(1, 100);
// _placeLogic.Create(new PlaceBindingModel
// {
// PlaceName = $"Место {i}",
// PlaceAddress = $"{city}, {street}, {houseNumber}"
// });
// }
// }
// if (_tripLogic.ReadList(null) == null || _tripLogic.ReadList(null)?.ToList().Count < 1)
// {
// var guides = _guideLogic.ReadList(null);
// var places = _placeLogic.ReadList(null);
// Random random = new Random();
// for (int i = 0; i < 10; i++)
// {
// int year = random.Next(2024, 2026);
// int month = random.Next(1, 13);
// int day = random.Next(1, 29);
// int guideId = guides[random.Next(0, guides.Count)].Id;
// Dictionary<int, IPlaceModel> tripPlaces = new Dictionary<int, IPlaceModel>();
// foreach (var place in places)
// {
// if (random.Next(0, 2) == 1)
// {
// tripPlaces.Add(place.Id, place);
// }
// }
// _tripLogic.Create(new TripBindingModel
// {
// TripName = $"Поездка {i}",
// TripDate = new DateTime(year, month, day),
// GuideId = guideId,
// TripPlaces = tripPlaces
// });
// }
// }
// }
// }
//}

View File

@ -6,4 +6,10 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TravelCompanyBusinessLogic\TravelCompanyBusinessLogic.csproj" />
<ProjectReference Include="..\TravelCompanyContracts\TravelCompanyContracts.csproj" />
<ProjectReference Include="..\TravelCompanyDatabaseImplement\TravelCompanyDatabaseImplement.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,69 @@
@{
ViewData["Title"] = "Create excursion";
}
<div class="text-center">
<h2 class="display-4">Создание экскурсии</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="excursionName" id="excursionName" /></div>
</div>
<div class="row">
<div class="col-4">Цена:</div>
<div class="col-8"><input type="text" id="excursionPrice" name="excursionPrice" /></div>
</div>
<div class="container">
<div class="fw-bold fs-4">Туры</div>
<div class="table-responsive-lg">
<table id="tourstable" class="display col-4">
<thead>
<tr>
<th>Название</th>
<th>Выбор</th>
</tr>
</thead>
<tbody>
@foreach (var tour in ViewBag.Tours)
{
<tr>
<td>@tour.TourName</td>
<td>
<input type="checkbox" name="tours" value="@tour.Id" />
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="container">
<div class="fw-bold fs-4">Гиды</div>
<div class="table-responsive-lg">
<table id="tourstable" class="display col-4">
<thead>
<tr>
<th>Название</th>
<th>Выбор</th>
</tr>
</thead>
<tbody>
@foreach (var guide in ViewBag.Guides)
{
<tr>
<td>@guide.GuideFIO</td>
<td>
<input type="checkbox" name="guides" value="@guide.Id" />
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Создать" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -1,4 +1,5 @@
@using TravelCompanyContracts.ViewModels
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
@model List<ExcursionViewModel>
@ -31,9 +32,6 @@
<th>
Название
</th>
<th>
Описание
</th>
<th>
Цена
</th>
@ -42,23 +40,23 @@
</tr>
</thead>
<tbody>
@foreach (var item in Model)
@foreach (var excursion in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
@Html.DisplayFor(modelItem => excursion.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.ExcursionName)
@Html.DisplayFor(modelItem => excursion.ExcursionName)
</td>
<td>
@Html.DisplayFor(modelItem => item.ExcursionPrice)
@Html.DisplayFor(modelItem => excursion.ExcursionPrice)
</td>
<td>
<button type="button" class="btn btn-primary">Изменить</button>
<button type="button" class="btn btn-primary" onclick="location.href='@Url.Action("UpdateExcursion", "/Excursion", new { id = excursion.Id })'">Изменить</button>
</td>
<td>
<button type="button" class="btn btn-primary">Удалить</button>
<button type="button" class="btn btn-primary" onclick="$.post('@Url.Action("DeleteExcursion", "/Excursion", new { id = excursion.Id })', function () {window.location.reload();})">Удалить</button>
</td>
</tr>
}

View File

@ -0,0 +1,61 @@
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
@model ExcursionViewModel
@{
ViewData["Title"] = "Update excursion";
}
<div class="text-center">
<h2 class="display-4">Редактирование экскурсии</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="excursionName" id="excursionName" value="@Model.ExcursionName" /></div>
</div>
<div class="row">
<div class="col-4">Цена:</div>
<div class="col-8"><input type="text" id="price" name="price" value="@Model.ExcursionPrice" /></div>
</div>@*
<div class="row">
<div class="col-4">Место для посещения:</div>
<div class="col-2">
<select id="place" name="place" class="form-control">
@foreach (var place in ViewBag.Places)
{
var isSelected = Model.PlaceId.Equals(place.Id);
<option value="@place.Id" selected="@isSelected">@place.PlaceName</option>
}
</select>
</div>
</div>
<div class="container">
<div class="fw-bold fs-4">Туры</div>
<div class="table-responsive-lg">
<table id="tourstable" class="display col-4">
<thead>
<tr>
<th>Название</th>
<th>Выбор</th>
</tr>
</thead>
<tbody>
@foreach (var tour in ViewBag.Tours)
{
var isChecked = Model.ExcursionTours.Any(x => x.Key.Equals(tour.Id));
<tr>
<td>@tour.TourName</td>
<td>
<input type="checkbox" name="tours" @(isChecked ? "checked" : "") value="@tour.Id" />
</td>
</tr>
}
</tbody>
</table>
</div>
</div>*@
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -0,0 +1,58 @@
@{
ViewData["Title"] = "Create group to place";
}
<div class="text-center">
<h2 class="display-5">Связывание группы и места для посещения</h2>
</div>
<form method="post" class="my-5">
<div class="row my-3 d-flex justify-content-center">
<div class="col-2">Группа:</div>
<div class="col-2">
<select id="excursionGroupId" name="excursionGroupId" class="form-control" asp-items="@(new SelectList(@ViewBag.ExcursionGroups,"Id", "ExcursionGroupName"))"></select>
</div>
</div>
<div class="row my-3 d-flex justify-content-center">
<div class="col-2">Место:</div>
<div class="col-2">
<select id="placeId" name="placeId" class="form-control" asp-items="@(new SelectList(@ViewBag.Places,"Id", "PlaceName"))"></select>
</div>
</div>
<div class="row">
<div class="my-3 d-flex justify-content-center"><input type="submit" value="Связать" class="btn btn-primary" /></div>
</div>
</form>
<table class="table">
<thead>
<tr>
<th>
Группа
</th>
<th>
Место
</th>
</tr>
</thead>
<tbody>
@foreach (var eg in ViewBag.ExcursionGroups)
{
<tr>
<td>
@eg.ExcursionGroupName
</td>
<td>
</td>
</tr>
foreach (var ep in eg.ExcursionGroupPlaces) {
<tr>
<td>
</td>
<td>
@ep.Value.PlaceName
</td>
</tr>
}
}
</tbody>
</table>

View File

@ -1,7 +1,4 @@
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels
@model List<TourViewModel>
@{
@{
ViewData["Title"] = "Create excursion group";
}
<div class="text-center">
@ -10,22 +7,22 @@
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="excursionname" id="excursionname" /></div>
<div class="col-8"><input type="text" name="excursionGroupName" id="excursionGroupName" /></div>
</div>
<div class="row">
<div class="col-4">Количество участников:</div>
<div class="col-8"><input type="text" name="participants" id="participants" /></div>
<div class="col-8"><input type="text" name="participantsAmount" id="participantsAmount" /></div>
</div>
<div class="row">
<div class="col-4">Гид:</div>
<div class="col-8">
<div class="col-2">
<select id="guide" name="guide" class="form-control" asp-items="@(new SelectList(@ViewBag.Guides,"Id", "GuideFIO"))"></select>
</div>
</div>
<div class="container">
<div>Туры</div>
<div class="fw-bold fs-4">Туры</div>
<div class="table-responsive-lg">
<table id="tourstable" class="display">
<table id="tourstable" class="display col-4">
<thead>
<tr>
<th>Название</th>
@ -33,12 +30,12 @@
</tr>
</thead>
<tbody>
@foreach (var tour in Model)
@foreach (var tour in ViewBag.Tours)
{
<tr>
<td>@tour.TourName</td>
<td>
<input type="checkbox" name="tourcheckbox" value="@tour.Id" />
<input type="checkbox" name="tours" value="@tour.Id" />
</td>
</tr>
}

View File

@ -0,0 +1,67 @@
@using TravelCompanyContracts.ViewModels
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels
@model List<ExcursionGroupViewModel>
@{
ViewData["Title"] = "Excursion groups";
}
<div class="text-center">
<h1 class="display-4">Экскурсионные группы</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="CreateExcursionGroup">Создать экскурсионную группу</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Название
</th>
<th>
Кол-во участников
</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var excursionGroup in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => excursionGroup.Id)
</td>
<td>
@Html.DisplayFor(modelItem => excursionGroup.ExcursionGroupName)
</td>
<td>
@Html.DisplayFor(modelItem => excursionGroup.PeopleAmount)
</td>
<td>
<button type="button" class="btn btn-primary" onclick="location.href='@Url.Action("UpdateExcursionGroup", "/ExcursionGroup", new { id = excursionGroup.Id })'">Изменить</button>
</td>
<td>
<button type="button" class="btn btn-primary" onclick="$.post('@Url.Action("DeleteExcursionGroup", "/ExcursionGroup", new { id = excursionGroup.Id })', function () {window.location.reload();})">Удалить</button>
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -1,6 +1,8 @@
@using TravelCompanyContracts.ViewModels
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels
@model List<TourViewModel>
@model ExcursionGroupViewModel
@{
ViewData["Title"] = "Update excursion group";
}
@ -10,22 +12,16 @@
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="excursionname" id="excursionname" /></div>
<div class="col-8"><input type="text" name="excursionGroupName" id="excursionGroupName" value="@Model.ExcursionGroupName" /></div>
</div>
<div class="row">
<div class="col-4">Количество участников:</div>
<div class="col-8"><input type="text" name="participants" id="participants" /></div>
</div>
<div class="row">
<div class="col-4">Гид:</div>
<div class="col-8">
<select id="guide" name="guide" class="form-control" asp-items="@(new SelectList(@ViewBag.Guides,"Id", "GuideFIO"))"></select>
</div>
<div class="col-8"><input type="text" name="participantsAmount" id="peopleAmount" value="@Model.PeopleAmount" /></div>
</div>
<div class="container">
<div>Туры</div>
<div class="fw-bold fs-4">Туры</div>
<div class="table-responsive-lg">
<table id="tourstable" class="display">
<table id="tourstable" class="display col-4">
<thead>
<tr>
<th>Название</th>
@ -33,12 +29,13 @@
</tr>
</thead>
<tbody>
@foreach (var tour in Model)
@foreach (var tour in ViewBag.Tours)
{
var isChecked = Model.ExcursionGroupTours.Any(x => x.Key.Equals(tour.Id));
<tr>
<td>@tour.TourName</td>
<td>
<input type="checkbox" name="tourcheckbox" value="@tour.Id" />
<input type="checkbox" name="tours" @(isChecked ? "checked" : "") value="@tour.Id" />
</td>
</tr>
}

View File

@ -8,7 +8,7 @@
<form method="post">
<div class="row">
<div class="col-4">Логин:</div>
<div class="col-8"><input type="text" name="login" /></div>
<div class="col-8"><input type="text" name="email" /></div>
</div>
<div class="row">
<div class="col-4">Пароль:</div>

View File

@ -1,8 +1,7 @@
@{
ViewData["Title"] = "Home Page";
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>
<h1 class="display-4">Турфирма «Иван Сусанин»</h1>
</div>

View File

@ -1,6 +1,40 @@
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels
<p>Use this page to detail your site's privacy policy.</p>
@model GuarantorViewModel
@{
ViewData["Title"] = "Privacy Policy";
}
<div class="text-center">
<h2 class="display-4">Личные данные</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Логин(почта):</div>
<div class="col-8"><input type="text" name="email" value="@Model.Email" /></div>
</div>
<div class="row">
<div class="col-4">Пароль:</div>
<div class="col-8"><input type="password" name="password" value="@Model.Password" /></div>
</div>
<div class="row">
<div class="col-4">Номер телефона:</div>
<div class="col-8"><input type="text" name="mobilePhone" value="@Model.MobilePhone" /></div>
</div>
<div class="row">
<div class="col-4">Фамилия:</div>
<div class="col-8"><input type="text" name="surname" value="@Model.Surname" /></div>
</div>
<div class="row">
<div class="col-4">Имя:</div>
<div class="col-8"><input type="text" name="name" value="@Model.Name" /></div>
</div>
<div class="row">
<div class="col-4">Отчество:</div>
<div class="col-8"><input type="text" name="patronymic" value="@Model.Patronymic" /></div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -7,19 +7,7 @@
</div>
<form method="post">
<div class="row">
<div class="col-4">Имя:</div>
<div class="col-8"><input type="text" name="name" /></div>
</div>
<div class="row">
<div class="col-4">Фамилия:</div>
<div class="col-8"><input type="text" name="surname" /></div>
</div>
<div class="row">
<div class="col-4">Отчество:</div>
<div class="col-8"><input type="text" name="patronymic" /></div>
</div>
<div class="row">
<div class="col-4">Email:</div>
<div class="col-4">Логин (почта):</div>
<div class="col-8"><input type="text" name="email" /></div>
</div>
<div class="row">
@ -28,7 +16,19 @@
</div>
<div class="row">
<div class="col-4">Номер телефона:</div>
<div class="col-8"><input type="text" name="mobilephone" /></div>
<div class="col-8"><input type="text" name="mobilePhone" /></div>
</div>
<div class="row">
<div class="col-4">Фамилия:</div>
<div class="col-8"><input type="text" name="surname"/></div>
</div>
<div class="row">
<div class="col-4">Имя:</div>
<div class="col-8"><input type="text" name="name"/></div>
</div>
<div class="row">
<div class="col-4">Отчество:</div>
<div class="col-8"><input type="text" name="patronymic"/></div>
</div>
<div class="row">
<div class="col-8"></div>

View File

@ -5,11 +5,11 @@
<div class="text-center">
<h1 class="display-4">Меню создания отчетов</h1>
<div class="list-group">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="ReportPlaceTour">
<a class="nav-link text-dark" style="font-size: 1.2em; color: #333; text-decoration: underline;" asp-area="" asp-controller="Home" asp-action="ReportTourPlace">
Отчет мест для
посещения по выбранным турам
</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="ReportTourPeriod">
<a class="nav-link text-dark" style="font-size: 1.2em; color: #333; text-decoration: underline;" asp-area="" asp-controller="Home" asp-action="ReportTourPeriod">
Отчет по турам с
расшифровкой по экскурсионным группам и гидам за
период

View File

@ -0,0 +1,78 @@
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels
@using TravelCompanyContracts.ViewModels
@model List<ReportTourPeriodViewModel>
@{
ViewData["Title"] = "Tours time period report";
}
<div class="text-center">
<h1 class="display-4">
Отчет по турам с
расшифровкой по экскурсионным группам и гидам за
период
</h1>
</div>
<form method="post">
<div class="row mb-5">
<div class="col-4">Начальная дата:</div>
<div class="col-8">
<input type="date" id="startDate" name="dateFrom" @(@ViewBag.DateFrom != null ? $"value={@ViewBag.DateFrom.ToString("yyyy-MM-dd")}" : "") class="form-control">
</div>
</div>
<div class="row mb-5">
<div class="col-4">Конечная дата:</div>
<div class="col-8">
<input type="date" id="endDate" name="dateTo" @(@ViewBag.DateTo != null ? $"value={@ViewBag.DateTo.ToString("yyyy-MM-dd")}" : "") class="form-control">
</div>
</div>
<button type="submit" class="btn btn-primary">Сформировать отчет</button>
<button type="submit" class="btn btn-primary" formaction="@Url.Action("SentPdfToMail", "Home")">Отправить отчет на почту</button>
</form>
<table class="table">
<thead>
<tr>
<th>Тур</th>
<th>Дата тура</th>
<th>Экскурсионная группа</th>
<th>Количество участников</th>
<th>ФИО гида</th>
</tr>
</thead>
<tbody>
@if (Model == null || Model.Count <= 0)
{
<td class="text-center" colspan="6">Нет доступных данных</td>
}
else
{
foreach (var record in Model)
{
<tr>
<td>@record.Tour.TourName</td>
<td>@record.Tour.TourDate.ToShortDateString()</td>
<td></td>
<td></td>
<td></td>
</tr>
var excursionGroups = new List<ExcursionGroupViewModel>(record.ExcursionGroups);
var guides = new List<GuideViewModel>(record.Guides);
for (int i = 0; i < excursionGroups.Count; i++)
{
<tr>
<td></td>
<td></td>
<td></td>
<td>@excursionGroups[i].ExcursionGroupName</td>
<td>@excursionGroups[i].PeopleAmount</td>
<td>@guides[i].GuideFIO</td>
</tr>
}
}
}
</tbody>
</table>

View File

@ -0,0 +1,53 @@
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels
@using TravelCompanyContracts.ViewModels
@model List<int>
@{
ViewData["Title"] = "Places per tour report";
}
<div class="text-center">
<h1 class="display-4">Список мест для посещения по выбранным турам</h1>
</div>
<form method="post">
<p fw-bold fs-4>Выберите тур:</p>
<div class="table-responsive-lg">
<table id="tourstable" class="display col-4">
<thead>
<tr>
<th>Название</th>
<th>Выбор</th>
</tr>
</thead>
<tbody>
@foreach (var tour in ViewBag.Tours)
{
var isChecked = false;
if (Model != null && Model.Count > 0) {
isChecked = Model.Any(x => x.Equals(tour.Id));
}
<tr>
<td>@tour.TourName</td>
<td>
<input type="checkbox" name="tours" @(isChecked ? "checked" : "") value="@tour.Id" />
</td>
</tr>
}
</tbody>
</table>
</div>
<div>
<label class="form-label">Выберите формат файла:</label>
<div class="form-check">
<input class="form-check-input" type="radio" name="type" value="docx" id="docx" checked>
<label class="form-check-label" for="docx">Word-файл</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="type" value="xlsx" id="xlsx">
<label class="form-check-label" for="xlsx">Excel-файл</label>
</div>
</div>
<button type="submit" class="btn btn-primary" formaction="@Url.Action("CreateReport", "Home")">Сохранить отчет</button>
</form>

View File

@ -3,27 +3,59 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - TravelCompanyGuarantorApp</title>
<title>@ViewData["Title"] - TravelAgencyWebApp</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/TravelCompanyGuarantorApp.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="~/css/site.css" />
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">TravelCompanyGuarantorApp</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bgwhite border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Турфирма «Иван Сусанин»</a>
<button class="navbar-toggler" type="button" datatoggle="collapse" data-target=".navbar-collapse" ariacontrols="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<div class="navbar-collapse collapse d-sm-inline-flex flex-smrow-reverse">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Register">Регистрация</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Enter">Вход</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Logout">Выход</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Tour" asp-action="Tours">Туры</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Excursion" asp-action="Excursions">Экскурсии</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="ExcursionGroup" asp-action="ExcursionGroups">Экскурсионные группы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="ExcursionGroup" asp-action="ConnectGroupToPlace">Связать группу с местом</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Guide" asp-action="Guides">Гиды</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Place" asp-action="Places">Места для посещения</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Guide" asp-action="ConnectGuideToExcursion">Связать гида с экскурсией</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="ReportMenu">Отчет</a>
</li>
</ul>
</div>
@ -35,15 +67,12 @@
@RenderBody()
</main>
</div>
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2024 - TravelCompanyGuarantorApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; Иван Сусанин 2024 <a asparea="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@await RenderSectionAsync("Scripts", required: false)
@RenderSection("Scripts", required: false)
</body>
</html>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "Create tour";
}
<div class="text-center">
<h2 class="display-4">Создание тура</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="tourName" id="tourName" /></div>
</div>
<div class="row">
<div class="col-4">Описание:</div>
<div class="col-8"><input type="text" name="tourDescription" id="tourDescription" /></div>
</div>
<div class="row">
<div class="col-4">Цена:</div>
<div class="col-8"><input type="text" id="price" name="price" /></div>
</div>
<div class="row">
<div class="col-4">Дата тура:</div>
<div class="col-8"><input type="date" name="tourDate" id="tourDate" /></div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Создать" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -0,0 +1,68 @@
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
@model List<TourViewModel>
@{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Туры</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="CreateTour">Создать тур</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Название
</th>
<th>
Дата тура
</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var tour in Model)
{
<tr>
<td>
@tour.Id
</td>
<td>
@tour.TourName
</td>
<td>
@tour.TourDate.ToShortDateString()
</td>
<td>
<button type="button" class="btn btn-primary" onclick="location.href='@Url.Action("UpdateTour", "/Tour", new { id = tour.Id })'">Изменить</button>
</td>
<td>
<button type="button" class="btn btn-primary" onclick="$.post('@Url.Action("DeleteTour", "/Tour", new { id = tour.Id })', function () {window.location.reload();})">
Удалить
</button>
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -1,4 +1,9 @@
@{
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
@using TravelCompanyContracts.ViewModels.Guarantor.ViewModels;
@model TourViewModel
@{
ViewData["Title"] = "Update tour";
}
<div class="text-center">
@ -7,11 +12,11 @@
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="tourname" id="tourname" /></div>
<div class="col-8"><input type="text" name="tourName" value="@Model.TourName" /></div>
</div>
<div class="row">
<div class="col-4">Дата тура:</div>
<div class="col-8"><input type="date" name="tourdate" id="tourdate" /></div>
<div class="col-8"><input type="date" name="tourDate" value="@Model.TourDate.ToString("yyyy-MM-dd")" /></div>
</div>
<div class="row">
<div class="col-8"></div>

View File

@ -5,5 +5,8 @@
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"IPAddress": "http://localhost:5112/"
}

View File

@ -11,9 +11,8 @@ using TravelCompanyContracts.BusinessLogicsContracts.Guarantor;
using TravelCompanyContracts.BusinessLogicsContracts;
using TravelCompanyContracts.StoragesModels.Guarantor;
using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyDatabaseImplement.Implements.ContractorImplements;
using TravelCompanyDatabaseImplement.Implements.GuarantorImplements;
using TravelCompanyBusinessLogic;
using TravelCompanyDatabaseImplement.Implements;
var builder = WebApplication.CreateBuilder(args);

View File

@ -1,114 +0,0 @@
using TravelCompanyContracts.BindingModels;
using TravelCompanyContracts.BindingModels.Guarantor;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor;
using TravelCompanyContracts.ViewModels.Guarantor;
using TravelCompanyWebApp.Models;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelAgencyContracts.ViewModels;
namespace TravelCompanyWebApp.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
public HomeController(ILogger<HomeController> logger)
{
_logger = logger;
}
public IActionResult Index()
{
return View();
}
[HttpGet]
public IActionResult Privacy()
{
return View();
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
[HttpGet]
public IActionResult Enter()
{
return View();
}
[HttpGet]
public IActionResult Register()
{
return View();
}
[HttpGet]
public IActionResult Excursions()
{
return View(new List<ExcursionViewModel>());
}
[HttpGet]
public IActionResult ExcursionGroups()
{
return View(new List<ExcursionGroupViewModel>());
}
[HttpGet]
public IActionResult Tours()
{
return View(new List<TourViewModel>());
}
[HttpGet]
public IActionResult CreateTour()
{
return View();
}
[HttpGet]
public IActionResult CreateExcursion()
{
return View(new List<TourViewModel>());
}
[HttpGet]
public IActionResult CreateExcursionGroup()
{
return View(new List<TourViewModel>());
}
[HttpGet]
public IActionResult UpdateTour()
{
return View();
}
[HttpGet]
public IActionResult UpdateExcursion()
{
return View(new List<TourViewModel>());
}
[HttpGet]
public IActionResult UpdateExcursionGroup()
{
return View(new List<TourViewModel>());
}
[HttpGet]
public IActionResult ReportMenu()
{
return View();
}
[HttpGet]
public IActionResult ReportPlaceTour()
{
return View(new List<ReportPlaceTourViewModel>());
}
[HttpGet]
public IActionResult ReportTourPeriod()
{
return View(new List<ReportTourPeriodViewModel>());
}
}
}

View File

@ -1,9 +0,0 @@
namespace TravelCompanyWebApp.Models
{
public class ErrorViewModel
{
public string? RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}

View File

@ -1,19 +0,0 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();

View File

@ -1,28 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:13126",
"sslPort": 44334
}
},
"profiles": {
"TravelAgencyWebApp": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7180;http://localhost:5032",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -1,17 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TravelCompanyContracts\TravelCompanyContracts.csproj" />
</ItemGroup>
</Project>

View File

@ -1,47 +0,0 @@
@using TravelCompanyContracts.ViewModels.Contractor.ViewModels
@model List<TourViewModel>
@{
ViewData["Title"] = "Create excursion";
}
<div class="text-center">
<h2 class="display-4">Создание экскурсии</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="excursionname" id="excursionname" /></div>
</div>
<div class="row">
<div class="col-4">Описание:</div>
<div class="col-8"><input type="text" name="description" id="description" /></div>
</div>
<div class="container">
<div>Туры</div>
<div class="table-responsive-lg">
<table id="tourstable" class="display">
<thead>
<tr>
<th>Название</th>
<th>Выбор</th>
</tr>
</thead>
<tbody>
@foreach (var tour in Model)
{
<tr>
<td>@tour.TourName</td>
<td>
<input type="checkbox" name="tourcheckbox" value="@tour.Id" />
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Создать" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -1,20 +0,0 @@
@{
ViewData["Title"] = "Create tour";
}
<div class="text-center">
<h2 class="display-4">Создание тура</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="tourname" id="tourname" /></div>
</div>
<div class="row">
<div class="col-4">Дата тура:</div>
<div class="col-8"><input type="date" name="tourdate" id="tourdate" /></div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Создать" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -1,74 +0,0 @@
@using TravelAgencyContracts.ViewModels
@model List<ExcursionGroupViewModel>
@{
ViewData["Title"] = "Excursion groups";
}
<div class="text-center">
<h1 class="display-4">Экскурсионные группы</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="CreateExcursionGroup">Создать экскурсионную группу</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Название
</th>
<th>
Описание
</th>
<th>
Цена
</th>
<th>
Гид
</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.ExcursionGroupName)
</td>
<td>
@Html.DisplayFor(modelItem => item.ParticipantsAmount)
</td>
<td>
@Html.DisplayFor(modelItem => item.GuideFIO)
</td>
<td>
<button type="button" class="btn btn-primary">Изменить</button>
</td>
<td>
<button type="button" class="btn btn-primary">Удалить</button>
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -1,7 +0,0 @@
@{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Турфирма «Иван Сусанин»</h1>
</div>

View File

@ -1,32 +0,0 @@
@using TravelAgencyContracts.ViewModels
@model UserViewModel
@{
ViewData["Title"] = "Privacy Policy";
}
<div class="text-center">
<h2 class="display-4">Личные данные</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Логин(почта):</div>
<div class="col-8"><input type="text" name="login" value="@Model.Email" /></div>
</div>
<div class="row">
<div class="col-4">Пароль:</div>
<div class="col-8"><input type="password" name="password" value="@Model.Password" /></div>
</div>
<div class="row">
<div class="col-4">Номер телефона:</div>
<div class="col-8"><input type="text" name="phone" value="@Model.PhoneNumber" /></div>
</div>
<div class="row">
<div class="col-4">ФИО:</div>
<div class="col-8"><input type="text" name="fio" value="@Model.UserFIO" /></div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -1,48 +0,0 @@
@using TravelCompanyContracts.ViewModels
@model List<ReportPlaceTourViewModel>
@{
ViewData["Title"] = "Places per tour report";
}
<div class="text-center">
<h1 class="display-4">Список мест для посещения по выбранным турам</h1>
</div>
<form asp-controller="Report" method="post">
<button type="submit" class="btn btn-primary">Сгенерировать отчет в Word</button>
</form>
<form asp-controller="Report" method="post">
<button type="submit" class="btn btn-primary">Сгенерировать отчет в Excel</button>
</form>
<div class="row">
<div class="col-4">Выберите тур:</div>
<div class="col-8">
<select id="tour" name="tour" class="form-control" asp-items="@(new SelectList(@ViewBag.Tours,"Id", "TourName"))"></select>
</div>
</div>
<table class="table">
<thead>
<tr>
<th>Тур</th>
<th>Место</th>
</tr>
</thead>
<tbody>
@foreach (var tour in Model)
{
<tr>
<td>@tour.TourName</td>
<td>
<ul>
@foreach (var place in tour.Places)
{
<li>@place</li>
}
</ul>
</td>
</tr>
}
</tbody>
</table>

View File

@ -1,65 +0,0 @@
@using TravelCompanyContracts.ViewModels
@model List<ReportTourPeriodViewModel>
@{
ViewData["Title"] = "Tours time period report";
}
<div class="text-center">
<h1 class="display-4">
Отчет по турам с
расшифровкой по экскурсионным группам и гидам за
период
</h1>
</div>
<form asp-controller="Report" method="post">
<button type="submit" class="btn btn-primary">Отправить отчет на почту</button>
</form>
<div class="row mb-5">
<div class="col-4">Начальная дата:</div>
<div class="col-8">
<input type="date" id="startDate" name="startDate" class="form-control">
</div>
</div>
<div class="row mb-5">
<div class="col-4">Конечная дата:</div>
<div class="col-8">
<input type="date" id="endDate" name="endDate" class="form-control">
</div>
</div>
<table class="table">
<thead>
<tr>
<th>Тур</th>
<th>Экскурсионная группа</th>
<th>Гид</th>
</tr>
</thead>
<tbody>
@foreach (var tour in Model)
{
<tr>
<td>@tour.TourName</td>
<td>
<ul>
@foreach (var excursionGroup in tour.ExcursionGroups)
{
<li>@excursionGroup</li>
}
</ul>
</td>
<td>
<ul>
@foreach (var guide in tour.Guides)
{
<li>@guide</li>
}
</ul>
</td>
</tr>
}
</tbody>
</table>

View File

@ -1,72 +0,0 @@
@using TravelCompanyContracts.ViewModels
@model List<TourViewModel>
@{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Туры</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="CreateTour">Создать тур</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Название
</th>
<th>
Описание
</th>
<th>
Цена
</th>
<th>
Дата тура
</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.TourName)
</td>
<td>
@Html.DisplayFor(modelItem => item.TourDate)
</td>
<td>
<button type="button" class="btn btn-primary">Изменить</button>
</td>
<td>
<button type="button" class="btn btn-primary">Удалить</button>
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -1,51 +0,0 @@
@using TravelCompanyContracts.ViewModels
@model List<TourViewModel>
@{
ViewData["Title"] = "Update excursion";
}
<div class="text-center">
<h2 class="display-4">Редактирование экскурсии</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Название:</div>
<div class="col-8"><input type="text" name="excursionname" id="excursionname" /></div>
</div>
<div class="row">
<div class="col-4">Описание:</div>
<div class="col-8"><input type="text" name="description" id="description" /></div>
</div>
<div class="row">
<div class="col-4">Цена:</div>
<div class="col-8"><input type="text" id="price" name="price" /></div>
</div>
<div class="container">
<div>Туры</div>
<div class="table-responsive-lg">
<table id="tourstable" class="display">
<thead>
<tr>
<th>Название</th>
<th>Выбор</th>
</tr>
</thead>
<tbody>
@foreach (var tour in Model)
{
<tr>
<td>@tour.TourName</td>
<td>
<input type="checkbox" name="tourcheckbox" value="@tour.Id" />
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="btn btn-primary" /></div>
</div>
</form>

View File

@ -1,25 +0,0 @@
@model ErrorViewModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>

View File

@ -1,63 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - TravelAgencyWebApp</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bgwhite border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-controller="Home" aspaction="Index">Турфирма «Иван Сусанин»</a>
<button class="navbar-toggler" type="button" datatoggle="collapse" data-target=".navbar-collapse" ariacontrols="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex flex-smrow-reverse">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Enter">Вход</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Register">Регистрация</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Tours">Туры</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Excursions">Экскурсии</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="ExcursionGroups">Экскурсионные группы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="ReportMenu">Отчеты</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2024 - Иван Сусанин - <a asp-area="" aspcontroller="Home" asp-action="Privacy">Личные данные</a>
</div>
</footer>
<script src="~/js/site.js" asp-append-version="true"></script>
@RenderSection("Scripts", required: false)
</body>
</html>

View File

@ -1,48 +0,0 @@
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */
a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}
a {
color: #0077cc;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
.border-top {
border-top: 1px solid #e5e5e5;
}
.border-bottom {
border-bottom: 1px solid #e5e5e5;
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
button.accept-policy {
font-size: 1rem;
line-height: inherit;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
white-space: nowrap;
line-height: 60px;
}

View File

@ -1,2 +0,0 @@
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>

View File

@ -1,3 +0,0 @@
@using TravelCompanyWebApp
@using TravelCompanyWebApp.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@ -1,3 +0,0 @@
@{
Layout = "_Layout";
}

View File

@ -1,8 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -1,9 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@ -1,18 +0,0 @@
html {
font-size: 15px;
}
@media (min-width: 768px) {
html {
font-size: 15px;
}
}
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -1,4 +0,0 @@
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
// for details on configuring this project to bundle and minify static web assets.
// Write your JavaScript code.

View File

@ -1,22 +0,0 @@
The MIT License (MIT)
Copyright (c) 2011-2021 Twitter, Inc.
Copyright (c) 2011-2021 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,427 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
background-color: currentColor;
border: 0;
opacity: 0.25;
}
hr:not([size]) {
height: 1px;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-bs-original-title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: #0d6efd;
text-decoration: underline;
}
a:hover {
color: #0a58ca;
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
direction: ltr /* rtl:ignore */;
unicode-bidi: bidi-override;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: left;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::file-selector-button {
font: inherit;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

View File

@ -1,8 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

View File

@ -1,424 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
background-color: currentColor;
border: 0;
opacity: 0.25;
}
hr:not([size]) {
height: 1px;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-bs-original-title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-right: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-right: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: #0d6efd;
text-decoration: underline;
}
a:hover {
color: #0a58ca;
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
direction: ltr ;
unicode-bidi: bidi-override;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: right;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: right;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: right;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::file-selector-button {
font: inherit;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */

File diff suppressed because one or more lines are too long

View File

@ -1,8 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More