|
@@ -1,124 +1,191 @@
|
|
|
-using MyTrelloWeb.App.AppServices.Common;
|
|
|
+using System;
|
|
|
+using System.Linq;
|
|
|
+using System.Web.UI.WebControls;
|
|
|
+using MyTrelloWeb.App.AppServices.Common;
|
|
|
using MyTrelloWeb.App.Dto;
|
|
|
+using MyTrelloWeb.App.Entity;
|
|
|
|
|
|
namespace MyTrelloWeb.App.AppServices
|
|
|
{
|
|
|
public interface IKanbanService
|
|
|
{
|
|
|
// kanban level
|
|
|
- KanbanSummaryOutput GetKanbanSummary();
|
|
|
+
|
|
|
+ ListSummaryOutput[] KanbanSummary();
|
|
|
|
|
|
// list level
|
|
|
|
|
|
- void ListCreate(CreateWithNameInput input);
|
|
|
+ ListSummaryOutput ListSummary(QueryByIdInput input);
|
|
|
+
|
|
|
+ KanbanEntryCreateOutput ListCreate(CreateWithTitleInput input);
|
|
|
|
|
|
- void ListRename(ReameInput input);
|
|
|
+ void ListRename(ContentInput input);
|
|
|
|
|
|
void ListDelete(DeleteByIdInput input);
|
|
|
|
|
|
- //TODO: get list summary
|
|
|
+ void ListMove(ListMoveInput input);
|
|
|
|
|
|
// card level
|
|
|
|
|
|
- void CardCreate(CreateWithNameAndParentIdInput input);
|
|
|
+ CardDetailOutput CardDetail(QueryByIdInput input);
|
|
|
+
|
|
|
+ KanbanEntryCreateOutput CardCreate(CreateWithTitleAndParentIdInput input);
|
|
|
|
|
|
- void CardRename(ReameInput input);
|
|
|
+ void CardRename(ContentInput input);
|
|
|
+
|
|
|
+ void CardEditSummary(ContentInput input);
|
|
|
|
|
|
void CardMove(MoveInput input);
|
|
|
|
|
|
void CardDelete(DeleteByIdInput input);
|
|
|
|
|
|
- //TODO: edit summary
|
|
|
- //TODO: get Card detail
|
|
|
-
|
|
|
// manifest level
|
|
|
|
|
|
- void ManifestCreate(CreateWithNameAndParentIdInput input);
|
|
|
+ KanbanEntryCreateOutput ManifestCreate(CreateWithTitleAndParentIdInput input);
|
|
|
|
|
|
void ManifestMove(MoveInput input);
|
|
|
|
|
|
- void ManifestRename(ReameInput input);
|
|
|
+ void ManifestRename(ContentInput input);
|
|
|
|
|
|
void ManifestDelete(DeleteByIdInput input);
|
|
|
|
|
|
// item level
|
|
|
|
|
|
- void ItemCreate(CreateWithNameAndParentIdInput input);
|
|
|
+ KanbanEntryCreateOutput ItemCreate(CreateWithTitleAndParentIdInput input);
|
|
|
|
|
|
void ItemMove(MoveInput input);
|
|
|
|
|
|
- void ItemRename(ReameInput input);
|
|
|
+ void ItemRename(ContentInput input);
|
|
|
|
|
|
void ItemDelete(DeleteByIdInput input);
|
|
|
|
|
|
- //TODO: item check
|
|
|
+ void ItemCheck(CheckInput input);
|
|
|
}
|
|
|
|
|
|
- internal class KanbanService : AppServiceBase, IKanbanService
|
|
|
+ internal class KanbanService : AppServiceBase<KanbanEntity>, IKanbanService
|
|
|
{
|
|
|
- public KanbanSummaryOutput GetKanbanSummary()
|
|
|
+ ListSummaryOutput[] IKanbanService.KanbanSummary()
|
|
|
{
|
|
|
- return new KanbanSummaryOutput();
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.ListCreate(CreateWithNameInput input)
|
|
|
+ ListSummaryOutput IKanbanService.ListSummary(QueryByIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.ListRename(ReameInput input)
|
|
|
+ KanbanEntryCreateOutput IKanbanService.ListCreate(CreateWithTitleInput input)
|
|
|
{
|
|
|
+ var newEntity = new KanbanEntity
|
|
|
+ {
|
|
|
+ //TODO: Kanban ID
|
|
|
+ Type = KanbanEntryType.List,
|
|
|
+ Title = input.Title,
|
|
|
+ };
|
|
|
+
|
|
|
+ using (var repo = GetRepository())
|
|
|
+ {
|
|
|
+ var existedCount = repo.Query(p => p.Type == KanbanEntryType.List).Count();
|
|
|
+ newEntity.Sort = existedCount + 1;
|
|
|
+ repo.Add(newEntity);
|
|
|
+ repo.SaveChanges();
|
|
|
+ }
|
|
|
+
|
|
|
+ return new KanbanEntryCreateOutput
|
|
|
+ {
|
|
|
+ Id = newEntity.Id,
|
|
|
+ Sort = newEntity.Sort
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ void IKanbanService.ListRename(ContentInput input)
|
|
|
+ {
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
void IKanbanService.ListDelete(DeleteByIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
+ }
|
|
|
+
|
|
|
+ void IKanbanService.ListMove(ListMoveInput input)
|
|
|
+ {
|
|
|
+ throw new NotImplementedException();
|
|
|
+ }
|
|
|
+
|
|
|
+ CardDetailOutput IKanbanService.CardDetail(QueryByIdInput input)
|
|
|
+ {
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.CardCreate(CreateWithNameAndParentIdInput input)
|
|
|
+ KanbanEntryCreateOutput IKanbanService.CardCreate(CreateWithTitleAndParentIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.CardRename(ReameInput input)
|
|
|
+ void IKanbanService.CardRename(ContentInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
+ }
|
|
|
+
|
|
|
+ void IKanbanService.CardEditSummary(ContentInput input)
|
|
|
+ {
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
void IKanbanService.CardMove(MoveInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
void IKanbanService.CardDelete(DeleteByIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.ManifestCreate(CreateWithNameAndParentIdInput input)
|
|
|
+ KanbanEntryCreateOutput IKanbanService.ManifestCreate(CreateWithTitleAndParentIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
void IKanbanService.ManifestMove(MoveInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.ManifestRename(ReameInput input)
|
|
|
+ void IKanbanService.ManifestRename(ContentInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
void IKanbanService.ManifestDelete(DeleteByIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.ItemCreate(CreateWithNameAndParentIdInput input)
|
|
|
+ KanbanEntryCreateOutput IKanbanService.ItemCreate(CreateWithTitleAndParentIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
void IKanbanService.ItemMove(MoveInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
- void IKanbanService.ItemRename(ReameInput input)
|
|
|
+ void IKanbanService.ItemRename(ContentInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
|
|
|
void IKanbanService.ItemDelete(DeleteByIdInput input)
|
|
|
{
|
|
|
+ throw new NotImplementedException();
|
|
|
+ }
|
|
|
+
|
|
|
+ void IKanbanService.ItemCheck(CheckInput input)
|
|
|
+ {
|
|
|
+ throw new NotImplementedException();
|
|
|
}
|
|
|
}
|
|
|
}
|