add authorization and registration forms
This commit is contained in:
commit
aa5ec76d90
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.strings.v9.bin
Normal file
BIN
demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.strings.v9.bin
Normal file
Binary file not shown.
BIN
demo_blagodat/.vs/demo_blagodat/DesignTimeBuild/.dtbcache.v2
Normal file
BIN
demo_blagodat/.vs/demo_blagodat/DesignTimeBuild/.dtbcache.v2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/.vs/demo_blagodat/v17/.futdcache.v2
Normal file
BIN
demo_blagodat/.vs/demo_blagodat/v17/.futdcache.v2
Normal file
Binary file not shown.
BIN
demo_blagodat/.vs/demo_blagodat/v17/.suo
Normal file
BIN
demo_blagodat/.vs/demo_blagodat/v17/.suo
Normal file
Binary file not shown.
@ -0,0 +1,44 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|c:\\users\\vivobook 15x\\desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\demo_blagodat\\demo_blagodat\\demo_blagodat\\registration.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
|
||||
"RelativeMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|solutionrelative:registration.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 2,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Registration.axaml",
|
||||
"DocumentMoniker": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Registration.axaml",
|
||||
"RelativeDocumentMoniker": "Registration.axaml",
|
||||
"ToolTip": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Registration.axaml",
|
||||
"RelativeToolTip": "Registration.axaml",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
|
||||
"WhenOpened": "2025-02-05T10:59:46.873Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
44
demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.json
Normal file
44
demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|c:\\users\\vivobook 15x\\desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\demo_blagodat\\demo_blagodat\\demo_blagodat\\registration.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
|
||||
"RelativeMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|solutionrelative:registration.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 2,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Registration.axaml",
|
||||
"DocumentMoniker": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Registration.axaml",
|
||||
"RelativeDocumentMoniker": "Registration.axaml",
|
||||
"ToolTip": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Registration.axaml",
|
||||
"RelativeToolTip": "Registration.axaml",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
|
||||
"WhenOpened": "2025-02-05T10:59:46.873Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
10
demo_blagodat/App.axaml
Normal file
10
demo_blagodat/App.axaml
Normal file
@ -0,0 +1,10 @@
|
||||
<Application xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="demo_blagodat.App"
|
||||
RequestedThemeVariant="Default">
|
||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
</Application.Styles>
|
||||
</Application>
|
24
demo_blagodat/App.axaml.cs
Normal file
24
demo_blagodat/App.axaml.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace demo_blagodat
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
desktop.MainWindow = new Authorization();
|
||||
}
|
||||
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
}
|
||||
}
|
||||
}
|
24
demo_blagodat/Authorization.axaml
Normal file
24
demo_blagodat/Authorization.axaml
Normal file
@ -0,0 +1,24 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="demo_blagodat.Authorization"
|
||||
Title="Авторизация">
|
||||
<StackPanel Spacing="15" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="Введите логин"/>
|
||||
<TextBox Width="300" x:Name="LoginTextBox"/>
|
||||
<TextBlock Text="Введите пароль"/>
|
||||
<TextBox Width="300" x:Name="PasswordTextBox"/>
|
||||
<StackPanel Spacing="5" Orientation="Horizontal">
|
||||
<Button Content="Зарегистрироваться"
|
||||
Click="RegisterClick_OnClick">
|
||||
|
||||
</Button>
|
||||
<Button Content="Войти"
|
||||
Click="MainOneClikc">
|
||||
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Window>
|
26
demo_blagodat/Authorization.axaml.cs
Normal file
26
demo_blagodat/Authorization.axaml.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using demo_blagodat.Models;
|
||||
|
||||
namespace demo_blagodat;
|
||||
|
||||
public partial class Authorization : Window
|
||||
{
|
||||
public Authorization()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void RegisterClick_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
new Registration().Show();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void MainOneClikc(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
new MainWindow().Show();
|
||||
Close();
|
||||
}
|
||||
}
|
13
demo_blagodat/MainWindow.axaml
Normal file
13
demo_blagodat/MainWindow.axaml
Normal file
@ -0,0 +1,13 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="demo_blagodat.MainWindow"
|
||||
Title="Основное окно">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="10">
|
||||
<TextBlock/>
|
||||
<TextBlock x:Name="ClickCounts"/>
|
||||
<Button Width="200" Content="Открыть счет"/>
|
||||
</StackPanel>
|
||||
</Window>
|
17
demo_blagodat/MainWindow.axaml.cs
Normal file
17
demo_blagodat/MainWindow.axaml.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using static System.Formats.Asn1.AsnWriter;
|
||||
|
||||
namespace demo_blagodat
|
||||
{
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
23
demo_blagodat/Models/Client.cs
Normal file
23
demo_blagodat/Models/Client.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_blagodat.Models;
|
||||
|
||||
public partial class Client
|
||||
{
|
||||
public int ClientCode { get; set; }
|
||||
|
||||
public string ClientName { get; set; } = null!;
|
||||
|
||||
public string ClientPassport { get; set; } = null!;
|
||||
|
||||
public DateOnly ClientBirthday { get; set; }
|
||||
|
||||
public string ClientAddress { get; set; } = null!;
|
||||
|
||||
public string? ClientEmail { get; set; }
|
||||
|
||||
public string ClientPassword { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
|
||||
}
|
23
demo_blagodat/Models/Employee.cs
Normal file
23
demo_blagodat/Models/Employee.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_blagodat.Models;
|
||||
|
||||
public partial class Employee
|
||||
{
|
||||
public int EmployeesId { get; set; }
|
||||
|
||||
public string EmployeesName { get; set; } = null!;
|
||||
|
||||
public string EmployeesPosition { get; set; } = null!;
|
||||
|
||||
public string EmployeesLogin { get; set; } = null!;
|
||||
|
||||
public string EmployeesPassword { get; set; } = null!;
|
||||
|
||||
public DateOnly? EmployeesDateDay { get; set; }
|
||||
|
||||
public TimeOnly? EmployeesDateHour { get; set; }
|
||||
|
||||
public bool EmployeesEntrance { get; set; }
|
||||
}
|
25
demo_blagodat/Models/Order.cs
Normal file
25
demo_blagodat/Models/Order.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_blagodat.Models;
|
||||
|
||||
public partial class Order
|
||||
{
|
||||
public int OrderId { get; set; }
|
||||
|
||||
public DateOnly OrderDate { get; set; }
|
||||
|
||||
public TimeOnly OrderTime { get; set; }
|
||||
|
||||
public int OrderClient { get; set; }
|
||||
|
||||
public int OrderRentalTime { get; set; }
|
||||
|
||||
public string OrderStatus { get; set; } = null!;
|
||||
|
||||
public DateOnly? OrderClosingDate { get; set; }
|
||||
|
||||
public virtual Client OrderClientNavigation { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<OrdersWithService> OrdersWithServices { get; set; } = new List<OrdersWithService>();
|
||||
}
|
17
demo_blagodat/Models/OrdersWithService.cs
Normal file
17
demo_blagodat/Models/OrdersWithService.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_blagodat.Models;
|
||||
|
||||
public partial class OrdersWithService
|
||||
{
|
||||
public int OrdersWithServicesId { get; set; }
|
||||
|
||||
public int Order { get; set; }
|
||||
|
||||
public int Service { get; set; }
|
||||
|
||||
public virtual Order OrderNavigation { get; set; } = null!;
|
||||
|
||||
public virtual Service ServiceNavigation { get; set; } = null!;
|
||||
}
|
17
demo_blagodat/Models/Service.cs
Normal file
17
demo_blagodat/Models/Service.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_blagodat.Models;
|
||||
|
||||
public partial class Service
|
||||
{
|
||||
public int ServiceId { get; set; }
|
||||
|
||||
public string ServiceName { get; set; } = null!;
|
||||
|
||||
public string ServiceCode { get; set; } = null!;
|
||||
|
||||
public decimal ServiceCostPerHour { get; set; }
|
||||
|
||||
public virtual ICollection<OrdersWithService> OrdersWithServices { get; set; } = new List<OrdersWithService>();
|
||||
}
|
156
demo_blagodat/Models/User11Context.cs
Normal file
156
demo_blagodat/Models/User11Context.cs
Normal file
@ -0,0 +1,156 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace demo_blagodat.Models;
|
||||
|
||||
public partial class User11Context : DbContext
|
||||
{
|
||||
public User11Context()
|
||||
{
|
||||
}
|
||||
|
||||
public User11Context(DbContextOptions<User11Context> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<Client> Clients { get; set; }
|
||||
|
||||
public virtual DbSet<Employee> Employees { get; set; }
|
||||
|
||||
public virtual DbSet<Order> Orders { get; set; }
|
||||
|
||||
public virtual DbSet<OrdersWithService> OrdersWithServices { get; set; }
|
||||
|
||||
public virtual DbSet<Service> Services { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
|
||||
=> optionsBuilder.UseNpgsql("Host=45.67.56.214;Port=5421;Database=user11;Username=user11;Password=JSZHJyg1");
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Client>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.ClientCode).HasName("clients_pk");
|
||||
|
||||
entity.ToTable("clients", "Demo_balgodat");
|
||||
|
||||
entity.Property(e => e.ClientCode)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("client_code");
|
||||
entity.Property(e => e.ClientAddress)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("client_address");
|
||||
entity.Property(e => e.ClientBirthday).HasColumnName("client_birthday");
|
||||
entity.Property(e => e.ClientEmail)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("client_email");
|
||||
entity.Property(e => e.ClientName)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("client_name");
|
||||
entity.Property(e => e.ClientPassport)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("client_passport");
|
||||
entity.Property(e => e.ClientPassword)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("client_password");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Employee>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.EmployeesId).HasName("employees_pk");
|
||||
|
||||
entity.ToTable("employees", "Demo_balgodat");
|
||||
|
||||
entity.Property(e => e.EmployeesId)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("employees_id");
|
||||
entity.Property(e => e.EmployeesDateDay).HasColumnName("employees_date(day)");
|
||||
entity.Property(e => e.EmployeesDateHour).HasColumnName("employees_date(hour)");
|
||||
entity.Property(e => e.EmployeesEntrance).HasColumnName("employees_entrance");
|
||||
entity.Property(e => e.EmployeesLogin)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("employees_login");
|
||||
entity.Property(e => e.EmployeesName)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("employees_name");
|
||||
entity.Property(e => e.EmployeesPassword)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("employees_password");
|
||||
entity.Property(e => e.EmployeesPosition)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("employees_position");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Order>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.OrderId).HasName("orders_pk");
|
||||
|
||||
entity.ToTable("orders", "Demo_balgodat");
|
||||
|
||||
entity.Property(e => e.OrderId)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("order_id");
|
||||
entity.Property(e => e.OrderClient).HasColumnName("order_client");
|
||||
entity.Property(e => e.OrderClosingDate).HasColumnName("order_closing_date");
|
||||
entity.Property(e => e.OrderDate).HasColumnName("order_date");
|
||||
entity.Property(e => e.OrderRentalTime).HasColumnName("order_rental_time");
|
||||
entity.Property(e => e.OrderStatus)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("order_status");
|
||||
entity.Property(e => e.OrderTime).HasColumnName("order_time");
|
||||
|
||||
entity.HasOne(d => d.OrderClientNavigation).WithMany(p => p.Orders)
|
||||
.HasForeignKey(d => d.OrderClient)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("orders_clients_fk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<OrdersWithService>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.OrdersWithServicesId).HasName("orders_with_services_pk");
|
||||
|
||||
entity.ToTable("orders_with_services", "Demo_balgodat");
|
||||
|
||||
entity.Property(e => e.OrdersWithServicesId)
|
||||
.UseIdentityAlwaysColumn()
|
||||
.HasColumnName("orders_with_services_id");
|
||||
entity.Property(e => e.Order).HasColumnName("order");
|
||||
entity.Property(e => e.Service).HasColumnName("service");
|
||||
|
||||
entity.HasOne(d => d.OrderNavigation).WithMany(p => p.OrdersWithServices)
|
||||
.HasForeignKey(d => d.Order)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("orders_with_services_orders_fk");
|
||||
|
||||
entity.HasOne(d => d.ServiceNavigation).WithMany(p => p.OrdersWithServices)
|
||||
.HasForeignKey(d => d.Service)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("orders_with_services_services_fk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Service>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.ServiceId).HasName("services_pk");
|
||||
|
||||
entity.ToTable("services", "Demo_balgodat");
|
||||
|
||||
entity.Property(e => e.ServiceId)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("service_id");
|
||||
entity.Property(e => e.ServiceCode)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("service_code");
|
||||
entity.Property(e => e.ServiceCostPerHour).HasColumnName("service_cost_per_hour");
|
||||
entity.Property(e => e.ServiceName)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("service_name");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
22
demo_blagodat/Program.cs
Normal file
22
demo_blagodat/Program.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using Avalonia;
|
||||
|
||||
namespace demo_blagodat
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||
// yet and stuff might break.
|
||||
[STAThread]
|
||||
public static void Main(string[] args) => BuildAvaloniaApp()
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
}
|
||||
}
|
32
demo_blagodat/Registration.axaml
Normal file
32
demo_blagodat/Registration.axaml
Normal file
@ -0,0 +1,32 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="550"
|
||||
x:Class="demo_blagodat.Registration"
|
||||
Title="Регистрация">
|
||||
<StackPanel Spacing="15" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
|
||||
<TextBlock Text="Введите Имя"></TextBlock>
|
||||
<TextBox Width="300" x:Name="LoginTextBox" ></TextBox>
|
||||
|
||||
<TextBlock Text="Введите пароль"/>
|
||||
<TextBox Width="300" x:Name="PasswordTextBox" ></TextBox>
|
||||
|
||||
<TextBlock Text="Введите почту"></TextBlock>
|
||||
<TextBox Width="300" x:Name="EmailTextBox" ></TextBox>
|
||||
|
||||
<TextBlock Text="Введите паспорт"></TextBlock>
|
||||
<TextBox Width="300" x:Name="PasportTextBox" ></TextBox>
|
||||
|
||||
<TextBlock Text="Введите адрес"></TextBlock>
|
||||
<TextBox Width="300" x:Name="AddressTextBox" ></TextBox>
|
||||
|
||||
<TextBlock Text="Введите день рождения"></TextBlock>
|
||||
<DatePicker x:Name="DateBirthday" />
|
||||
|
||||
<StackPanel Spacing="5" Orientation="Horizontal">
|
||||
<Button x:Name="RegisterClick" Click="RegisterClick_OnClick" Content="Зарегистрироваться"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Window>
|
44
demo_blagodat/Registration.axaml.cs
Normal file
44
demo_blagodat/Registration.axaml.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using demo_blagodat.Models;
|
||||
using System;
|
||||
|
||||
namespace demo_blagodat;
|
||||
|
||||
public partial class Registration : Window
|
||||
{
|
||||
private string _labelText;
|
||||
public Registration()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
//private void RegisterClick_OnClick(object? sender, RoutedEventArgs e)
|
||||
//{
|
||||
// if (string.IsNullOrEmpty(LoginTextBox.Text)) return;
|
||||
// if (string.IsNullOrEmpty(PasswordTextBox.Text)) return;
|
||||
// using var dbContext = new User11Context();
|
||||
// var user = new Client
|
||||
// {
|
||||
// ClientCode = ,
|
||||
// ClientName = LoginTextBox.Text,
|
||||
// ClientPassword = PasswordTextBox.Text,
|
||||
// ClientBirthday = DateBirthday.DatePicker,
|
||||
// ClientAddress = AddressTextBox.Text,
|
||||
// ClientEmail = ,
|
||||
// ClientPassword =
|
||||
// };
|
||||
// dbContext.Clients.Add(user);
|
||||
// if (dbContext.SaveChanges() > 0)
|
||||
// {
|
||||
// new MainWindow().Show();
|
||||
// Close();
|
||||
// }
|
||||
//}
|
||||
private void RegisterClick_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
new MainWindow().Show();
|
||||
Close();
|
||||
}
|
||||
}
|
18
demo_blagodat/app.manifest
Normal file
18
demo_blagodat/app.manifest
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- This manifest is used on Windows only.
|
||||
Don't remove it as it might cause problems with window transparency and embedded controls.
|
||||
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||
<assemblyIdentity version="1.0.0.0" name="demo_blagodat.Desktop"/>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- A list of the Windows versions that this application has been tested on
|
||||
and is designed to work with. Uncomment the appropriate elements
|
||||
and Windows will automatically select the most compatible environment. -->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Base.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Base.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Controls.ColorPicker.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Controls.ColorPicker.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Controls.DataGrid.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Controls.DataGrid.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Controls.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Controls.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.DesignerSupport.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.DesignerSupport.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Desktop.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Desktop.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Diagnostics.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Diagnostics.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Dialogs.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Dialogs.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Fonts.Inter.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Fonts.Inter.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.FreeDesktop.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.FreeDesktop.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Markup.Xaml.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Markup.Xaml.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Markup.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Markup.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Metal.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Metal.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.MicroCom.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.MicroCom.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Native.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Native.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.OpenGL.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.OpenGL.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Remote.Protocol.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Remote.Protocol.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Skia.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Skia.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Themes.Fluent.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Themes.Fluent.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Themes.Simple.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Themes.Simple.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Vulkan.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Vulkan.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Win32.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.Win32.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.X11.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.X11.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Avalonia.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/HarfBuzzSharp.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/HarfBuzzSharp.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Humanizer.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Humanizer.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/MicroCom.Runtime.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/MicroCom.Runtime.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.CodeAnalysis.CSharp.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.CodeAnalysis.CSharp.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.CodeAnalysis.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.CodeAnalysis.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Mono.TextTemplating.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Mono.TextTemplating.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Npgsql.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Npgsql.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/SkiaSharp.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/SkiaSharp.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/System.CodeDom.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/System.CodeDom.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.Convention.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.Convention.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.Hosting.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.Hosting.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.Runtime.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.Runtime.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.TypedParts.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/System.Composition.TypedParts.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/System.IO.Pipelines.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/System.IO.Pipelines.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/Tmds.DBus.Protocol.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/Tmds.DBus.Protocol.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1413
demo_blagodat/bin/Debug/net8.0/demo_blagodat.deps.json
Normal file
1413
demo_blagodat/bin/Debug/net8.0/demo_blagodat.deps.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
demo_blagodat/bin/Debug/net8.0/demo_blagodat.dll
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/demo_blagodat.dll
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/demo_blagodat.exe
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/demo_blagodat.exe
Normal file
Binary file not shown.
BIN
demo_blagodat/bin/Debug/net8.0/demo_blagodat.pdb
Normal file
BIN
demo_blagodat/bin/Debug/net8.0/demo_blagodat.pdb
Normal file
Binary file not shown.
@ -0,0 +1,14 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net8.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "8.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.NullabilityInfoContext.IsSupported": true,
|
||||
"System.Runtime.InteropServices.BuiltInComInterop.IsSupported": true,
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user