예제 #1
0
파일: Boards.cs 프로젝트: psvdjack/Kandu
 public List <Models.Board> GetList(int userId)
 {
     return(Sql.Populate <Models.Board>(
                "Boards_GetList",
                new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                ));
 }
예제 #2
0
파일: Boards.cs 프로젝트: psvdjack/Kandu
 public List <int> GetBoardsForMember(int userId)
 {
     return(Sql.Populate <int>(
                "BoardMember_GetBoards",
                new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                ));
 }
예제 #3
0
 public List <Models.List> GetListsForBoard(int boardId)
 {
     return(Sql.Populate <Models.List>(
                "Lists_GetList",
                new Dictionary <string, object>()
     {
         { "boardId", boardId }
     }
                ));
 }
예제 #4
0
파일: Cards.cs 프로젝트: psvdjack/Kandu
 public List <Models.Card> GetList(int boardId, int listId = 0, int start = 1, int length = 2000)
 {
     return(Sql.Populate <Models.Card>(
                "Card_GetList",
                new Dictionary <string, object>()
     {
         { "boardId", boardId },
         { "listId", listId },
         { "start", start },
         { "length", length }
     }
                ));
 }
예제 #5
0
 public List <Models.Team> GetList(int ownerId = 0, int start = 1, int length = 20, string search = "", SortList orderBy = SortList.name)
 {
     return(Sql.Populate <Models.Team>(
                "Teams_GetList",
                new Dictionary <string, object>()
     {
         { "ownerId", ownerId },
         { "start", start },
         { "length", length },
         { "search", search },
         { "orderby", (int)orderBy }
     }
                ));
 }
예제 #6
0
파일: Users.cs 프로젝트: psvdjack/Kandu
        public Models.User AuthenticateUser(string token)
        {
            var list = Sql.Populate <Models.User>("User_AuthenticateByToken",
                                                  new Dictionary <string, object>()
            {
                { "token", token }
            }
                                                  );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #7
0
파일: Users.cs 프로젝트: psvdjack/Kandu
        public Models.User GetInfo(int userId)
        {
            var list = Sql.Populate <Models.User>("User_GetInfo",
                                                  new Dictionary <string, object>()
            {
                { "userId", userId }
            }
                                                  );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #8
0
파일: Boards.cs 프로젝트: psvdjack/Kandu
        public Models.Board GetInfo(int boardId)
        {
            var list = Sql.Populate <Models.Board>(
                "Board_GetInfo",
                new Dictionary <string, object>()
            {
                { "boardId", boardId }
            }
                );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #9
0
        public Models.List GetDetails(int listId)
        {
            var lists = Sql.Populate <Models.List>(
                "Lists_GetDetails",
                new Dictionary <string, object>()
            {
                { "listId", listId }
            }
                );

            if (lists.Count > 0)
            {
                return(lists[0]);
            }
            return(null);
        }
예제 #10
0
파일: Users.cs 프로젝트: psvdjack/Kandu
        public Models.User AuthenticateUser(string email, string password)
        {
            var list = Sql.Populate <Models.User>("User_Authenticate",
                                                  new Dictionary <string, object>()
            {
                { "email", email },
                { "password", password }
            }
                                                  );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #11
0
        public Models.Team GetTeam(int teamId, int ownerId)
        {
            var list = Sql.Populate <Models.Team>(
                "Team_Get",
                new Dictionary <string, object>()
            {
                { "teamId", teamId },
                { "ownerId", ownerId }
            }
                );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #12
0
파일: Cards.cs 프로젝트: psvdjack/Kandu
        public Models.Card GetDetails(int boardId, int cardId)
        {
            var list = Sql.Populate <Models.Card>(
                "Card_GetDetails",
                new Dictionary <string, object>()
            {
                { "boardId", boardId },
                { "cardId", cardId }
            }
                );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }