码农 před 5 roky
rodič
revize
0f90d1b587
1 změnil soubory, kde provedl 11 přidání a 4 odebrání
  1. 11 4
      MyTrelloWeb/App/AppServices/KanbanService.cs

+ 11 - 4
MyTrelloWeb/App/AppServices/KanbanService.cs

@@ -106,8 +106,7 @@ namespace MyTrelloWeb.App.AppServices
             using (var repo = GetRepository())
             {
                 all = repo.Query(p =>
-                    p.Id == input.Id && p.Type == KanbanEntryType.List
-                    || p.ListId == input.Id
+                    p.ListId == input.Id
                 ).ToArray();
             }
 
@@ -144,6 +143,7 @@ namespace MyTrelloWeb.App.AppServices
                 Type = KanbanEntryType.List,
                 Name = input.Name,
             };
+            ne.ListId = ne.Id;
 
             using (var repo = GetRepository())
             {
@@ -190,6 +190,7 @@ namespace MyTrelloWeb.App.AppServices
 
         void IKanbanService.ListMove(ListMoveInput input)
         {
+            //TODO: Re Sort
             throw new NotImplementedException();
         }
 
@@ -208,14 +209,14 @@ namespace MyTrelloWeb.App.AppServices
                     .Query(p => p.Type == KanbanEntryType.List && p.Id == input.ParentId)
                     .FirstOrThrowNotFound("列表");
 
-                //TODO:  KanbanId
-
                 ne = new KanbanEntity
                 {
+                    //TODO:  KanbanId
                     Type = KanbanEntryType.Card,
                     ListId = input.ParentId,
                     Name = input.Name,
                 };
+                ne.CardId = ne.Id;
 
                 var existedCount = repo.Query(p => p.Type == KanbanEntryType.Card && p.ListId == input.ParentId).Count();
                 ne.Sort = existedCount + 1;
@@ -258,11 +259,13 @@ namespace MyTrelloWeb.App.AppServices
 
         void IKanbanService.CardMove(MoveInput input)
         {
+            //TODO: Re Sort
             throw new NotImplementedException();
         }
 
         void IKanbanService.CardDelete(DeleteByIdInput input)
         {
+            //TODO: Re Sort
             throw new NotImplementedException();
         }
 
@@ -273,6 +276,7 @@ namespace MyTrelloWeb.App.AppServices
 
         void IKanbanService.ManifestMove(MoveInput input)
         {
+            //TODO: Re Sort
             throw new NotImplementedException();
         }
 
@@ -283,6 +287,7 @@ namespace MyTrelloWeb.App.AppServices
 
         void IKanbanService.ManifestDelete(DeleteByIdInput input)
         {
+            //TODO: Re Sort
             throw new NotImplementedException();
         }
 
@@ -293,6 +298,7 @@ namespace MyTrelloWeb.App.AppServices
 
         void IKanbanService.ItemMove(MoveInput input)
         {
+            //TODO: Re Sort
             throw new NotImplementedException();
         }
 
@@ -303,6 +309,7 @@ namespace MyTrelloWeb.App.AppServices
 
         void IKanbanService.ItemDelete(DeleteByIdInput input)
         {
+            //TODO: Re Sort
             throw new NotImplementedException();
         }