Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            imgBanner.ImageUrl = this.Model.BannerImage.MediaItem != null ? this.Model.BannerImage.MediaUrl : "";

            List <DefaultArticlePageItem> recommendedArticles;

            if (IsUserLoggedIn)
            {
                recommendedArticles = SearchHelper.GetRecommendedContent(CurrentMember, DefaultArticlePageItem.TemplateId)
                                      .Where(a => a.GetItem() != null)
                                      .Select(a => new DefaultArticlePageItem(a.GetItem()))
                                      .ToList();

                BaseReply reply = ExactTargetService.InvokeEM11DonationAcknowledgement(new InvokeEM11DonationAcknowledgementRequest {
                    RequestUrl = Request.Url, DonationAmount = "$0.00", FullName = CurrentMember.FirstName, PreferredLanguage = CurrentMember.PreferredLanguage, ToEmail = CurrentMember.Email
                });


                if (recommendedArticles.Count > 0)
                {
                    rptFeaturedArticles.DataSource = recommendedArticles.Take(4);
                    rptFeaturedArticles.DataBind();
                }
            }
        }
Esempio n. 2
0
        public override async Task <BaseReply> DropColumn(DropColumnRequst request, ServerCallContext context)
        {
            try
            {
                await _tableDal.DeleteField(request.TableName, request.DbName, request.ColumnName);

                var response = new BaseReply()
                {
                    Code = 200
                };

                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("***************************************************************************************************************");
                Console.WriteLine("Column dropped: " + request.TableName + ", " + request.ColumnName);
                Console.WriteLine("***************************************************************************************************************");

                return(response);
            }
            catch (Exception ex)
            {
                return(new BaseReply()
                {
                    Code = 400, Message = ex.Message, StackTrace = ex.StackTrace
                });
            }
        }
        protected void btnAgree_Click(object sender, EventArgs e)
        {
            CurrentMember.AgreedToSignUpTerms = true;

            var membershipManager = new MembershipManager();

            membershipManager.UpdateMember(CurrentMember);

            BaseReply reply = ExactTargetService.InvokeWelcomeToUnderstood(new InvokeWelcomeToUnderstoodRequest {
                PreferredLanguage = CurrentMember.PreferredLanguage, ToEmail = CurrentUser.Email, FirstName = CurrentMember.FirstName, RequestUrl = Request.Url
            });

            //string url = MembershipHelper.GetNextStepURL(1);
            // send them to My Account, not into CMP
            string url = MyAccountItem.GetMyAccountPage().GetUrl();

            // NOTE: temorarily commented out to prevent 404 redirect

            //if (Session[Constants.SessionPreviousUrl] != null)
            //{
            //    url = Session[Constants.SessionPreviousUrl].ToString();
            //}

            //redirect based on interrupt
            this.ReturnRedirect();

            //if no sign-up interrupt was set, redirect as normal
            Response.Redirect(url);
        }
Esempio n. 4
0
        public override async Task <BaseReply> AddColumn(AddColumnRequest request, ServerCallContext context)
        {
            try
            {
                var field = new Dto.Field
                {
                    Name       = request.ColumnName,
                    Type       = (SupportedTypes)request.DataValueType,
                    Validators = _grpcModelMapper.GetValidatorsDtoFromGrpcValidators(request.Validators)
                };

                await _tableDal.AddField(request.TableName, request.DbName, field);

                var response = new BaseReply()
                {
                    Code = 200
                };

                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("***************************************************************************************************************");
                Console.WriteLine("Column added: " + request.TableName + ", " + request.ColumnName);
                Console.WriteLine("***************************************************************************************************************");

                return(response);
            }
            catch (Exception ex)
            {
                return(new BaseReply()
                {
                    Code = 400, Message = ex.Message, StackTrace = ex.StackTrace
                });
            }
        }
Esempio n. 5
0
        public override async Task <BaseReply> Delete(DeleteRequest request, ServerCallContext context)
        {
            try
            {
                if (request.Guids.Count > 0)
                {
                    var guids = request.Guids.Select(x => Guid.Parse(x)).ToList();

                    await _tableDal.Delete(request.TableName, request.DbName, guids);
                }

                var response = new BaseReply()
                {
                    Code = 200
                };

                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("***************************************************************************************************************");
                Console.WriteLine("Rows deleted:" + request.TableName);
                Console.WriteLine("***************************************************************************************************************");

                return(response);
            }
            catch (Exception ex)
            {
                return(new BaseReply()
                {
                    Code = 400, Message = ex.Message, StackTrace = ex.StackTrace
                });
            }
        }
Esempio n. 6
0
        public BaseReply SessionClaimOpen(SessionGetOpenRequest request)
        {
            BaseReply reply = new BaseReply();
            try
            {
                string filepath;
                if (request.isvideo) {
                   filepath  = System.Web.HttpRuntime.AppDomainAppPath + "Sessions\\Video\\";
                } else {
                     filepath = System.Web.HttpRuntime.AppDomainAppPath + "Sessions\\Text\\";
                }
                filepath += request.session;

                if (File.Exists(filepath))
                {
                    File.Delete(filepath);
                }
            }
            catch (Exception ex)
            {
                reply.error += "\n" + ex.Message;
                reply.successful = false;
            }

            return reply;
        }
        protected void btnEM17_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM17ObservationLogReminder(new InvokeEM17ObservationLogReminderRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ChildName = "optimus", ObservationalJournalLink = "www.google.com", ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM16_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM16ContentReminder(new InvokeEM16ContentReminderRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ContactSettingsLink = "www.google.com", ContentHelpfulnessAndCommentsModule = "<table><tr><td>15 people thought this was helpful</td></tr><tr><td>20 people commented</td></tr></table>", ReminderImage = "www.photobucket.com", ReminderLink = "www.google.com", ReminderSummary = "This is a reminder summary!", ReminderTitle = "This is a reminder title!", ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM14_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM14ThisWeeksActivity(new InvokeEM14ThisWeeksActivityRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ActivityFromThisWeekModule = "<table><tr><td><p>Activity from today module test!</p></td></tr><td>TUESDAY</td></tr><td>WEDNESDAY</td></tr></table>", ContactSettingsLink = "www.google.com", ProfileImageLink = "photobucket.com", ToEmail = tbxSubscriberEmail1.Text, UserProfileLink = "www.facebook.com", ViewMessageLink = "www.gmail.com"
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM12_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM12ThankYouForContactingUs(new InvokeEM12ThankYouForContactingUsRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ChildAge = "5", TimeRemaining = "10", ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM11_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM11DonationAcknowledgement(new InvokeEM11DonationAcknowledgementRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text, DonationAmount = "1 Billion Dollars", FullName = tbxSubscriberFN1.Text, PrintDonationRecordsLink = "www.google.com"
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM10_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM10WebinarConfirmation(new InvokeEM10WebinarConfirmationRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text, WebinarModule = "<table><tr><td><p>Test Webinar Module!</p></td></tr></table>"
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM18_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM18UpdateProfileReminder(new InvokeEM18UpdateProfileReminderRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ChildInformationConfirmation = "Is your child still 5 years old?", InformationConfirmLink = "google.com", InformationDeniedLink = "www.yahoo.com", ProfileImageLink = "www.photobucket.com", ToEmail = tbxSubscriberEmail1.Text, UserProfileLink = "www.facebook.com"
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM22_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM22ForgotPassword(new InvokeEM22ForgotPasswordRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), PasswordResetLink = "www.google.com", ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM19_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM19WebinarReminder(new InvokeEM19WebinarReminderRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text, WebinarModule = "webinar Module!"
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM7_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM7NewsletterConfirmation(new InvokeEM7NewsletterConfirmationRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text, ConfirmSubscriptionLink = "www.google.com", WeekDay = "sunday"
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM8_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM8SubscriptionConfirmation(new InvokeEM8SubscriptionConfirmationRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM3_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM3ExploreTheCommunity(new InvokeEM3ExploreTheCommunityRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), FullName = tbxSubscriberFN1.Text, PartnerPromo = "<table><tr><td><p>Thia is a partner promo!</p></td></tr></table>", ProfileCompletionBar = "20%!", ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        //protected void btnEM5_Click(object sender, EventArgs e)
        //{
        //	BaseReply reply = ExactTargetService.InvokeEM5KeepingAllStudentsSafe(new InvokeEM5KeepingAllStudentsSafeRequest { ToEmail = tbxSubscriberEmail1.Text });
        //	lblMessage.Text = reply.Message;
        //}

        protected void btnEM6_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM6HolidayDonations(new InvokeEM6HolidayDonationsRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), FullName = tbxSubscriberFN1.Text, ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM25_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM25WebinarSharedWithAFriend(new InvokeEM25WebinarSharedWithAFriendRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), PMText = "private message text!", ToEmail = tbxSubscriberEmail1.Text, UserContactFirstName = tbxSubscriberFN1.Text, WebinarModule = "webinar module"
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM2_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM2ParentToolkit(new InvokeEM2ParentToolkitRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text
            });                                                                                                                                                                                                         //new Guid(ddlLanguages.SelectedValue)

            lblMessage.Text = reply.Message;
        }
        //protected void btnEM26_Click(object sender, EventArgs e)
        //{
        //	BaseReply reply = ExactTargetService.
        //}

        //protected void btnEM27_Click(object sender, EventArgs e)
        //{

        //}

        protected void btnEM28_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM28AppsTechnologySharedWithAFriend(new InvokeEM28AppsTechnologySharedWithAFriendRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), UserContactFirstName = "user1", AppTitle = "app title", AppRatingModule = "app rating module", AppRatingLink = "www.google.com", AppQuality = "4.5 stars", AppLogo = "www.photobucket.com", AppLink = "www.google.com", AppLearningLink = "www.google.com", AppGrade = "6, 7, 8", AppGoodFor = "English | Math", AppDescription = "app description", ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM24_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM24ContentSharedWithAFriend(new InvokeEM24ContentSharedWithAFriendRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ContentHelpfulnessAndCommentsModule = "<p>15 people thought this was helpful.</p><p>10 comments</p>", PMText = "this is a private message!", ReminderImage = "www.photobucket.com", ReminderLink = "www.google.com", ReminderSummary = "This is a summary of the reminder", ReminderTitle = "reminder title", ToEmail = tbxSubscriberEmail1.Text, UserContactFirstName = tbxSubscriberFN1.Text
            });

            lblMessage.Text = reply.Message;
        }
        protected void btnEM23_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM23PasswordResetConfirmation(new InvokeEM23PasswordResetConfirmationRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), EmailAddress = tbxSubscriberEmail1.Text, ReportChangedPasswordLink = "www.google.com", ToEmail = tbxSubscriberEmail1.Text, UserPassword = "******"
            });

            lblMessage.Text = reply.Message;
        }
        //protected void btnEM20_Click(object sender, EventArgs e)
        //{
        //	BaseReply reply = ExactTargetService.
        //}

        protected void btnEM21_Click(object sender, EventArgs e)
        {
            BaseReply reply = ExactTargetService.InvokeEM21PrivateMessage(new InvokeEM21PrivateMessageRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ContactSettingsLink = "www.google.com", MsgCenterLink = "www.gmail.com", PMText = "This is a private message!", ReportInappropriateLink = "www.google.com", ToEmail = tbxSubscriberEmail1.Text
            });

            lblMessage.Text = reply.Message;
        }
Esempio n. 26
0
        public BaseReply GetHeartbeat()
        {
            GetHeartbeat request = new GetHeartbeat(Name);

            request.Execute();
            BaseReply reply = request.Reply as BaseReply;

            return(reply ?? new BaseReply(false));
        }
Esempio n. 27
0
        public void HeartbeatTest_VenueExists()
        {
            GetHeartbeat request = new GetHeartbeat("TESTEX");
            bool         actual  = request.Execute();
            BaseReply    reply   = request.Reply as BaseReply;

            Assert.IsTrue(actual);
            Assert.IsNotNull(reply);
            Assert.IsTrue(string.IsNullOrWhiteSpace(reply.Error));
        }
Esempio n. 28
0
        public void HeartbeatTest_VenueDoesNotExist()
        {
            GetHeartbeat request = new GetHeartbeat("FALSEEX");
            bool         actual  = request.Execute();
            BaseReply    reply   = request.Reply as BaseReply;

            Assert.IsFalse(actual);
            Assert.IsNotNull(reply);
            StringAssert.Contains(reply.Error, "The remote server returned an error: (404) Not Found");
        }
Esempio n. 29
0
        public static bool Execute(BaseReply response)
        {
            if (response.IsSuccess)
            {
                return(true);
            }

            MessageBox.Show(response.Data ?? "Error occurred");

            return(false);
        }
Esempio n. 30
0
        public async Task <bool> RemoverAsync(Guid id)
        {
            BaseRequest request = new BaseRequest
            {
                Id = id.ToString()
            };

            BaseReply reply = await _client.RemoverAsync(request);

            return(reply.Sucesso);
        }
        protected void btnETTests_Click(object sender, EventArgs e)
        {
            //InvokeEM2ParentToolkitReply reply = ExactTargetService.InvokeEM2ParentToolkit(new InvokeEM2ParentToolkitRequest { ToEmail = tbxSubscriberEmail1.Text });
            //BaseReply reply = ExactTargetService.InvokeWelcomeToUnderstood(new InvokeWelcomeToUnderstoodRequest { PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text, FirstName = tbxSubscriberFN1.Text });
            BaseReply reply = ExactTargetService.SendBehaviorToolSuggestion(new BaseRequest {
                PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ToEmail = tbxSubscriberEmail1.Text
            }, "Hello, world!");

            //BaseReply reply = ExactTargetService.InvokeEM10WebinarConfirmation(new InvokeEM10WebinarConfirmationRequest { ToEmail = tbxSubscriberEmail1.Text, WebinarModule = txtWebinarCode.Text });
            lblMessage.Text = reply.Message;
        }