2024-10-18 14:03:25 +00:00
|
|
|
|
using Demo.Domain.UseCase;
|
|
|
|
|
using Demo.domain.Models;
|
|
|
|
|
using System;
|
2024-10-18 10:20:54 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2024-10-18 14:03:25 +00:00
|
|
|
|
using System.Xml.Linq;
|
|
|
|
|
using System.Text.RegularExpressions;
|
2024-10-18 10:20:54 +00:00
|
|
|
|
|
|
|
|
|
namespace Demo.UI
|
|
|
|
|
{
|
2024-10-18 14:03:25 +00:00
|
|
|
|
internal class GroupConsoleUI
|
2024-10-18 10:20:54 +00:00
|
|
|
|
{
|
2024-10-18 14:03:25 +00:00
|
|
|
|
GroupUseCase _groupUseCase;
|
|
|
|
|
|
|
|
|
|
public GroupConsoleUI(GroupUseCase groupUseCase)
|
|
|
|
|
{
|
|
|
|
|
_groupUseCase = groupUseCase;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void AllGroups()
|
|
|
|
|
{
|
|
|
|
|
foreach (var Group in _groupUseCase.GetAllGroups())
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"{Group.Id}\t{Group.Name}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CreateGroup(string NameGroup)
|
|
|
|
|
{
|
|
|
|
|
_groupUseCase.AddGroup(NameGroup);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateNameGroup(int id, string name)
|
|
|
|
|
{
|
|
|
|
|
_groupUseCase.UpdateGroup(id, name);
|
|
|
|
|
}
|
2024-10-18 10:20:54 +00:00
|
|
|
|
}
|
|
|
|
|
}
|