Dodaj pliki projektów.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="DatabaseConnection.View.AuthorsPage"
|
||||
xmlns:vm="clr-namespace:DatabaseConnection.ViewModel"
|
||||
Title="Autorzy książek">
|
||||
<VerticalStackLayout>
|
||||
<Button Command="{Binding LoadAuthorsCommand}" Text="Załaduj" />
|
||||
<CollectionView ItemsSource="{Binding Authors}">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid ColumnDefinitions="*,*,*,*">
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="0" Padding="4">
|
||||
<Label Text="{Binding Id}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="1" Padding="4">
|
||||
<Label Text="{Binding Name}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="2" Padding="4">
|
||||
<Label Text="{Binding Surname}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="3" Padding="4">
|
||||
<Label Text="{Binding Birthdate}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
||||
@@ -0,0 +1,13 @@
|
||||
using DatabaseConnection.ViewModel;
|
||||
|
||||
namespace DatabaseConnection.View;
|
||||
|
||||
public partial class AuthorsPage : ContentPage
|
||||
{
|
||||
public AuthorsPage(AuthorsViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BindingContext = viewModel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="DatabaseConnection.View.BooksPage"
|
||||
Title="Lista książek">
|
||||
<VerticalStackLayout>
|
||||
<Button Command="{Binding LoadBooksCommand}" Text="Załaduj" />
|
||||
<CollectionView ItemsSource="{Binding Books}">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid ColumnDefinitions="*,*,*,*,*,*,*,*">
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="0" Padding="4">
|
||||
<Label Text="{Binding Id}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="1" Padding="4">
|
||||
<Label Text="{Binding Title}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="2" Padding="4">
|
||||
<Label Text="{Binding Author}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="3" Padding="4">
|
||||
<Label Text="{Binding Category}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="4" Padding="4">
|
||||
<Label Text="{Binding Publisher}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="5" Padding="4">
|
||||
<Label Text="{Binding PublishDate}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="6" Padding="4">
|
||||
<Label Text="{Binding Price}" />
|
||||
</Border>
|
||||
<Border StrokeThickness="1" Stroke="White" Grid.Column="7" Padding="4">
|
||||
<Label Text="{Binding Amount}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
||||
@@ -0,0 +1,13 @@
|
||||
using DatabaseConnection.ViewModel;
|
||||
|
||||
namespace DatabaseConnection.View;
|
||||
|
||||
public partial class BooksPage : ContentPage
|
||||
{
|
||||
public BooksPage(BookViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BindingContext = viewModel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="DatabaseConnection.View.ReadersPage"
|
||||
Title="Czytelnicy">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
Text="Welcome to .NET MAUI!"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center" />
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace DatabaseConnection.View;
|
||||
|
||||
public partial class ReadersPage : ContentPage
|
||||
{
|
||||
public ReadersPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="DatabaseConnection.View.WorkersPage"
|
||||
Title="Pracownicy">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
Text="Welcome to .NET MAUI!"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center" />
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace DatabaseConnection.View;
|
||||
|
||||
public partial class WorkersPage : ContentPage
|
||||
{
|
||||
public WorkersPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user