public void Page_Load(object sender, EventArgs e)
    {
        gridProperties.OnGetDataSource += new EventHandler(gridProperties_OnGetDataSource);
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("System Preferences", Request, "SystemPreferencesManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Place Property Groups", Request, "SystemPlacePropertyGroupsManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("PlacePropertyGroup");
            inputName.MaxLength = cs["Name"].MaxLengthInChars;

            if (RequestId > 0)
            {
                TransitPlacePropertyGroup t = SessionManager.PlaceService.GetPlacePropertyGroupById(
                    SessionManager.Ticket, RequestId);
                inputName.Text        = t.Name;
                inputDescription.Text = t.Description;
                gridProperties_OnGetDataSource(this, null);
                gridProperties.DataBind();
                linkNewProperty.NavigateUrl = string.Format("SystemPlacePropertyEdit.aspx?pid={0}", RequestId);
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                panelProperties.Visible = false;
                sitemapdata.Add(new SiteMapDataAttributeNode("New Property Group", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #2
0
    public void Page_Load(object sender, EventArgs e)
    {
        gridFriends.OnGetDataSource += new EventHandler(gridFriends_OnGetDataSource);

        if (!IsPostBack)
        {
            if (RequestId == 0)
            {
                RedirectToLogin();
                return;
            }

            TransitAccount ta = SessionManager.GetInstance <TransitAccount, int>(
                RequestAccountId, SessionManager.AccountService.GetAccountById);

            labelName.Text = string.Format("{0}'s Friends Activity", Render(ta.Name));

            GetData();

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Friends Activity", Request.Url));
            StackSiteMap(sitemapdata);
        }
    }
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            linkCancel.NavigateUrl = ReturnUrl;

            if (!SessionManager.HasVerified())
            {
                ReportWarning("You don't have any verified e-mail addresses and/or profile photos.\n" +
                              "You must add/confirm a valid e-mail address and upload a profile photo before posting mad libs.");

                panelPost.Visible = false;
                post.Enabled      = false;
            }

            madLibInstance.MadLibId = MadLibId;
            madLibInstance.DataBind();

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode(ObjectName + "s", Request, string.Format("{0}View.aspx", ObjectName)));
            sitemapdata.Add(new SiteMapDataAttributeNode(InstanceName, Request, ReturnUrl));

            if (MadLibInstanceId > 0)
            {
                TransitMadLibInstance tmi = SessionManager.GetInstance <TransitMadLibInstance, int>(
                    MadLibInstanceId, SessionManager.MadLibService.GetMadLibInstanceById);
                madLibInstance.TextBind(tmi.Text);
            }

            sitemapdata.Add(new SiteMapDataAttributeNode("Mad Lib", Request.Url));
            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(post);
    }
    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("Referer Host Dups", Request, "SystemRefererHostDupsManage.aspx"));

            if (RequestId > 0)
            {
                TransitRefererHostDup t = SessionManager.StatsService.GetRefererHostDupById(
                    SessionManager.Ticket, RequestId);
                inputHost.Text        = t.Host;
                inputRefererHost.Text = t.RefererHost;
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Host, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Referer Host", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #5
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Redirects", Request, "AccountRedirectsManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("AccountRedirect");
            inputSourceUri.MaxLength = cs["SourceUri"].MaxLengthInChars;
            inputTargetUri.MaxLength = cs["TargetUri"].MaxLengthInChars;

            int id = RequestId;

            if (id > 0)
            {
                TransitAccountRedirect tr = SessionManager.AccountService.GetAccountRedirectById(SessionManager.Ticket, id);
                inputSourceUri.Text = tr.SourceUri;
                inputTargetUri.Text = tr.TargetUri;
                sitemapdata.Add(new SiteMapDataAttributeNode(tr.SourceUri, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Redirect", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #6
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TransitAccountGroup p = SessionManager.GroupService.GetAccountGroupById(
                SessionManager.Ticket, AccountGroupId);
            linkBack.NavigateUrl = string.Format("AccountGroupPicturesManage.aspx?id={0}", p.Id);

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Groups", Request, "AccountGroupsView.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(p.Name, Request, string.Format("AccountGroupView.aspx?id={0}", p.Id)));
            sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request, string.Format("AccountGroupPicturesManage.aspx?id={0}", p.Id)));

            if (RequestId > 0)
            {
                TransitAccountGroupPicture t = SessionManager.GroupService.GetAccountGroupPictureById(SessionManager.Ticket, RequestId);
                inputName.Text        = t.Name;
                inputDescription.Text = t.Description;
                imageFull.ImageUrl    = string.Format("AccountGroupPicture.aspx?id={0}&CacheDuration=0", t.Id);
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Picture", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #7
0
    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()
    {
        if (!IsPostBack)
        {
            int id = RequestId;

            if (id > 0)
            {
                TransitAccountPicture tw = SessionManager.AccountService.GetAccountPictureById(SessionManager.Ticket, id);
                this.Title                = inputName.Text = Renderer.Render(tw.Name);
                inputDescription.Text     = tw.Description;
                inputPictureThumbnail.Src = string.Format("AccountPictureThumbnail.aspx?id={0}&CacheDuration=0", tw.Id);
                inputHidden.Checked       = tw.Hidden;

                discussionComments.DiscussionId = SessionManager.GetCount <TransitDiscussion, string, int>(
                    typeof(AccountPicture).Name, id, SessionManager.DiscussionService.GetOrCreateDiscussionId);
                discussionComments.DataBind();

                SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
                sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
                sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request, "AccountPicturesManage.aspx"));
                sitemapdata.Add(new SiteMapDataAttributeNode(tw.Name, Request.Url));
                StackSiteMap(sitemapdata);
            }
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #9
0
    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("Surveys", Request, "SystemSurveysManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(Survey.Name, Request, string.Format("SystemSurveyEdit.aspx?id={0}", SurveyId)));

            DomainClass cs = SessionManager.GetDomainClass("SurveyQuestion");
            inputQuestion.MaxLength = cs["Question"].MaxLengthInChars;

            linkBack.NavigateUrl = "SystemSurveyEdit.aspx?id=" + SurveyId.ToString();
            if (RequestId > 0)
            {
                TransitSurveyQuestion tw = SessionManager.ObjectService.GetSurveyQuestionById(
                    SessionManager.Ticket, RequestId);
                inputQuestion.Text = Renderer.Render(tw.Question);
                sitemapdata.Add(new SiteMapDataAttributeNode(tw.Question, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Question", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #10
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            GetData(sender, e);

            if (ParentId != 0)
            {
                TransitPlace place = SessionManager.PlaceService.GetPlaceById(SessionManager.Ticket, ParentId);
                linkPlace.NavigateUrl = string.Format("PlaceView.aspx?id={0}", place.Id);
                linkBack.NavigateUrl  = (string.IsNullOrEmpty(ReturnUrl)) ? linkPlace.NavigateUrl : ReturnUrl;
                linkPlace.Text        = Renderer.Render(place.Name);
                imagePlace.ImageUrl   = string.Format("PlacePictureThumbnail.aspx?id={0}", place.PictureId);
                inputMessage.Text     = "Hello,\n\nI work for this place and would like to manage content.\n\nThanks!\n";

                SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
                sitemapdata.Add(new SiteMapDataAttributeNode("Places", Request, "PlacesView.aspx"));
                sitemapdata.Add(new SiteMapDataAttributeNode(place.Name, Request, string.Format("PlaceView.aspx?id={0}", place.Id)));
                sitemapdata.Add(new SiteMapDataAttributeNode("Request Ownership", Request.Url));
                StackSiteMap(sitemapdata);
            }
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #11
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));

            if (RequestId > 0)
            {
                TransitAccountPropertyGroup tag = SessionManager.AccountService.GetAccountPropertyGroupById(
                    SessionManager.Ticket, RequestId);
                labelName.Text        = Render(tag.Name);
                labelDescription.Text = Render(tag.Description);
                sitemapdata.Add(new SiteMapDataAttributeNode(tag.Name, Request.Url));
            }
            else
            {
                labelName.Text = "All Property Groups";
                sitemapdata.Add(new SiteMapDataAttributeNode("Properties", Request.Url));
            }

            StackSiteMap(sitemapdata);

            gridManage.DataSource = SessionManager.AccountService.GetAllAccountPropertyValues(
                SessionManager.Ticket, SessionManager.AccountId, RequestId);
            gridManage.DataBind();
        }

        SetDefaultButton(save);
    }
Beispiel #12
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            linkCancel.NavigateUrl = ReturnUrl;

            TransitAccountFlag flag = Flag;

            flagAccountImageLink.HRef      = linkAccount.NavigateUrl = string.Format("AccountView.aspx?id={0}", flag.AccountId);
            linkAccount.Text               = Renderer.Render(flag.AccountName);
            flagAccountImage.ImageUrl      = string.Format("AccountPictureThumbnail.aspx?id={0}&width=75&height=75", flag.AccountPictureId);
            linkFlaggedAccount.NavigateUrl = string.Format("AccountView.aspx?id={0}", flag.FlaggedAccountId);
            linkFlaggedAccount.Text        = Renderer.Render(flag.FlaggedAccountName);
            flagCreated.Text               = SessionManager.ToAdjustedString(flag.Created);
            flagDescription.Text           = Renderer.Render(flag.Description);
            flagType.Text = Renderer.Render(flag.AccountFlagType);

            linkReply.NavigateUrl = string.Format("AccountMessageEdit.aspx?id={0}&ReturnUrl={1}",
                                                  flag.AccountId, UrlEncode(Request.Url.PathAndQuery));

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Reported Abuse", Request, "AccountFlagsManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(flag.FlaggedAccountName, Request, string.Format("AccountView.aspx?id={0}", flag.FlaggedAccountId)));
            sitemapdata.Add(new SiteMapDataAttributeNode(flag.AccountFlagType, Request.Url));
            StackSiteMap(sitemapdata);
        }
    }
Beispiel #13
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Syndication", Request, "AccountFeedsManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("MadLib");
            inputName.MaxLength = cs["Name"].MaxLengthInChars;

            if (RequestId > 0)
            {
                TransitMadLib t = SessionManager.MadLibService.GetMadLibById(
                    SessionManager.Ticket, RequestId);
                inputTemplate.Text = t.Template;
                inputName.Text     = t.Name;
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New MadLib", Request.Url));
            }
            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(save);
    }
Beispiel #14
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (GroupId == 0)
            {
                throw new Exception("Missing Group");
            }

            TransitAccountGroup group = SessionManager.GroupService.GetAccountGroupById(
                SessionManager.Ticket, GroupId);
            linkAccountGroup.NavigateUrl = string.Format("AccountGroupView.aspx?id={0}", group.Id);
            linkBack.NavigateUrl         = ReturnUrl;
            linkAccountGroup.Text        = Renderer.Render(group.Name);
            imageAccountGroup.ImageUrl   = string.Format("AccountGroupPictureThumbnail.aspx?id={0}", group.PictureId);
            inputMessage.Text            = string.Format("Hi,\n\nI would like to join \"{0}\".\n\nThanks!\n", Renderer.Render(group.Name));

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Groups", Request, "AccountGroupsView.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(group.Name, Request, string.Format("AccountGroupView.aspx?id={0}", group.Id)));
            sitemapdata.Add(new SiteMapDataAttributeNode("Join", Request.Url));
            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageSave);

        if (!SessionManager.HasVerified())
        {
            ReportWarning("You don't have any verified e-mail addresses and/or profile photos.\n" +
                          "You must add/confirm a valid e-mail address and upload a profile photo before joining groups.");

            manageSave.Enabled = false;
        }
    }
Beispiel #15
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Bugs", Request, "BugProjectsManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("BugProject");
            inputName.MaxLength = cs["Name"].MaxLengthInChars;

            if (RequestId > 0)
            {
                TransitBugProject t = SessionManager.BugService.GetBugProjectById(
                    SessionManager.Ticket, RequestId);
                inputName.Text        = t.Name;
                inputDescription.Text = t.Description;
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Project", Request.Url));
            }

            StackSiteMap(sitemapdata);
            SetDefaultButton(manageAdd);
        }
    }
Beispiel #16
0
    public void Page_Load(object sender, EventArgs e)
    {
        this.addFile.Attributes["onclick"] = this.files.GetAddFileScriptReference() + "return false;";
        gridManage.OnGetDataSource        += new EventHandler(gridManage_OnGetDataSource);

        if (!IsPostBack)
        {
            TransitPlace place = SessionManager.PlaceService.GetPlaceById(SessionManager.Ticket, RequestId);

            GetData(sender, e);

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Places", Request, "PlacesView.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(place.Name, Request, string.Format("PlaceView.aspx?id={0}", place.Id)));
            sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request.Url));
            StackSiteMap(sitemapdata);
        }

        if (!SessionManager.HasVerified())
        {
            ReportWarning("You don't have any verified e-mail addresses and/or profile photos.\n" +
                          "You must add/confirm a valid e-mail address and upload a profile photo before uploading place pictures.");

            addFile.Enabled = false;
            save.Enabled    = false;
        }
    }
Beispiel #17
0
    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("Picture Types", Request, "SystemPictureTypesManage.aspx"));

            if (RequestId > 0)
            {
                TransitPictureType t = SessionManager.ObjectService.GetPictureTypeById(
                    SessionManager.Ticket, RequestId);
                inputName.Text = t.Name;
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Picture Type", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int id = RequestId;

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Messages", Request, "AccountMessageFoldersManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("AccountMessageFolder");
            inputName.MaxLength = cs["Name"].MaxLengthInChars;

            if (id > 0)
            {
                TransitAccountMessageFolder tw = SessionManager.AccountService.GetAccountMessageFolderById(SessionManager.Ticket, id);
                inputName.Text = Renderer.Render(tw.Name);
                sitemapdata.Add(new SiteMapDataAttributeNode(tw.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Folder", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
    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("Countries", Request, "SystemCountriesManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("Country");
            inputName.MaxLength = cs["Name"].MaxLengthInChars;

            int id = RequestId;

            if (id > 0)
            {
                TransitCountry tw = SessionManager.LocationService.GetCountryById(
                    SessionManager.Ticket, id);
                inputName.Text = Renderer.Render(tw.Name);
                sitemapdata.Add(new SiteMapDataAttributeNode(tw.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Country", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
    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("Pictures", Request, "SystemPicturesManage.aspx"));

            inputType.DataSource = SessionManager.ObjectService.GetPictureTypes(
                SessionManager.Ticket, null);

            inputType.DataBind();

            if (RequestId > 0)
            {
                TransitPicture t = SessionManager.ObjectService.GetPictureById(
                    SessionManager.Ticket, RequestId);
                inputName.Text        = t.Name;
                inputDescription.Text = t.Description;
                ListItemManager.TrySelect(inputType, t.Type);
                imageThumbnail.ImageUrl = string.Format("SystemPictureThumbnail.aspx?id={0}&CacheDuration=0", t.Id);
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Picture", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #21
0
    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("Account Place Types", Request, "SystemAccountPlaceTypesManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("AccountPlaceType");
            inputName.MaxLength = cs["Name"].MaxLengthInChars;

            if (RequestId > 0)
            {
                TransitAccountPlaceType t = SessionManager.PlaceService.GetAccountPlaceTypeById(
                    SessionManager.Ticket, RequestId);
                inputName.Text           = t.Name;
                inputDescription.Text    = t.Description;
                inputDefaultType.Checked = t.DefaultType;
                inputCanWrite.Checked    = t.CanWrite;

                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("New Type", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #22
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Security", "AccountPreferencesManage.aspx#security"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Reset Password", Request.Url));
            StackSiteMap(sitemapdata);

            linkAdministrator.OnClientClick =
                string.Format("location.href='mailto:{0}';",
                              SessionManager.GetCachedConfiguration(
                                  "SnCore.Admin.EmailAddress", "*****@*****.**"));

            if (SessionManager.IsLoggedIn)
            {
                if (!SessionManager.HasVerified())
                {
                    ReportWarning("You don't have any verified e-mail addresses and/or profile photos.\n" +
                                  "You must add/confirm a valid e-mail address and upload a profile photo before resetting your password.");

                    panelReset.Enabled = false;
                }

                string email = SessionManager.AccountService.GetActiveEmailAddress(
                    SessionManager.Ticket, SessionManager.AccountId);

                resetpasswordEmailAddress.Text     = email;
                resetpasswordBirthday.SelectedDate = SessionManager.Account.Birthday;
            }
        }

        SetDefaultButton(resetPassword);
    }
Beispiel #23
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Events", Request, "AccountEventsToday.aspx"));

            if (RequestId > 0)
            {
                TransitAccountEvent evt = SessionManager.EventService.GetAccountEventById(
                    SessionManager.Ticket, RequestId, SessionManager.UtcOffset.Ticks);

                this.Title          = string.Format("{0} Pictures", Renderer.Render(evt.Name));
                listView.DataSource = SessionManager.EventService.GetAccountEventPictures(
                    SessionManager.Ticket, RequestId, null);
                listView.DataBind();

                sitemapdata.AddRange(SiteMapDataAttribute.GetLocationAttributeNodes(Request, "AccountEventsToday.aspx", evt.PlaceCountry, evt.PlaceState, evt.PlaceCity, evt.PlaceNeighborhood, evt.AccountEventType));
                sitemapdata.Add(new SiteMapDataAttributeNode(evt.Name, Request, string.Format("AccountEventView.aspx?id={0}", evt.Id)));
                sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }
    }
Beispiel #24
0
    public void Page_Load(object sender, EventArgs e)
    {
        gridManage.OnGetDataSource += new EventHandler(gridManage_OnGetDataSource);
        if (!IsPostBack)
        {
            string openidmode = Request["openid.mode"];
            if (!string.IsNullOrEmpty(openidmode))
            {
                NameValueCollectionSerializer serializer = new NameValueCollectionSerializer(Request.Params);
                SessionManager.AccountService.CreateAccountOpenId(
                    SessionManager.Ticket, SessionManager.OpenIdToken, serializer.Names, serializer.Values);
                Redirect(Request.Path);
                return;
            }

            gridManage_OnGetDataSource(sender, e);
            gridManage.DataBind();

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Me Me", Request, "AccountManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode("Open-ID", Request.Url));
            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        linkBack.NavigateUrl = string.Format("BugView.aspx?id={0}", RequestId);

        if (!IsPostBack)
        {
            selectResolution.DataSource = SessionManager.BugService.GetBugResolutions(
                SessionManager.Ticket, null);
            selectResolution.DataBind();

            TransitBug bug = SessionManager.BugService.GetBugById(
                SessionManager.Ticket, RequestId);
            TransitBugProject project = SessionManager.BugService.GetBugProjectById(
                SessionManager.Ticket, bug.ProjectId);

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Bugs", Request, "BugProjectsManage.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(project.Name, Request, string.Format("BugProjectBugsManage.aspx?id={0}", project.Id)));
            sitemapdata.Add(new SiteMapDataAttributeNode(string.Format("#{0}: {1}", bug.Id, bug.Subject), Request, string.Format("BugView.aspx?id={0}", bug.Id)));
            sitemapdata.Add(new SiteMapDataAttributeNode("Resolve", Request.Url));
            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #26
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TransitAccountBlogPost t_post = SessionManager.BlogService.GetAccountBlogPostById(
                SessionManager.Ticket, RequestId);

            // discussions
            listDiscussions.DataSource = SessionManager.DiscussionService.GetDiscussions(
                SessionManager.Ticket, null);
            listDiscussions.DataBind();

            // blogs
            List <TransitAccountBlog> t_blogs = SessionManager.BlogService.GetAccountBlogs(
                SessionManager.Ticket, SessionManager.AccountId, null);
            t_blogs.AddRange(SessionManager.BlogService.GetAuthoredAccountBlogs(
                                 SessionManager.Ticket, SessionManager.AccountId, null));
            listBlogs.DataSource = t_blogs;
            listBlogs.DataBind();

            // ----

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("Blogs", Request, "AccountFeedItemsView.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(t_post.AccountBlogName, Request, string.Format("AccountBlogView.aspx?id={0}", t_post.AccountBlogId)));
            sitemapdata.Add(new SiteMapDataAttributeNode(t_post.Title, Request, string.Format("AccountBlogPostView.aspx?id={0}", t_post.Id)));
            sitemapdata.Add(new SiteMapDataAttributeNode("Move", Request.Url));
            StackSiteMap(sitemapdata);
        }
    }
    public void Page_Load(object sender, EventArgs e)
    {
        if (RequestId == 0)
        {
            throw new Exception("Missing account.");
        }

        gridManage.OnGetDataSource += new EventHandler(gridManage_OnGetDataSource);

        if (!IsPostBack)
        {
            TransitAccount a = SessionManager.GetInstance <TransitAccount, AccountService.ServiceQueryOptions, int>(
                RequestId, SessionManager.AccountService.GetAccountById);

            this.Title = string.Format("{0}'s Pictures", Renderer.Render(a.Name));

            GetData(sender, e);

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            sitemapdata.Add(new SiteMapDataAttributeNode("People", Request, "AccountsView.aspx"));
            sitemapdata.Add(new SiteMapDataAttributeNode(a.Name, Request, string.Format("AccountView.aspx?id={0}", a.Id)));
            sitemapdata.Add(new SiteMapDataAttributeNode("Pictures", Request.Url));
            StackSiteMap(sitemapdata);
        }
    }
    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("Attributes", Request, "SystemAttributesManage.aspx"));

            DomainClass cs = SessionManager.GetDomainClass("Attribute");
            inputName.MaxLength       = cs["Name"].MaxLengthInChars;
            inputDefaultUrl.MaxLength = cs["DefaultUrl"].MaxLengthInChars;

            if (RequestId > 0)
            {
                TransitAttribute t = SessionManager.ObjectService.GetAttributeById(
                    SessionManager.Ticket, RequestId);
                inputName.Text         = t.Name;
                inputDescription.Text  = t.Description;
                inputDefaultUrl.Text   = t.DefaultUrl;
                inputDefaultValue.Text = t.DefaultValue;
                imageBitmap.ImageUrl   = string.Format("SystemAttribute.aspx?id={0}&CacheDuration=0", t.Id);
                imageBitmap.Visible    = t.HasBitmap;
                sitemapdata.Add(new SiteMapDataAttributeNode(t.Name, Request.Url));
            }
            else
            {
                imageBitmap.Visible = false;
                sitemapdata.Add(new SiteMapDataAttributeNode("New Attribute", Request.Url));
            }

            StackSiteMap(sitemapdata);
        }

        SetDefaultButton(manageAdd);
    }
Beispiel #29
0
    public void Page_Load(object sender, EventArgs e)
    {
        SetDefaultButton(search);
        gridManage.OnGetDataSource += new EventHandler(gridManage_OnGetDataSource);

        if (!IsPostBack)
        {
            GetData(sender, e);

            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            if (IsObjectBound)
            {
                int discussion_id = SessionManager.GetCount <TransitDiscussion, string, int>(
                    Type, ObjectId, SessionManager.DiscussionService.GetOrCreateDiscussionId);

                TransitDiscussion td = SessionManager.GetInstance <TransitDiscussion, int>(
                    discussion_id, SessionManager.DiscussionService.GetDiscussionById);

                sitemapdata.Add(new SiteMapDataAttributeNode(td.ParentObjectName, string.Format("{0}&ReturnUrl={1}",
                                                                                                td.ParentObjectUri, Renderer.UrlEncode(Request.Url.PathAndQuery))));
                sitemapdata.Add(new SiteMapDataAttributeNode("Discussions", Request.Url));
            }
            else
            {
                sitemapdata.Add(new SiteMapDataAttributeNode("Discussions"));
            }
            StackSiteMap(sitemapdata);
        }
    }
Beispiel #30
0
    public void Page_Load(object sender, EventArgs e)
    {
        accountSurveyAnswers.OnGetDataSource += new EventHandler(accountSurveyAnswers_OnGetDataSource);
        if (!IsPostBack)
        {
            SiteMapDataAttribute sitemapdata = new SiteMapDataAttribute();
            TransitSurvey        s           = Survey;

            if (AccountId > 0)
            {
                TransitAccount a = Account;
                accountName.Text = Renderer.Render(a.Name);
                accountImage.Src = string.Format("AccountPictureThumbnail.aspx?id={0}", a.PictureId);
                accountLink.HRef = string.Format("AccountView.aspx?id={0}", a.Id);
                this.Title       = string.Format("{0}'s {1}", Renderer.Render(a.Name), Renderer.Render(s.Name));

                sitemapdata.Add(new SiteMapDataAttributeNode("People", Request, "AccountsView.aspx"));
                sitemapdata.Add(new SiteMapDataAttributeNode(a.Name, Request, string.Format("AccountView.aspx?id={0}", a.Id)));
            }
            else
            {
                accountcolumn.Visible = false;
                this.Title            = string.Format("{0}", Renderer.Render(s.Name));
            }

            sitemapdata.Add(new SiteMapDataAttributeNode(s.Name, Request.Url));
            StackSiteMap(sitemapdata);

            surveyName.Text = Renderer.Render(s.Name);
            accountSurveyAnswers_OnGetDataSource(sender, e);
            accountSurveyAnswers.DataBind();
        }
    }