helper0917 1.0.0
dotnet add package helper0917 --version 1.0.0
NuGet\Install-Package helper0917 -Version 1.0.0
<PackageReference Include="helper0917" Version="1.0.0" />
paket add helper0917 --version 1.0.0
#r "nuget: helper0917, 1.0.0"
// Install helper0917 as a Cake Addin
#addin nuget:?package=helper0917&version=1.0.0
// Install helper0917 as a Cake Tool
#tool nuget:?package=helper0917&version=1.0.0
Title="Login Window" Height="300" Width="400">
<Grid>
<StackPanel Margin="20">
<TextBlock Text="Логин:"/>
<TextBox x:Name="txtUsername"/>
<TextBlock Text="Пароль:"/>
<PasswordBox x:Name="txtPassword"/>
<Button Content="Войти" Click="Login_Click"/>
</StackPanel>
</Grid>
private void Login_Click(object sender, RoutedEventArgs e)
{
string username = txtUsername.Text;
string password = txtPassword.Password;
using (var context = new YourDbContext()) // Замените YourDbContext на ваш контекст базы данных
{
// Проверяем, существует ли пользователь с указанным логином и паролем
bool isValidUser = context.Users.Any(u => u.Username == username && u.Password == password);
if (isValidUser)
{
MessageBox.Show("Вход выполнен успешно!");
// Здесь можно открыть новое окно или выполнить другие действия после успешной авторизации
}
else
{
MessageBox.Show("Неверный логин или пароль.");
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 70 | 5/26/2024 |