示例#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);
        }