Example #1
0
 public static void Update(Models.Campaign model)
 {
     Sql.ExecuteNonQuery(
         "Campaign_Update",
         new Dictionary <string, object>()
     {
         { "campaignId", model.campaignId },
         { "teamId", model.teamId },
         { "serverId", model.serverId },
         { "label", model.label },
         { "status", model.status },
         { "draftsOnly", model.draftsOnly },
         { "schedule", model.schedule },
         { "queueperday", model.queueperday }
     }
         );
 }
Example #2
0
        public static Models.NewCampaign Create(Models.Campaign model)
        {
            var list = Sql.Populate <Models.NewCampaign>(
                "Campaign_Create",
                new Dictionary <string, object>()
            {
                { "teamId", model.teamId },
                { "serverId", model.serverId },
                { "draftId", model.draftId },
                { "label", model.label },
                { "status", model.status },
                { "draftsOnly", model.draftsOnly },
                { "schedule", model.schedule },
                { "queueperday", model.queueperday }
            }
                );

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