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 } )); }
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 } )); }
public static List <Models.Book> GetList(int userId, int sort = 0) { return(Sql.Populate <Models.Book>( "Books_GetList", new { userId, sort } )); }
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 } )); }
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 } )); }
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 } )); }
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); }
public static List <Models.List> GetListsForBoard(int boardId) { return(Sql.Populate <Models.List>( "Lists_GetList", new Dictionary <string, object>() { { "boardId", boardId } } )); }
public static List <Models.TeamMemberInfo> GetList(int teamId) { return(Sql.Populate <Models.TeamMemberInfo>( "TeamMembers_GetList", new Dictionary <string, object>() { { "teamId", teamId } } )); }
public static List <Models.AddressFieldValues> GetValues(int addressId) { return(Sql.Populate <Models.AddressFieldValues>( "AddressFields_GetValues", new Dictionary <string, object>() { { "addressId", addressId } } )); }
public static List <Models.Subscription> GetHistory(int userId) { return(Sql.Populate <Models.Subscription>( "Subscriptions_GetHistory", new Dictionary <string, object>() { { "userId", userId } } )); }
public static List <int> GetBoardsForMember(int userId) { return(Sql.Populate <int>( "BoardMember_GetBoards", new Dictionary <string, object>() { { "userId", userId } } )); }
public static List <Models.InvoiceItem> GetList(int invoiceId) { return(Sql.Populate <Models.InvoiceItem>( "InvoiceItems_GetList", new Dictionary <string, object>() { { "invoiceId", invoiceId } } )); }
public static List <Models.Team> GetByMember(int userId) { return(Sql.Populate <Models.Team>( "Teams_GetByMember", new Dictionary <string, object>() { { "userId", userId } } )); }
public static List <Models.CampaignLabel> GetLabels(int teamId) { return(Sql.Populate <Models.CampaignLabel>( "Campaign_GetLabels", new Dictionary <string, object>() { { "teamId", teamId } } )); }
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); }
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); }
public static List <Models.Board> GetList(int userId) { return(Sql.Populate <Models.Board>( "Boards_GetList", new Dictionary <string, object>() { { "userId", userId } } )); }
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); }
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 } } )); }
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); }
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); }
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); }
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); }
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); }
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 } } )); }
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); }
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); }
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 }, } )); }
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); }