Pravki
This commit is contained in:
parent
f7a8efb8de
commit
012e4d8404
AdminWindow.axamlAdminWindow.axaml.cs
Hardik/Conect
MainWindow.axaml.csSellerWindow.axamlSellerWindow.axaml.csStarshiyWindow.axamlStarshiyWindow.axaml.csbin/Debug/net8.0
obj/Debug/net8.0
@ -5,5 +5,10 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Demka_Snova_1.AdminWindow"
|
x:Class="Demka_Snova_1.AdminWindow"
|
||||||
Title="AdminWindow">
|
Title="AdminWindow">
|
||||||
Welcome to Avalonia!
|
<StackPanel>
|
||||||
|
<Button Content="сформировать заказ" Click="FormatOtchot_Click"/>
|
||||||
|
<Button Content="сформировать заказ" Click="KontrolUserov_Click"/>
|
||||||
|
<Button Content="сформировать заказ" Click="KontrolMateriala_Click"/>
|
||||||
|
<Button Content="Выход" Click="Exitka"/>
|
||||||
|
</StackPanel>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Demka_Snova_1;
|
namespace Demka_Snova_1;
|
||||||
@ -10,4 +11,24 @@ public partial class AdminWindow : Window
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FormatOtchot_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
private void KontrolUserov_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
private void KontrolMateriala_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Exitka(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var login = new MainWindow();
|
||||||
|
login.Show();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
}
|
}
|
@ -6,12 +6,13 @@ public class AppDbContext : DbContext
|
|||||||
{
|
{
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder oB)
|
protected override void OnConfiguring(DbContextOptionsBuilder oB)
|
||||||
{
|
{
|
||||||
oB.UseSqlServer("Host=45.67.56.214;Port=5421;Username=user16;Password=dZ28IVE5;Database=user16");
|
oB.UseSqlServer("Hoi");
|
||||||
}
|
}
|
||||||
public DbSet<SotrudnikDao> sotrudnik { get; set; }
|
public DbSet<SotrudnikDao> sotrudnik { get; set; }
|
||||||
public DbSet<uslugiDao> uslugi { get; set; }
|
public DbSet<uslugiDao> uslugi { get; set; }
|
||||||
public DbSet<ordersDao> orders { get; set; }
|
public DbSet<ordersDao> orders { get; set; }
|
||||||
public DbSet<KlientDao> klient { get; set; }
|
public DbSet<KlientDao> klient { get; set; }
|
||||||
|
public DbSet<historyDao> history { get; set; }
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder mb)
|
protected override void OnModelCreating(ModelBuilder mb)
|
||||||
{
|
{
|
||||||
@ -24,6 +25,8 @@ public class AppDbContext : DbContext
|
|||||||
mb.Entity<uslugiDao>().HasKey(uslugi => uslugi.ID);
|
mb.Entity<uslugiDao>().HasKey(uslugi => uslugi.ID);
|
||||||
|
|
||||||
mb.Entity<SotrudnikDao>().HasKey(sotrudnik => sotrudnik.ID);
|
mb.Entity<SotrudnikDao>().HasKey(sotrudnik => sotrudnik.ID);
|
||||||
|
|
||||||
|
mb.Entity<historyDao>().HasKey(history => history.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
11
Hardik/Conect/Dao/historyDao.cs
Normal file
11
Hardik/Conect/Dao/historyDao.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Demka_Snova_1.Hardik.Conect.Dao;
|
||||||
|
|
||||||
|
public class historyDao
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
public string user { get; set; }
|
||||||
|
public DateTime Vhod { get; set; }
|
||||||
|
public string status { get; set; }
|
||||||
|
}
|
@ -43,7 +43,7 @@ public partial class MainWindow : Window
|
|||||||
nextWindow = new AdminWindow();
|
nextWindow = new AdminWindow();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ShowErrorDialog("Неизвестная роль пользователя");
|
ShowError("Неизвестная роль пользователя");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,10 +52,10 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowErrorDialog("Неверный логин или пароль");
|
ShowError("Неверный логин или пароль");
|
||||||
}
|
}
|
||||||
|
|
||||||
async void ShowErrorDialog(string mes)
|
async void ShowError(string mes)
|
||||||
{
|
{
|
||||||
var dialog = new Window
|
var dialog = new Window
|
||||||
{
|
{
|
||||||
|
@ -5,5 +5,8 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Demka_Snova_1.SellerWindow"
|
x:Class="Demka_Snova_1.SellerWindow"
|
||||||
Title="SellerWindow">
|
Title="SellerWindow">
|
||||||
Welcome to Avalonia!
|
<StackPanel>
|
||||||
|
<Button Content="сформировать заказ" Click="FormatZakaz_Click"/>
|
||||||
|
<Button Content="Выход" Click="Exitka"/>
|
||||||
|
</StackPanel>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Demka_Snova_1;
|
namespace Demka_Snova_1;
|
||||||
@ -10,4 +11,26 @@ public partial class SellerWindow : Window
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void FormatZakaz()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FormatZakaz_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
FormatZakaz();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Exitka(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var login = new MainWindow();
|
||||||
|
login.Show();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
@ -5,4 +5,9 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Demka_Snova_1.StarshiyWindow"
|
x:Class="Demka_Snova_1.StarshiyWindow"
|
||||||
Title="StarshiyWindow">
|
Title="StarshiyWindow">
|
||||||
|
<StackPanel>
|
||||||
|
<Button Content="сформировать заказ" Click="FormatZakaz_Click"/>
|
||||||
|
<Button Content="принять товар" Click="PrinatZakaz_Click"/>
|
||||||
|
<Button Content="Выход" Click="Exitka"/>
|
||||||
|
</StackPanel>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Demka_Snova_1;
|
namespace Demka_Snova_1;
|
||||||
@ -10,4 +11,20 @@ public partial class StarshiyWindow : Window
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FormatZakaz_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
private void PrinatZakaz_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Exitka(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var login = new MainWindow();
|
||||||
|
login.Show();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Demka_Snova_1")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("Demka_Snova_1")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b6d029f0b54073e0ebf25932bb61b695c248c8a2")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f7a8efb8de9b1bbb1286e03aa3fc974d1e7a79cd")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("Demka_Snova_1")]
|
[assembly: System.Reflection.AssemblyProductAttribute("Demka_Snova_1")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("Demka_Snova_1")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("Demka_Snova_1")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
@ -1 +1 @@
|
|||||||
085bcc2aa465297637c4e04dda495e07ced23a12a13e81e25b3c1d74901d7cc6
|
77a089df3dd00104ed681a003e3e757dc742efe4308277aed4f429dc79345beb
|
||||||
|
@ -1 +1 @@
|
|||||||
d49fb66004877864e6b4198de99072120e9cbdddc2a2bce613f219e40123f053
|
f538b6e5acebbc916e8e5ae898e9d4340b277ee0645dce6df8cfc3002ecdda40
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user