public void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute(); sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx")); sitemapdata.Add(new SiteMapDataAttributeNode("Marketing Campaigns", Request, "MarketingCampaignsManage.aspx")); DomainClass cs = SessionManager.GetDomainClass("Campaign"); inputName.MaxLength = cs["Name"].MaxLengthInChars; inputSenderName.MaxLength = cs["SenderName"].MaxLengthInChars; inputSenderEmail.MaxLength = cs["SenderEmailAddress"].MaxLengthInChars; inputUrl.MaxLength = cs["Url"].MaxLengthInChars; if (RequestId > 0) { TransitCampaign t = SessionManager.MarketingService.GetCampaignById(SessionManager.Ticket, RequestId); inputActive.Checked = t.Active; inputDescription.Text = t.Description; inputName.Text = t.Name; inputSenderEmail.Text = t.SenderEmailAddress; inputSenderName.Text = t.SenderName; inputUrl.Text = t.Url; sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url)); } else { sitemapdata.Add(new SiteMapDataAttributeNode("New Marketing Campaign", Request.Url)); } StackSiteMap(sitemapdata); } SetDefaultButton(save); }
public void Page_Load(object sender, EventArgs e) { gridManage.OnGetDataSource += new EventHandler(gridManage_OnGetDataSource); LocationSelector.CountryChanged += new EventHandler(LocationSelector_CountryChanged); LocationSelector.StateChanged += new EventHandler(LocationSelector_StateChanged); LocationSelector.CityChanged += new EventHandler(LocationSelector_CityChanged); if (!IsPostBack) { TransitCampaign tc = SessionManager.MarketingService.GetCampaignById(SessionManager.Ticket, RequestId); campaignName.Text = string.Format("{0}: {1}", Render(tc.Name), campaignName.Text); GetData(sender, e); inputAccountPropertyGroup.DataSource = SessionManager.AccountService.GetAccountPropertyGroups( SessionManager.Ticket, null); inputAccountPropertyGroup.DataBind(); inputAccountPropertyGroup_SelectedIndexChanged(sender, e); SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute(); sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx")); sitemapdata.Add(new SiteMapDataAttributeNode("Marketing Campaigns", Request, "MarketingCampaignsManage.aspx")); sitemapdata.Add(new SiteMapDataAttributeNode(tc.Name, Request, string.Format("MarketingCampaignEdit.aspx?id={0}", tc.Id))); sitemapdata.Add(new SiteMapDataAttributeNode("Recepients", Request.Url)); StackSiteMap(sitemapdata); } }
public void save_Click(object sender, EventArgs e) { TransitCampaign t = new TransitCampaign(); t.Id = RequestId; t.Active = inputActive.Checked; t.Description = inputDescription.Text; t.Name = inputName.Text; t.SenderEmailAddress = inputSenderEmail.Text; t.SenderName = inputSenderName.Text; t.Url = inputUrl.Text; SessionManager.CreateOrUpdate<TransitCampaign>( t, SessionManager.MarketingService.CreateOrUpdateCampaign); Redirect("MarketingCampaignsManage.aspx"); }
public void save_Click(object sender, EventArgs e) { TransitCampaign t = new TransitCampaign(); t.Id = RequestId; t.Active = inputActive.Checked; t.Description = inputDescription.Text; t.Name = inputName.Text; t.SenderEmailAddress = inputSenderEmail.Text; t.SenderName = inputSenderName.Text; t.Url = inputUrl.Text; SessionManager.CreateOrUpdate <TransitCampaign>( t, SessionManager.MarketingService.CreateOrUpdateCampaign); Redirect("MarketingCampaignsManage.aspx"); }
public int CreateOrUpdateCampaign(string ticket, TransitCampaign campaign) { return(WebServiceImpl <TransitCampaign, ManagedCampaign, Campaign> .CreateOrUpdate( ticket, campaign)); }
public int CreateOrUpdateCampaign(string ticket, TransitCampaign campaign) { return WebServiceImpl<TransitCampaign, ManagedCampaign, Campaign>.CreateOrUpdate( ticket, campaign); }