protected void Pager_PageChanged(object src, PageChangedEventArgs e)
        {
            this.Pager.CurrentPageIndex = e.NewPageIndex;
            string searchType = BaseUserControl.RequestString("SearchType");
            string keyword    = base.Request.Form["Author"];
            int    listType   = BaseUserControl.RequestInt32("ListType");

            this.AuthorsBindData(listType, searchType, keyword);
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string userName = BaseUserControl.RequestString("UserName");

            if (string.IsNullOrEmpty(userName))
            {
                userName = PEContext.Current.User.UserName;
            }
            if (!this.Page.IsPostBack)
            {
                this.EgvAddress.DataSource = Address.GetAddressListByUserName(userName);
                this.EgvAddress.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string searchType = BaseUserControl.RequestString("SearchType");
            string keyword    = base.Request.Form["Author"];
            int    listType   = BaseUserControl.RequestInt32("ListType", 0);

            if (listType == 0)
            {
                listType = DataConverter.CLng(base.Request.Form["HdnListType"]);
            }
            this.RptAuthorType.DataSource = Choiceset.GetDictionaryFieldValueByName("PE_Author", "Type");
            this.RptAuthorType.DataBind();
            this.AuthorsBindData(listType, searchType, keyword);
        }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.m_UrlReferrer = base.Request.UrlReferrer.ToString();
     this.nodeList      = this.xmlDoc.SelectNodes("CreateWork/WorkId");
     this.xmlDoc.Load(this.path);
     RolePermissions.BusinessAccessCheck(OperateCode.CreateHtmlManage);
     this.HdnWorkId.Value = BaseUserControl.RequestString("WorkId");
     if (this.nodeList.Count > 0)
     {
         this.BtnStopCreate.Visible = true;
     }
     else
     {
         this.BtnStopCreate.Visible = false;
     }
 }
 protected void DlstAgent_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
     {
         LinkButton button = (LinkButton)e.Item.FindControl("LbtnAgentName");
         string     str    = BaseUserControl.RequestString("OpenerText");
         if (string.IsNullOrEmpty(str))
         {
             button.OnClientClick = string.Format("Javascript:opener.__doPostBack(\"AgentList_PostBack\",\"{0}\");window.close();", e.Item.DataItem.ToString());
         }
         else
         {
             button.OnClientClick = "window.opener.document.getElementById('" + str + "').value='" + e.Item.DataItem.ToString() + "';window.close();";
         }
     }
 }
Beispiel #6
0
 protected void InitJavaScript()
 {
     if (this.IsContentTab())
     {
         StringBuilder builder = new StringBuilder();
         builder.Append("<script type='text/javascript'>\n");
         builder.Append("function JumpToMainRight(leftUrl,rightUrl) {");
         builder.Append(" if (rightUrl != \"\") { parent.frames[\"main_right\"].location = rightUrl;}");
         builder.Append("}");
         if (!string.IsNullOrEmpty(BaseUserControl.RequestString("js")))
         {
             builder.Append(" window.onload=" + BaseUserControl.RequestString("js") + ";");
         }
         builder.Append("</script>");
         this.jumptomainrightjs = builder.ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     this.Pager.PageSize = 20;
     if (!this.Page.IsPostBack)
     {
         this.DlstAgentBindData();
         string str = BaseUserControl.RequestString("OpenerText");
         if (!string.IsNullOrEmpty(str))
         {
             this.LbtnDelAgent.OnClientClick = "window.opener.document.getElementById('" + str + "').value='';window.close();";
         }
         else
         {
             this.LbtnDelAgent.OnClientClick = "Javascript:opener.__doPostBack('AgentList_PostBack','');window.close();";
         }
     }
 }
Beispiel #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(this.HdnField.Value))
     {
         this.HdnField.Value = BaseUserControl.RequestInt32("Field").ToString();
     }
     if (string.IsNullOrEmpty(this.HdnKeyword.Value))
     {
         this.HdnKeyword.Value = BaseUserControl.RequestString("KeyWord");
     }
     if (string.IsNullOrEmpty(this.HdnSearchType.Value))
     {
         this.HdnSearchType.Value = BaseUserControl.RequestInt32("SearchType").ToString();
     }
     if (string.IsNullOrEmpty(this.m_AdminName))
     {
         this.EgvUserValid.Columns[1].Visible = false;
         this.EgvUserValid.Columns[4].Visible = false;
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     this.EgvUserPoint.Columns[3].HeaderText = SiteConfig.UserConfig.PointName + "数";
     if (string.IsNullOrEmpty(this.HdnField.Value))
     {
         this.HdnField.Value = BaseUserControl.RequestInt32("Field").ToString();
     }
     if (string.IsNullOrEmpty(this.HdnKeyword.Value))
     {
         this.HdnKeyword.Value = BaseUserControl.RequestString("KeyWord");
     }
     if (string.IsNullOrEmpty(this.HdnSearchType.Value))
     {
         this.HdnSearchType.Value = BaseUserControl.RequestInt32("SearchType").ToString();
     }
     if (this.m_ShowType == 1)
     {
         this.EgvUserPoint.Columns[1].Visible = false;
         this.EgvUserPoint.Columns[5].Visible = false;
     }
 }
        protected void InitComment()
        {
            if (this.m_GeneralId == 0)
            {
                BaseUserControl.WriteErrMsg("<li>没有找到隶属信息评论,请返回!</li>");
            }
            else
            {
                string s = BaseUserControl.RequestString("Title");
                this.LblTitle.Text = s;
                string returnurl = this.ViewFile + "?GeneralID=" + this.m_GeneralId.ToString() + "&title=" + base.Server.UrlEncode(s);
                int    commentId = BaseUserControl.RequestInt32("CommentID");
                switch (BaseUserControl.RequestString("Action"))
                {
                case "Delete":
                    if (Comment.Delete(commentId))
                    {
                        BaseUserControl.WriteSuccessMsg("<li>删除指定信息评论成功!</li>", returnurl);
                    }
                    break;

                case "Audited":
                    if (Comment.SetStatus(commentId, true))
                    {
                        BaseUserControl.WriteSuccessMsg("<li>指定信息评论审核成功!</li>", returnurl);
                    }
                    break;

                case "UnAudited":
                    if (Comment.SetStatus(commentId, false))
                    {
                        BaseUserControl.WriteSuccessMsg("<li>已取消指定评论审核!</li>", returnurl);
                    }
                    break;

                case "Premier":
                    if (Comment.Elite(commentId, true))
                    {
                        BaseUserControl.WriteSuccessMsg("<li>设定指定评论精华成功!</li>", returnurl);
                    }
                    break;

                case "UnPremier":
                    if (Comment.Elite(commentId, false))
                    {
                        BaseUserControl.WriteSuccessMsg("<li>已取消指定评论精华!</li>", returnurl);
                    }
                    break;

                case "AddPKZone":
                {
                    CommentPKZoneInfo commentPKZoneInfo = new CommentPKZoneInfo();
                    commentPKZoneInfo.CommentId  = commentId;
                    commentPKZoneInfo.Content    = base.Request["ItemContent"];
                    commentPKZoneInfo.Position   = DataConverter.CLng(base.Request["RadlPosition"]);
                    commentPKZoneInfo.IP         = PEContext.Current.UserHostAddress;
                    commentPKZoneInfo.UpdateTime = DateTime.Now;
                    commentPKZoneInfo.UserName   = "******";
                    CommentPKZone.Add(commentPKZoneInfo);
                    BaseUserControl.WriteSuccessMsg("<li>感谢您的参与,添加辩论成功!</li>", returnurl);
                    break;
                }
                }
                this.CommentBindData();
            }
        }
 protected void RptCommentContent_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
     {
         Label         label    = e.Item.FindControl("LblNum") as Label;
         Image         image    = e.Item.FindControl("ImgUserFace") as Image;
         Label         label2   = e.Item.FindControl("LblCommentContent") as Label;
         ExtendedLabel label3   = e.Item.FindControl("LblUserExp") as ExtendedLabel;
         Label         label4   = e.Item.FindControl("LblUserRegTime") as Label;
         ExtendedLabel label5   = e.Item.FindControl("LblReply") as ExtendedLabel;
         CommentInfo   dataItem = (CommentInfo)e.Item.DataItem;
         Label         label6   = e.Item.FindControl("LblSustain") as Label;
         Label         label7   = e.Item.FindControl("LblOppose") as Label;
         Label         label8   = e.Item.FindControl("LblNeutralismNetizen") as Label;
         Label         label9   = e.Item.FindControl("LblPKZone") as Label;
         Label         label10  = e.Item.FindControl("LblPKAgree") as Label;
         Label         label11  = e.Item.FindControl("LblPKOppose") as Label;
         Label         label12  = e.Item.FindControl("LblExcerpt") as Label;
         Label         label13  = e.Item.FindControl("LblRestore") as Label;
         Label         label14  = e.Item.FindControl("LblDelete") as Label;
         string        str      = "CommentID=" + dataItem.CommentId.ToString() + "&GeneralId=" + this.m_GeneralId.ToString() + "&Title=" + base.Server.UrlEncode(BaseUserControl.RequestString("Title"));
         this.m_floorNumber++;
         label6.Text = CommentPKZone.GetPKCount(dataItem.CommentId, 1).ToString();
         label7.Text = CommentPKZone.GetPKCount(dataItem.CommentId, -1).ToString();
         label8.Text = CommentPKZone.GetPKCount(dataItem.CommentId, 0).ToString();
         label.Text  = "第<span style='color:Red'>" + this.m_floorNumber.ToString() + "</span>楼";
         if (!string.IsNullOrEmpty(dataItem.UserFace))
         {
             image.Width    = Unit.Pixel(80);
             image.ImageUrl = DataSecurity.UrlEncode(dataItem.UserFace);
         }
         else
         {
             image.Width    = Unit.Pixel(80);
             image.Height   = Unit.Pixel(90);
             image.ImageUrl = this.Path + "/Images/Comment/01.gif";
         }
         Label label15 = e.Item.FindControl("LblContent") as Label;
         label15.Text = dataItem.Content;
         label2.Text  = "信息:" + dataItem.PassedItems;
         if (SiteConfig.SiteOption.EnablePointMoneyExp)
         {
             label3.Text   = "积分:" + dataItem.UserExp;
             label3.EndTag = "<br/>";
         }
         label4.Text = "时间:" + dataItem.UserRegTime.ToString("yyyy-MM-dd");
         if (!dataItem.ReplyIsPrivate && !string.IsNullOrEmpty(dataItem.Reply))
         {
             StringBuilder builder = new StringBuilder();
             builder.Append("<table class='Reply' cellspacing='0' cellpadding='6' width='95%' border='0'>");
             builder.Append("<tr>");
             builder.Append("  <td class='ReplyAdminTd' >");
             builder.Append("    <span class='ReplyAdmin'>管理员回复</span>:<br/>");
             StringBuilder builder2 = new StringBuilder();
             builder2.Append("<br/>");
             builder2.Append("<p align='right'>" + dataItem.ReplyDateTime.ToString() + "</span>");
             builder2.Append("</td>");
             builder2.Append("</tr>");
             builder2.Append("</table>");
             label5.BeginTag = builder.ToString();
             label5.Text     = dataItem.Reply;
             label5.EndTag   = builder2.ToString();
         }
         label9.Text  = " <a href='../Contents/CommentPKZoneManage.aspx?" + str.ToString() + "'> PK Zone</a>";
         label10.Text = " <a href='../Contents/CommentPKZoneManage.aspx?" + str.ToString() + "' onkeydown=\"return Agree(event);\" onmouseover=\"PopupArea(event, 'Agree" + dataItem.CommentId.ToString() + "')\" onmouseout = \"jsAreaMouseOut(event)\"> 支持</a>";
         label11.Text = " <a href='../Contents/CommentPKZoneManage.aspx?" + str.ToString() + "' onkeydown=\"return Oppose(event);\" onmouseover=\"PopupArea(event, 'Oppose" + dataItem.CommentId.ToString() + "')\" onmouseout = \"jsAreaMouseOut(event)\"> 反对</a>";
         label12.Text = " <a href='../Contents/CommentExcerpt.aspx?" + str.ToString() + "'> 信息引用</a>";
         label13.Text = " <a href='../Contents/CommentRestore.aspx?" + str.ToString() + "'> 回复</a>";
         if (!string.IsNullOrEmpty(PEContext.Current.Admin.UserName))
         {
             label14.Text = "<a href='" + this.ViewFile + "?Action=Delete&" + str + "' onclick=\"return confirm('确定要删除此评论吗?');\">删除</a>";
             Label label16 = e.Item.FindControl("LblAuditing") as Label;
             if (dataItem.Status)
             {
                 label16.Text = "<span style='color:green'><a href='" + BaseUserControl.AppendSecurityCode(this.ViewFile + "?Action=UnAudited&" + str) + "'>取消审核</a></span>";
             }
             else
             {
                 label16.Text = "<span style='color:blue'><a href='" + BaseUserControl.AppendSecurityCode(this.ViewFile + "?Action=Audited&" + str) + "'>通过审核</a></span>";
             }
             Label label17 = e.Item.FindControl("LblIsElite") as Label;
             if (dataItem.IsElite)
             {
                 label17.Text = "<span style='color:green'><a href='" + BaseUserControl.AppendSecurityCode(this.ViewFile + "?Action=UnPremier&" + str) + "'>取消精华</a></span>";
             }
             else
             {
                 label17.Text = "<span style='color:blue'><a href='" + BaseUserControl.AppendSecurityCode(this.ViewFile + "?Action=Premier&" + str) + "'>设置为精华</a></span>";
             }
         }
     }
 }
        private void BindData()
        {
            IList <SourceInfo> list = Source.GetSourceList((this.Pager.CurrentPageIndex - 1) * this.Pager.PageSize, this.Pager.PageSize, 0, this.TxtSource.Text, BaseUserControl.RequestString("type"), true);

            this.Pager.RecordCount    = Source.GetTotalOfSource(0, this.TxtSource.Text, BaseUserControl.RequestString("type"));
            this.Pager.PageSize       = 10;
            this.RptSource.DataSource = list;
            this.RptSource.DataBind();
        }