CeramicProjectTool/ViewModel/PermissonConfigViewModel.cs

34 lines
917 B
C#

using CeramicProjectTool.Model;
using CeramicProjectTool.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CeramicProjectTool.ViewModel
{
public class PermissonConfigViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
public void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public Task<List<PermissonModel>> GetPermissons()
{
var result = DBHelper.GetPermissons();
return result;
}
public Task<List<PermissonModel>> GetPermissons(string searchText)
{
var result = DBHelper.GetPermissonsByModule(searchText);
return result;
}
}
}