Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     int _year = DateTime.Today.Year - 1;
     masterPage = (masterpages_Site)Master;
     pageName = "eBay_Auctions_Template";
     masterPage.ComponentName = pageName;
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     masterPage = (masterpages_Site)Master;
     pageName = "Press_Room_Template";
     masterPage.ComponentName = pageName;
     rptPressReleases.DataBind();
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     masterPage = (masterpages_Site)Master;
     pageName = "Press_Archives_Template";
     masterPage.ComponentName = pageName;
     rptPressMentions.DataBind();
 }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     masterPage = (masterpages_Site)Master;
     pageName = "Our_Staff_Template";
     masterPage.ComponentName = pageName;
     rptStaff.DataBind();
 }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int ID = 0;
            string strID = Security.Decrypt(Request["id"]);
            string strTypeID = Request["typeid"];

            masterPage = (masterpages_Site)Master;

            if (!String.IsNullOrEmpty(strID)) {
                Int32.TryParse(strID, out ID);
            }

            try {
                if (strTypeID == MailUtil.EmailType.Donation.ToString("D")) {
                    DonationDA DA = new DonationDA();
                    StringBuilder sb = DA.GetEmailBody(ID, Server.MapPath("~/App_Data/DonationEmail.xsl"));
                    litEmailBody.Text += sb.ToString();
                    pageName = "Donation_Confirmation_Template";
                } else if (strTypeID == MailUtil.EmailType.Membership.ToString("D")) {
                    MembershipDA DA = new MembershipDA();
                    StringBuilder sb = DA.GetEmailBody(ID, Server.MapPath("~/App_Data/MembershipEmail.xsl"));
                    litEmailBody.Text += sb.ToString().Replace("Please keep this email as receipt for your order.", "Please keep this as receipt for your order.");
                    pageName = "Membership_Confirmation_Template";
                } else if (strTypeID == MailUtil.EmailType.Volunteer.ToString("D")) {
                    VolunteerDA DA = new VolunteerDA();
                    StringBuilder sb = DA.GetEmailBody_Test(ID, Server.MapPath("~/App_Data/VolunteerEmail_Test.xsl"));
                    litEmailBody.Text += sb.ToString();
                    pageName = "Volunteer_Confirmation_Template";
                } else if (strTypeID == MailUtil.EmailType.StudentVolunteer.ToString("D")) {
                    StudentVolunteerDA DA = new StudentVolunteerDA();
                    StringBuilder sb = DA.GetEmailBody_Test(ID, Server.MapPath("~/App_Data/StudentVolunteerEmail_Test.xsl"));
                    litEmailBody.Text += sb.ToString();
                    pageName = "Volunteer_Confirmation_Template";
                } else if (strTypeID == MailUtil.EmailType.Advocacy.ToString("D")) {
                    AdvocacyDA DA = new AdvocacyDA();
                    StringBuilder sb = DA.GetEmailBody(ID, Server.MapPath("~/App_Data/AdvocacyEmail.xsl"));
                    litEmailBody.Text += sb.ToString();
                    pageName = "Volunteer_Confirmation_Template";
                } else if (strTypeID == MailUtil.EmailType.BigBookSaleVolunteer.ToString("D")) {
                    BigBookSaleVolunteerDA DA = new BigBookSaleVolunteerDA();
                    StringBuilder sb = DA.GetEmailBody(ID, Server.MapPath("~/App_Data/BigBookSaleVolunteerEmail.xsl"));
                    litEmailBody.Text += sb.ToString();
                    pageName = "Volunteer_Confirmation_Template";
                }
            } catch (Exception ex) {
                pageName = "";
                litEmailBody.Text = ex.Message;
            } finally {
                masterPage.ComponentName = pageName;
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int _year = DateTime.Today.Year - 1;
            masterPage = (masterpages_Site)Master;
            pageName = "Events_Template";
            masterPage.ComponentName = pageName;

            if (!IsPostBack) {
                for (int i=0; i<5; i++) {
                    _year++;
                    ddlYears.Items.Add(new ListItem(_year.ToString(), _year.ToString()));
                }
                //ddlMonths.SelectedIndex = (DateTime.Today.Month - 1);
            }
        }
Ejemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString.Count > 0) {
         string _url = GetRedirectUrl(true);
         if (_url != string.Empty) {
             Server.Transfer(_url);
         }
     }
     if (Request.IsSecureConnection) {
         Response.Redirect(String.Format("http://{0}/Content.aspx?{1}", SiteConfig.DomainName, PageName), true);
     }
     masterPage = (masterpages_Site)Master;
     masterPage.ComponentName = PageName;
     Page.Title += (" - " + PageName.Replace('_', ' '));
 }
Ejemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString.Count > 0) {
         string _url = GetRedirectUrl(false);
         if (_url != string.Empty) {
             Server.Transfer(_url);
         }
     }
     if (Request.IsSecureConnection) {
         Response.Redirect(SiteConfig.RootUrl, true);
     }
     masterPage = (masterpages_Site)Master;
     masterPage.ShowPromo = true;
     masterPage.ComponentName = PageName;
     Page.Title += (" - " + PageName.Replace('_', ' '));
 }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int _year = DateTime.Today.Year - 1;
            masterPage = (masterpages_Site)Master;
            masterPage.ComponentName = "Events_Template";

            if (!IsPostBack) {
                for (int i=0; i<5; i++) {
                    _year++;
                    ddlYears.Items.Add(new ListItem(_year.ToString(), _year.ToString()));
                }
                //ddlMonths.SelectedIndex = (DateTime.Today.Month - 1);
                eventIdString = Regex.Replace(Request.QueryString["id"], "[^0-9]", "");
                if (!int.TryParse(eventIdString, out eventId))
                {
                    Response.Redirect("/?Events_Calendar", true);
                }
            }
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterPage = (masterpages_Site)Master;
            pageName = "Send_to_a_Friend";
            masterPage.ComponentName = pageName;

            if (IsPostBack) {
                const string SERVER = "relay-hosting.secureserver.net";
                MailMessage oMail = new System.Web.Mail.MailMessage();
                oMail.From = txtSendersEmail.Text;
                oMail.To = txtFriendsEmail.Text;
                oMail.Subject = "A recommended page on friendssfpl.org";
                oMail.BodyFormat = MailFormat.Html; // enumeration
                oMail.Priority = MailPriority.High; // enumeration

                StringBuilder sb = new StringBuilder(2048);
                sb.AppendFormat("<p>Dear {0},</p>", txtFriendsName.Text);
                sb.AppendFormat("<p>Your friend, {0}, found some interesting information on the the Friends of the San Francisco Public Library Web site and would like to share it with you.</p>", txtSendersName.Text);
                sb.AppendFormat("<p>Check out <a href=\"http://www.friendsandfoundation.net/?{0}\" target=\"_blank\">http://www.friendsandfoundation.net/?{0}</a></p>", Request["ref"]);
                sb.Append("<p>If you have any questions regarding the Friends of the San Francisco Public Library Web services, please e-mail us at [email protected].</p>");
                sb.Append("===================<br/>");
                sb.AppendFormat("Message from {0}, {1}:<br/>", txtFriendsName.Text, txtFriendsEmail.Text);
                sb.AppendFormat("<br/>{0}<br/>", txtNote.Text);
                sb.Append("===================<br/>");
                sb.Append("<p>Thank you,<br/>Friends of the San Francisco Public Library</p>");
                sb.Append("<p>p.s. - At the Friends of the San Francisco Public Library, we respect your privacy. We will not use your e-mail address for any other purposes and your information will not be shared. However, if you would like to subscribe to our e-mail list for future Friends updates and news, you may do so at <a href=\"http://www.friendssfpl.org/learnmore_form.cfm\" target=\"_blank\">http://www.friendssfpl.org/learnmore_form.cfm</a></p>");

                oMail.Body = sb.ToString();
                sb = null;

                SmtpMail.SmtpServer = SERVER;
                SmtpMail.Send(oMail);
                oMail = null; // free up resources

                Response.Redirect("/?Send_to_a_Friend_Thanks");
            }
        }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterPage = (masterpages_Site)Master;
            pageName = "Volunteer_Form";
            masterPage.ComponentName = pageName;

            if (!IsPostBack) {
                if (!Request.IsSecureConnection) {
                    if ((Request.QueryString["admin"] != "true")) {
                        Response.Redirect("https://www.friendssfpl.org/?Volunteer_Form", true);
                    }
                }
            }
        }
Ejemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterPage = (masterpages_Site)Master;
            pageName = "Book_Donation_Form";
            masterPage.ComponentName = pageName;

            if (!IsPostBack) {
                if (!Request.IsSecureConnection) {
                    if ((Request.QueryString["admin"] != "true")) {
                        Response.Redirect(String.Format("https://{0}/?{1}", SiteConfig.DomainName, pageName), true);
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            masterPage = (masterpages_Site)Master;
            pageName = "Big_Book_Sale_Volunteer_Form";
            masterPage.ComponentName = pageName;

            if (!IsPostBack)
            {
                if (!Request.IsSecureConnection)
                {
                    if ((Request.QueryString["admin"] != "true"))
                    {
                        Response.Redirect(String.Format("https://{0}/?{1}", SiteConfig.DomainName, pageName), true);
                    }
                }
            }

            SqlCommand cmd = null;
            try
            {
                cmd = new SqlCommand("dbo.FSFPL_CheckBigBookSaleVolunteerQuota");
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Connection = new SqlConnection(WebConfigurationManager.ConnectionStrings["FSFPL"].ConnectionString);
                cmd.Connection.Open();
                SqlDataReader reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    // Day 1

                    if ((int)reader["Day1BoxMoverTime1Avail"] == 0) DisableCheckbox(cbxDay1BoxMover.Items[0]);
                    if ((int)reader["Day1BoxMoverTime2Avail"] == 0) DisableCheckbox(cbxDay1BoxMover.Items[1]);

                    if ((int)reader["Day1TableMonitorTime1Avail"] == 0) DisableCheckbox(cbxDay1TableMonitor.Items[0]);
                    //if ((int)reader["Day1TableMonitorTime2Avail"] == 0) DisableCheckbox(cbxDay1TableMonitor.Items[1]);

                    // Day 2

                    if ((int)reader["Day2BoxMoverTime1Avail"] == 0) DisableCheckbox(cbxDay2BoxMover.Items[0]);
                    if ((int)reader["Day2BoxMoverTime2Avail"] == 0) DisableCheckbox(cbxDay2BoxMover.Items[1]);

                    if ((int)reader["Day2TableMonitorTime1Avail"] == 0) DisableCheckbox(cbxDay2TableMonitor.Items[0]);
                    if ((int)reader["Day2TableMonitorTime2Avail"] == 0) DisableCheckbox(cbxDay2TableMonitor.Items[1]);
                    //if ((int)reader["Day2TableMonitorTime3Avail"] == 0) DisableCheckbox(cbxDay2TableMonitor.Items[2]);

                    //if ((int)reader["Day2FloaterTime1Avail"] == 0) DisableCheckbox(cbxDay2Floater.Items[0]);

                    if ((int)reader["Day2CashierTime1Avail"] == 0) DisableCheckbox(cbxDay2Cashier.Items[0]);
                    if ((int)reader["Day2CashierTime2Avail"] == 0) DisableCheckbox(cbxDay2Cashier.Items[1]);

                    if ((int)reader["Day2CallerTime1Avail"] == 0) DisableCheckbox(cbxDay2Caller.Items[0]);
                    if ((int)reader["Day2CallerTime2Avail"] == 0) DisableCheckbox(cbxDay2Caller.Items[1]);

                    // Day 3

                    if ((int)reader["Day3BoxMoverTime1Avail"] == 0) DisableCheckbox(cbxDay3BoxMover.Items[0]);
                    if ((int)reader["Day3BoxMoverTime2Avail"] == 0) DisableCheckbox(cbxDay3BoxMover.Items[1]);

                    if ((int)reader["Day3TableMonitorTime1Avail"] == 0) DisableCheckbox(cbxDay3TableMonitor.Items[0]);
                    if ((int)reader["Day3TableMonitorTime2Avail"] == 0) DisableCheckbox(cbxDay3TableMonitor.Items[1]);

                    if ((int)reader["Day3FloaterTime1Avail"] == 0) DisableCheckbox(cbxDay3Floater.Items[0]);
                    if ((int)reader["Day3FloaterTime2Avail"] == 0) DisableCheckbox(cbxDay3Floater.Items[1]);
                    if ((int)reader["Day3FloaterTime3Avail"] == 0) DisableCheckbox(cbxDay3Floater.Items[2]);

                    if ((int)reader["Day3CashierTime1Avail"] == 0) DisableCheckbox(cbxDay3Cashier.Items[0]);
                    if ((int)reader["Day3CashierTime2Avail"] == 0) DisableCheckbox(cbxDay3Cashier.Items[1]);
                    if ((int)reader["Day3CashierTime3Avail"] == 0) DisableCheckbox(cbxDay3Cashier.Items[2]);

                    if ((int)reader["Day3CallerTime1Avail"] == 0) DisableCheckbox(cbxDay3Caller.Items[0]);
                    if ((int)reader["Day3CallerTime2Avail"] == 0) DisableCheckbox(cbxDay3Caller.Items[1]);
                    if ((int)reader["Day3CallerTime3Avail"] == 0) DisableCheckbox(cbxDay3Caller.Items[2]);

                    // Day 4

                    if ((int)reader["Day4BoxMoverTime1Avail"] == 0) DisableCheckbox(cbxDay4BoxMover.Items[0]);
                    if ((int)reader["Day4BoxMoverTime2Avail"] == 0) DisableCheckbox(cbxDay4BoxMover.Items[1]);

                    if ((int)reader["Day4TableMonitorTime1Avail"] == 0) DisableCheckbox(cbxDay4TableMonitor.Items[0]);
                    if ((int)reader["Day4TableMonitorTime2Avail"] == 0) DisableCheckbox(cbxDay4TableMonitor.Items[1]);

                    if ((int)reader["Day4FloaterTime1Avail"] == 0) DisableCheckbox(cbxDay4Floater.Items[0]);
                    if ((int)reader["Day4FloaterTime2Avail"] == 0) DisableCheckbox(cbxDay4Floater.Items[1]);
                    if ((int)reader["Day4FloaterTime3Avail"] == 0) DisableCheckbox(cbxDay4Floater.Items[2]);

                    if ((int)reader["Day4CashierTime1Avail"] == 0) DisableCheckbox(cbxDay4Cashier.Items[0]);
                    if ((int)reader["Day4CashierTime2Avail"] == 0) DisableCheckbox(cbxDay4Cashier.Items[1]);
                    if ((int)reader["Day4CashierTime3Avail"] == 0) DisableCheckbox(cbxDay4Cashier.Items[2]);

                    if ((int)reader["Day4CallerTime1Avail"] == 0) DisableCheckbox(cbxDay4Caller.Items[0]);
                    if ((int)reader["Day4CallerTime2Avail"] == 0) DisableCheckbox(cbxDay4Caller.Items[1]);
                    if ((int)reader["Day4CallerTime3Avail"] == 0) DisableCheckbox(cbxDay4Caller.Items[2]);

                    // Day 5

                    if ((int)reader["Day5BoxMoverTime1Avail"] == 0) DisableCheckbox(cbxDay5BoxMover.Items[0]);
                    if ((int)reader["Day5BoxMoverTime2Avail"] == 0) DisableCheckbox(cbxDay5BoxMover.Items[1]);

                    if ((int)reader["Day5TableMonitorTime1Avail"] == 0) DisableCheckbox(cbxDay5TableMonitor.Items[0]);
                    if ((int)reader["Day5TableMonitorTime2Avail"] == 0) DisableCheckbox(cbxDay5TableMonitor.Items[1]);

                    if ((int)reader["Day5FloaterTime1Avail"] == 0) DisableCheckbox(cbxDay5Floater.Items[0]);
                    if ((int)reader["Day5FloaterTime2Avail"] == 0) DisableCheckbox(cbxDay5Floater.Items[1]);
                    if ((int)reader["Day5FloaterTime3Avail"] == 0) DisableCheckbox(cbxDay5Floater.Items[2]);

                    if ((int)reader["Day5CashierTime1Avail"] == 0) DisableCheckbox(cbxDay5Cashier.Items[0]);
                    if ((int)reader["Day5CashierTime2Avail"] == 0) DisableCheckbox(cbxDay5Cashier.Items[1]);
                    if ((int)reader["Day5CashierTime3Avail"] == 0) DisableCheckbox(cbxDay5Cashier.Items[2]);

                    if ((int)reader["Day5CallerTime1Avail"] == 0) DisableCheckbox(cbxDay5Caller.Items[0]);
                    if ((int)reader["Day5CallerTime2Avail"] == 0) DisableCheckbox(cbxDay5Caller.Items[1]);
                    if ((int)reader["Day5CallerTime3Avail"] == 0) DisableCheckbox(cbxDay5Caller.Items[2]);

                    // Day 6

                    if ((int)reader["Day6BoxMoverTime1Avail"] == 0) DisableCheckbox(cbxDay6BoxMover.Items[0]);
                    if ((int)reader["Day6BoxMoverTime2Avail"] == 0) DisableCheckbox(cbxDay6BoxMover.Items[1]);

                    if ((int)reader["Day6TableMonitorTime1Avail"] == 0) DisableCheckbox(cbxDay6TableMonitor.Items[0]);
                    if ((int)reader["Day6TableMonitorTime2Avail"] == 0) DisableCheckbox(cbxDay6TableMonitor.Items[1]);

                    if ((int)reader["Day6FloaterTime1Avail"] == 0) DisableCheckbox(cbxDay6Floater.Items[0]);
                    if ((int)reader["Day6FloaterTime2Avail"] == 0) DisableCheckbox(cbxDay6Floater.Items[1]);
                    if ((int)reader["Day6FloaterTime3Avail"] == 0) DisableCheckbox(cbxDay6Floater.Items[2]);

                    if ((int)reader["Day6CashierTime1Avail"] == 0) DisableCheckbox(cbxDay6Cashier.Items[0]);
                    if ((int)reader["Day6CashierTime2Avail"] == 0) DisableCheckbox(cbxDay6Cashier.Items[1]);
                    if ((int)reader["Day6CashierTime3Avail"] == 0) DisableCheckbox(cbxDay6Cashier.Items[2]);

                    if ((int)reader["Day6CallerTime1Avail"] == 0) DisableCheckbox(cbxDay6Caller.Items[0]);
                    if ((int)reader["Day6CallerTime2Avail"] == 0) DisableCheckbox(cbxDay6Caller.Items[1]);
                    if ((int)reader["Day6CallerTime3Avail"] == 0) DisableCheckbox(cbxDay6Caller.Items[2]);

                    if ((int)reader["Day6PackupTime1Avail"] == 0) DisableCheckbox(cbxDay6Packup.Items[0]);

                    // Day 7

                    if ((int)reader["Day7BoxMoverTime1Avail"] == 0) DisableCheckbox(cbxDay7BoxMover.Items[0]);
                    if ((int)reader["Day7BoxMoverTime2Avail"] == 0) DisableCheckbox(cbxDay7BoxMover.Items[1]);

                    if ((int)reader["Day7TableMonitorTime1Avail"] == 0) DisableCheckbox(cbxDay7TableMonitor.Items[0]);
                    if ((int)reader["Day7TableMonitorTime2Avail"] == 0) DisableCheckbox(cbxDay7TableMonitor.Items[1]);

                    if ((int)reader["Day7FloaterTime1Avail"] == 0) DisableCheckbox(cbxDay7Floater.Items[0]);
                    if ((int)reader["Day7FloaterTime2Avail"] == 0) DisableCheckbox(cbxDay7Floater.Items[1]);

                    if ((int)reader["Day7CashierTime1Avail"] == 0) DisableCheckbox(cbxDay7Cashier.Items[0]);
                    if ((int)reader["Day7CashierTime2Avail"] == 0) DisableCheckbox(cbxDay7Cashier.Items[1]);

                    if ((int)reader["Day7CallerTime1Avail"] == 0) DisableCheckbox(cbxDay7Caller.Items[0]);
                    if ((int)reader["Day7CallerTime2Avail"] == 0) DisableCheckbox(cbxDay7Caller.Items[1]);

                    if ((int)reader["Day7PackupTime1Avail"] == 0) DisableCheckbox(cbxDay7Packup.Items[0]);

                    // Day 8

                    if ((int)reader["Day8PackupTime1Avail"] == 0) DisableCheckbox(cbxDay8Packup.Items[0]);
                }
                reader.Close();
            }
            catch (Exception ex)
            {
                //throw ex;
            }
            finally
            {
                if (cmd.Connection != null && cmd.Connection.State == ConnectionState.Open)
                {
                    cmd.Connection.Close();
                }
                cmd.Dispose();
            }
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int eventIndex = 0;
            int _year = DateTime.Today.Year - 1;
            masterPage = (masterpages_Site)Master;
            pageName = "Events_Template";
            masterPage.ComponentName = pageName;

            if (!IsPostBack)
            {
                for (int i = 0; i < 5; i++)
                {
                    _year++;
                    ddlYears.Items.Add(new ListItem(_year.ToString(), _year.ToString()));
                }

                if (Request["idx"] != null)
                {
                    if (int.TryParse(Request["idx"], out eventIndex))
                    {
                        ddlEvents.DataBind(); // otherwise Count is zero
                        if (eventIndex >= 1 && eventIndex <= ddlEvents.Items.Count)
                        {
                            ddlEvents.SelectedIndex = eventIndex;
                        }
                    }
                }
            }

            int _idxEvent = ddlEvents.SelectedIndex;
            string _valEvent = ddlEvents.SelectedValue;

            int _idxLocation = ddlLocations.SelectedIndex;
            string _valLocation = ddlLocations.SelectedValue;

            if (PreviousPage != null)
            { // handle cross page posting from Events.aspx and Event.aspx
                ContentPlaceHolder mpContentPlaceHolder = PreviousPage.Master.FindControl("cpBody") as ContentPlaceHolder;
                if (mpContentPlaceHolder != null)
                {
                    DropDownList _ddlEvents = mpContentPlaceHolder.FindControl("ddlEvents") as DropDownList;
                    DropDownList _ddlLocations = mpContentPlaceHolder.FindControl("ddlLocations") as DropDownList;
                    DropDownList _ddlYears = mpContentPlaceHolder.FindControl("ddlYears") as DropDownList;
                    DropDownList _ddlMonths = mpContentPlaceHolder.FindControl("ddlMonths") as DropDownList;
                    if (_ddlEvents != null)
                    {
                        _idxEvent = _ddlEvents.SelectedIndex;
                        _valEvent = _ddlEvents.SelectedValue;
                        // For some weird reason, the following code sets the correct value but not the index.
                        // After the assignment, ddlEvents.SelectedIndex always = -1, so must be something to do with it being a databound control.
                        // Tried moving this to PreRender with no effect.
                        // If I comment out the assignment, "All Events" is selected instead of the value selected on Events.aspx or Event.aspx.
                        ddlEvents.SelectedIndex = _ddlEvents.SelectedIndex;
                    }
                    if (_ddlLocations != null)
                    {
                        _idxLocation = _ddlLocations.SelectedIndex;
                        _valLocation = _ddlLocations.SelectedValue;
                        ddlLocations.SelectedIndex = _ddlLocations.SelectedIndex;
                    }
                    if (_ddlYears != null) ddlYears.SelectedIndex = _ddlYears.SelectedIndex;
                    if (_ddlMonths != null) ddlMonths.SelectedIndex = _ddlMonths.SelectedIndex;
                }
            }

            if (ddlMonths.SelectedItem.Value == "0")
            {
                lblEventsCaption.Text = String.Format("{0}, {1}", ddlMonths.SelectedItem.Text, ddlYears.SelectedItem.Text);
            }
            else
            {
                lblEventsCaption.Text = String.Format("Events for {0}, {1}", ddlMonths.SelectedItem.Text, ddlYears.SelectedItem.Text);
            }

            if (_idxEvent > 0 || _idxLocation > 0)
            {
                string eventFilter = String.Format("TypeId = '{0}'", _valEvent);
                string locationFilter = String.Format("LocationId = '{0}'", _valLocation);

                if (_idxEvent > 0 && _idxLocation > 0)
                {
                    sqldsEvents.FilterExpression = String.Format("{0} AND {1}", eventFilter, locationFilter);
                }
                else if (_idxEvent > 0)
                {
                    sqldsEvents.FilterExpression = eventFilter;
                }
                else
                {
                    sqldsEvents.FilterExpression = locationFilter;
                }
            }
            rptEvents.DataBind(); // needed here to undo any filtering if FilterExpression set to ''
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterPage = (masterpages_Site)Master;
            pageName = "Membership_Form";
            masterPage.ComponentName = pageName;

            if (!IsPostBack) {
                if (!Request.IsSecureConnection) {
                    if ((Request.QueryString["admin"] != "true")) {
                        Response.Redirect(String.Format("https://{0}/?{1}", SiteConfig.DomainName, pageName), true);
                    }
                }
                DateTime dtDate;
                DateTime dtDateToday = DateTime.Today;
                for (int i=0; i<5; i++) {
                    dtDate = dtDateToday.AddYears(i);
                    ddlExpYear.Items.Add(new ListItem(dtDate.Year.ToString(), dtDate.Year.ToString()));
                }
            }
        }
Ejemplo n.º 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterPage = (masterpages_Site)Master;
            pageName = "Membership_Form";
            masterPage.ComponentName = pageName;

            if (!IsPostBack) {
                //if (!Request.IsSecureConnection) {
                //    Response.Redirect("https://www.friendssfpl.org/?Membership_Form");
                //}
                if (!Request.IsSecureConnection) {
                    if ((Request.QueryString["admin"] != "true")) {
                        Response.Redirect("https://www.friendssfpl.org/Membership_Form_Test.aspx");
                    }
                }
                DateTime dtDate;
                DateTime dtDateToday = DateTime.Today;
                for (int i=0; i<5; i++) {
                    dtDate = dtDateToday.AddYears(i);
                    ddlExpYear.Items.Add(new ListItem(dtDate.Year.ToString(), dtDate.Year.ToString()));
                }
            }
        }