예제 #1
0
 public static List <Models.Card> GetList(int boardId, int listId = 0, int start = 1, int length = 2000)
 {
     return(Sql.Populate <Models.Card>(
                "Card_GetList",
                new { boardId, listId, start, length }
                ));
 }
예제 #2
0
파일: Teams.cs 프로젝트: rdelangelhmx/Kandu
 public static 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 { ownerId, start, length, search, orderby = (int)orderBy }
                ));
 }
예제 #3
0
 public static List <Models.Book> GetList(int userId, int sort = 0)
 {
     return(Sql.Populate <Models.Book>(
                "Books_GetList",
                new { userId, sort }
                ));
 }
예제 #4
0
파일: Cards.cs 프로젝트: Datasilk/Kandu
 public static List <Models.Card> GetList(int boardId, int listId = 0, int start = 1, int length = 2000, bool archivedOnly = false)
 {
     return(Sql.Populate <Models.Card>(
                "Cards_GetList",
                new { boardId, listId, start, length, archivedOnly }
                ));
 }
예제 #5
0
파일: Cards.cs 프로젝트: Datasilk/Kandu
 public static List <Models.CardBoard> AssignedToMember(int userId, int orgId = 0, int start = 1, int length = 20, bool archivedOnly = false)
 {
     return(Sql.Populate <Models.CardBoard>(
                "Cards_AssignedToMember",
                new { userId, orgId, start, length, archivedOnly }
                ));
 }
예제 #6
0
 public static List <Models.Entry> GetList(int userId, int bookId, int start = 1, int length = 50, int sort = 0)
 {
     return(Sql.Populate <Models.Entry>(
                "Entries_GetList",
                new { userId, bookId, start, length, sort }
                ));
 }
예제 #7
0
        public static Models.Organization GetInfo(int orgId)
        {
            var list = Sql.Populate <Models.Organization>("Organization_GetInfo", new { orgId });

            if (list != null && list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #8
0
파일: Lists.cs 프로젝트: okamyuji/Kandu
 public static List <Models.List> GetListsForBoard(int boardId)
 {
     return(Sql.Populate <Models.List>(
                "Lists_GetList",
                new Dictionary <string, object>()
     {
         { "boardId", boardId }
     }
                ));
 }
예제 #9
0
 public static List <Models.TeamMemberInfo> GetList(int teamId)
 {
     return(Sql.Populate <Models.TeamMemberInfo>(
                "TeamMembers_GetList",
                new Dictionary <string, object>()
     {
         { "teamId", teamId }
     }
                ));
 }
예제 #10
0
 public static List <Models.AddressFieldValues> GetValues(int addressId)
 {
     return(Sql.Populate <Models.AddressFieldValues>(
                "AddressFields_GetValues",
                new Dictionary <string, object>()
     {
         { "addressId", addressId }
     }
                ));
 }
예제 #11
0
 public static List <Models.Subscription> GetHistory(int userId)
 {
     return(Sql.Populate <Models.Subscription>(
                "Subscriptions_GetHistory",
                new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                ));
 }
예제 #12
0
 public static List <int> GetBoardsForMember(int userId)
 {
     return(Sql.Populate <int>(
                "BoardMember_GetBoards",
                new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                ));
 }
예제 #13
0
 public static List <Models.InvoiceItem> GetList(int invoiceId)
 {
     return(Sql.Populate <Models.InvoiceItem>(
                "InvoiceItems_GetList",
                new Dictionary <string, object>()
     {
         { "invoiceId", invoiceId }
     }
                ));
 }
예제 #14
0
 public static List <Models.Team> GetByMember(int userId)
 {
     return(Sql.Populate <Models.Team>(
                "Teams_GetByMember",
                new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                ));
 }
예제 #15
0
 public static List <Models.CampaignLabel> GetLabels(int teamId)
 {
     return(Sql.Populate <Models.CampaignLabel>(
                "Campaign_GetLabels",
                new Dictionary <string, object>()
     {
         { "teamId", teamId }
     }
                ));
 }
예제 #16
0
        public static Models.User AuthenticateUser(string token)
        {
            var list = Sql.Populate <Models.User>("User_AuthenticateByToken", new { token });

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #17
0
        public static List <Models.EmailClient> GetList()
        {
            var list = Sql.Populate <Models.EmailClient>("EmailClients_GetList");

            foreach (var item in list)
            {
                item.config = JsonSerializer.Deserialize <Dictionary <string, string> >(item.config_json);
            }
            return(list);
        }
예제 #18
0
 public static List <Models.Board> GetList(int userId)
 {
     return(Sql.Populate <Models.Board>(
                "Boards_GetList",
                new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                ));
 }
예제 #19
0
        public static Models.EmailClientAction GetInfo(string action)
        {
            var item = Sql.Populate <Models.EmailClientAction>("EmailAction_GetInfo", new { action }).FirstOrDefault();

            if (item != null)
            {
                item.config = JsonSerializer.Deserialize <Dictionary <string, string> >(item.config_json);
                return(item);
            }
            return(null);
        }
예제 #20
0
 public static List <Models.SubscriptionInfo> GetSubscriptions(int userId, bool status = true)
 {
     return(Sql.Populate <Models.SubscriptionInfo>(
                "Subscriptions_GetInfo",
                new Dictionary <string, object>()
     {
         { "userId", userId },
         { "status", status }
     }
                ));
 }
예제 #21
0
        public static Models.EmailClient GetConfig(string clientId)
        {
            var list = Sql.Populate <Models.EmailClient>("EmailClient_GetConfig", new { clientId });

            foreach (var item in list)
            {
                item.config = JsonSerializer.Deserialize <Dictionary <string, string> >(item.config_json);
                return(item);
            }
            return(null);
        }
예제 #22
0
        public static Models.User AuthenticateUser(string email, string password)
        {
            var list = Sql.Populate <Models.User>("User_Authenticate",
                                                  new { email, password }
                                                  );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #23
0
        public static Models.Board GetInfo(int boardId)
        {
            var list = Sql.Populate <Models.Board>(
                "Board_GetInfo", new { boardId }
                );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #24
0
파일: Lists.cs 프로젝트: Datasilk/Kandu
        public static Models.List GetDetails(int listId)
        {
            var lists = Sql.Populate <Models.List>(
                "Lists_GetDetails", new { listId }
                );

            if (lists.Count > 0)
            {
                return(lists[0]);
            }
            return(null);
        }
예제 #25
0
        public static Models.User GetInfo(int userId)
        {
            var list = Sql.Populate <Models.User>("User_GetInfo",
                                                  new { userId }
                                                  );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #26
0
 public static List <Models.Invoice> GetList(int userId, int page = 1, int length = 12)
 {
     return(Sql.Populate <Models.Invoice>(
                "Invoices_GetList",
                new Dictionary <string, object>()
     {
         { "userId", userId },
         { "page", page },
         { "length", length }
     }
                ));
 }
예제 #27
0
        public static Models.Entry GetFirst(int userId, int bookId, int sort = 0)
        {
            var list = Sql.Populate <Models.Entry>(
                "Entries_GetFirst",
                new { userId, bookId, sort }
                );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #28
0
파일: Teams.cs 프로젝트: Datasilk/Kandu
        public static Models.Team GetTeam(int teamId)
        {
            var list = Sql.Populate <Models.Team>(
                "Team_Get",
                new { teamId }
                );

            if (list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
예제 #29
0
 public static List <Models.Campaign> GetList(int teamId, int page = 1, int length = 20, string search = "")
 {
     return(Sql.Populate <Models.Campaign>(
                "Campaigns_GetList",
                new Dictionary <string, object>()
     {
         { "teamId", teamId },
         { "page", page },
         { "length", length },
         { "search", search != "" ? search : null },
     }
                ));
 }
예제 #30
0
파일: Cards.cs 프로젝트: Datasilk/Kandu
        public static Models.CardBoard GetDetails(int boardId, int cardId)
        {
            var list = Sql.Populate <Models.CardBoard>(
                "Card_GetDetails",
                new { boardId, cardId }
                );

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