This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using SQLite; | |
| using SQLiteNetExtensions.Attributes; | |
| using System.Collections.Generic; | |
| namespace MauiApp1.Database | |
| { | |
| public class Student | |
| { | |
| [PrimaryKey, AutoIncrement] | |
| public int Id { get; set; } // Primary key for the student |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using SQLite; | |
| using SQLiteNetExtensions.Attributes; | |
| namespace MauiApp1.Database | |
| { | |
| public class ClassroomStudent | |
| { | |
| [PrimaryKey, AutoIncrement] | |
| public int Id { get; set; } // Primary key for the ClassroomStudent table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using SQLite; | |
| using SQLiteNetExtensions.Attributes; | |
| using System.Collections.Generic; | |
| namespace MauiApp1.Database | |
| { | |
| public class ClassRoomItem | |
| { | |
| [PrimaryKey, AutoIncrement] | |
| public int ID { get; set; } // Primary key for the classroom item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using SQLite; | |
| using SQLiteNetExtensionsAsync.Extensions; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| namespace MauiApp1.Database | |
| { | |
| public class ClassRoomDatabase | |
| { | |
| readonly SQLiteAsyncConnection _database; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.ObjectModel; | |
| using System.Threading.Tasks; | |
| using System.Windows.Input; | |
| using MauiApp1.Database; | |
| using Microsoft.Maui.Controls; | |
| namespace MauiApp1.ViewModel | |
| { | |
| public class ClassRoomViewModel | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using MauiApp1.Database; | |
| namespace MauiApp1; | |
| public partial class App : Application | |
| { | |
| static ClassRoomDatabase database; | |
| public App() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.ObjectModel; | |
| using MauiApp1.ViewModel; | |
| namespace MauiApp1; | |
| public partial class MainPage : ContentPage | |
| { | |
| ClassRoomViewModel viewModel; | |
| public MainPage() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8" ?> | |
| <ContentPage | |
| x:Class="MauiApp1.MainPage" | |
| xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"> | |
| <ScrollView> | |
| <StackLayout Padding="10"> | |
| <Button Command="{Binding AddItemCommand}" Text="Add Classroom" /> | |
| <CollectionView | |
| x:Name="MyCollView" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using SQLite; | |
| using SQLiteNetExtensionsAsync.Extensions; | |
| namespace MauiApp1.Database | |
| { | |
| public class ClassRoomDatabase | |
| { | |
| readonly SQLiteAsyncConnection _database; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using SQLite; | |
| using SQLiteNetExtensions.Attributes; | |
| namespace MauiApp1.Database; | |
| public class ClassRoomItem | |
| { | |
| [PrimaryKey, AutoIncrement] | |
| public int ID { get; set; } |
NewerOlder