- Added DatabaseService to handle database operations for messages and support requests. - Created IDatabaseService interface to define the contract for database operations. - Developed ViewModels for Dashboard, Messages, and Support pages to manage data and commands. - Implemented XAML views for Dashboard, Messages, and Support, including data binding and UI elements. - Created SQL script for setting up the database schema and inserting test data.
24 lines
773 B
C#
24 lines
773 B
C#
using TravelMateAdmin.Models;
|
|
|
|
namespace TravelMateAdmin.Services;
|
|
|
|
public interface IDatabaseService
|
|
{
|
|
// Messages
|
|
Task<List<Message>> GetAllMessagesAsync();
|
|
Task<List<Message>> GetMessagesFilteredAsync(bool? isDone);
|
|
Task<int> GetMessagesPendingCountAsync();
|
|
Task<int> GetMessagesDoneCountAsync();
|
|
Task<bool> UpdateMessageStatusAsync(int id, bool done);
|
|
|
|
// Support Requests
|
|
Task<List<SupportRequest>> GetAllSupportRequestsAsync();
|
|
Task<List<SupportRequest>> GetSupportRequestsFilteredAsync(bool? isDone);
|
|
Task<int> GetSupportRequestsPendingCountAsync();
|
|
Task<int> GetSupportRequestsDoneCountAsync();
|
|
Task<bool> UpdateSupportRequestStatusAsync(int id, bool done);
|
|
|
|
// Connection
|
|
Task<bool> TestConnectionAsync();
|
|
}
|