Ejemplo n.º 1
0
 public static int GetMax(int bookId)
 {
     return(Sql.ExecuteScalar <int>("Chapter_GetMax", new Dictionary <string, object>()
     {
         { "bookId", bookId }
     }));
 }
Ejemplo n.º 2
0
 public static int CreateList(Models.List list)
 {
     return(Sql.ExecuteScalar <int>(
                "List_Create",
                new { list.boardId, list.name, list.sort, list.cardtype }
                ));
 }
Ejemplo n.º 3
0
 public static bool MemberExists(int userId, int boardId)
 {
     return(Sql.ExecuteScalar <int>(
                "Board_MemberExists",
                new { userId, boardId }
                ) == 1);
 }
Ejemplo n.º 4
0
 public static int CreateTeam(Models.Team team)
 {
     return(Sql.ExecuteScalar <int>(
                "Team_Create",
                new { team.ownerId, team.security, team.name, team.website, team.description }
                ));
 }
Ejemplo n.º 5
0
 public static int Import(Models.List list, bool merge = false)
 {
     return(Sql.ExecuteScalar <int>(
                "List_Import",
                new { list.boardId, list.name, list.sort, merge }
                ));
 }
Ejemplo n.º 6
0
 public static int CreateBoard(Models.Board board, int userId)
 {
     return(Sql.ExecuteScalar <int>(
                "Board_Create",
                new { userId, board.teamId, board.favorite, board.name, board.security, board.color }
                ));
 }
Ejemplo n.º 7
0
 public static int Import(Models.Board board, int userId, bool merge = false)
 {
     return(Sql.ExecuteScalar <int>(
                "Board_Import",
                new { board.orgId, board.teamId, userId, board.name, board.favorite, board.color, merge }
                ));
 }
Ejemplo n.º 8
0
 public static int CreateUser(Models.User user)
 {
     return(Sql.ExecuteScalar <int>(
                "User_Create",
                new { user.name, user.email, user.password, user.photo }
                ));
 }
Ejemplo n.º 9
0
 public static int Create(Models.Team team, int ownerId)
 {
     return(Sql.ExecuteScalar <int>(
                "Team_Create",
                new { team.orgId, ownerId, team.name, team.description }
                ));
 }
Ejemplo n.º 10
0
 public static int CreateBoard(Models.Board board, int userId)
 {
     return(Sql.ExecuteScalar <int>(
                "Board_Create",
                new { board.orgId, board.teamId, userId, board.name, board.favorite, board.color, board.cardtype }
                ));
 }
Ejemplo n.º 11
0
 public static int TotalEmails(int campaignId)
 {
     return(Sql.ExecuteScalar <int>("CampaignQueue_TotalEmails",
                                    new Dictionary <string, object>()
     {
         { "campaignId", campaignId }
     }
                                    ));
 }
Ejemplo n.º 12
0
 public static string GetPassword(string username)
 {
     return(Sql.ExecuteScalar <string>("User_GetPassword",
                                       new Dictionary <string, object>()
     {
         { "username", username }
     }
                                       ));
 }
Ejemplo n.º 13
0
 public static Models.User GetDetails(int userId)
 {
     return(Sql.ExecuteScalar <Models.User>("User_GetDetails",
                                            new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                                            ));
 }
Ejemplo n.º 14
0
 public static bool HasSubscription(int subscriptionId)
 {
     return(Sql.ExecuteScalar <int>("InvoiceItems_HasSubscription",
                                    new Dictionary <string, object>()
     {
         { "subscriptionId", subscriptionId }
     }
                                    ) == 1);
 }
Ejemplo n.º 15
0
 public static string GetKey(string username)
 {
     return(Sql.ExecuteScalar <string>("Subscriber_GetKey",
                                       new Dictionary <string, object>()
     {
         { "username", username }
     }
                                       ));
 }
Ejemplo n.º 16
0
 public static string GetPassword(string email)
 {
     return(Sql.ExecuteScalar <string>("User_GetPassword",
                                       new Dictionary <string, object>()
     {
         { "email", email }
     }
                                       ));
 }
Ejemplo n.º 17
0
 public static string GetUserName(int subscriberId)
 {
     return(Sql.ExecuteScalar <string>("Subscriber_GetUserName",
                                       new Dictionary <string, object>()
     {
         { "subscriberId", subscriberId }
     }
                                       ));
 }
Ejemplo n.º 18
0
 public static string Get(string key)
 {
     return(Sql.ExecuteScalar <string>("GoogleToken_GetValue",
                                       new Dictionary <string, object>()
     {
         { "key", key }
     }
                                       ));
 }
Ejemplo n.º 19
0
 public static string GetEmail(int userId)
 {
     return(Sql.ExecuteScalar <string>("User_GetEmail",
                                       new Dictionary <string, object>()
     {
         { "userId", userId }
     }
                                       ));
 }
Ejemplo n.º 20
0
 public static string CreateAuthToken(int userId, int expireDays = 30)
 {
     return(Sql.ExecuteScalar <string>("User_CreateAuthToken",
                                       new Dictionary <string, object>()
     {
         { "userId", userId },
         { "expireDays", expireDays }
     }
                                       ));
 }
Ejemplo n.º 21
0
 public static int Create(string eventName, string data)
 {
     return(Sql.ExecuteScalar <int>("LogStripeWebhooks_Create",
                                    new Dictionary <string, object>()
     {
         { "event", eventName },
         { "data", data }
     }
                                    ));
 }
Ejemplo n.º 22
0
 public static Models.CampaignFollowupRule ForCampaign(int campaignId)
 {
     return(Sql.ExecuteScalar <Models.CampaignFollowupRule>(
                "CampaignFollowupRule_ForCampaign",
                new Dictionary <string, object>()
     {
         { "campaignId", campaignId }
     }
                ));
 }
Ejemplo n.º 23
0
 public static Models.CampaignFollowupRule GetInfo(int ruleId)
 {
     return(Sql.ExecuteScalar <Models.CampaignFollowupRule>(
                "CampaignFollowupRule_GetInfo",
                new Dictionary <string, object>()
     {
         { "ruleId", ruleId }
     }
                ));
 }
Ejemplo n.º 24
0
        public static string[] InvitePeople(int invitedBy, int scopeId = 0, Kandu.Models.Scope scope = Kandu.Models.Scope.All, string message = "", List <Models.Xml.Invites.Invite> invites = null)
        {
            var inviteList = new Models.Xml.Invites()
            {
                List = invites.ToArray()
            };
            var errors = Sql.ExecuteScalar <string>("Invite_People_Batch", new { invitedBy, scopeId, scope = (int)scope, message, invites = Common.Serializer.ToXmlDocument(inviteList).OuterXml });

            return(string.IsNullOrEmpty(errors) ? new string[] { } : errors.Split(",", StringSplitOptions.RemoveEmptyEntries));
        }
Ejemplo n.º 25
0
 public static int CreateSubscriber(Models.Subscriber subscriber)
 {
     return(Sql.ExecuteScalar <int>(
                "Subscriber_Create",
                new Dictionary <string, object>()
     {
         { "username", subscriber.username },
         { "password", subscriber.password }
     }
                ));
 }
Ejemplo n.º 26
0
 public static int Create(int ownerId, string name)
 {
     return(Sql.ExecuteScalar <int>(
                "Team_Create",
                new Dictionary <string, object>()
     {
         { "ownerId", ownerId },
         { "name", name }
     }
                ));
 }
Ejemplo n.º 27
0
 public static string Update(int userId, string key)
 {
     return(Sql.ExecuteScalar <string>(
                "DeveloperKey_Update",
                new Dictionary <string, object>()
     {
         { "userId", userId },
         { "devkey", key },
     }
                ));
 }
Ejemplo n.º 28
0
 public static bool MemberExists(int userId, int boardId)
 {
     return(Sql.ExecuteScalar <int>(
                "Board_MemberExists",
                new Dictionary <string, object>()
     {
         { "userId", userId },
         { "boardId", boardId }
     }
                ) == 1);
 }
Ejemplo n.º 29
0
 public static int Create(int invoiceId, int subscriptionId, decimal price, int quantity)
 {
     return(Sql.ExecuteScalar <int>("InvoiceItem_Create",
                                    new Dictionary <string, object>()
     {
         { "invoiceId", invoiceId },
         { "subscriptionId", subscriptionId },
         { "price", price },
         { "quantity", quantity }
     }
                                    ));
 }
Ejemplo n.º 30
0
 public static int CreateList(Models.List list)
 {
     return(Sql.ExecuteScalar <int>(
                "List_Create",
                new Dictionary <string, object>()
     {
         { "boardId", list.boardId },
         { "name", list.name },
         { "sort", list.sort }
     }
                ));
 }