コード例 #1
0
        private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby)
        {
            this.page = Globals.RequestQueryNum("page");
            if (this.page == 0)
            {
                this.page = 1;
            }

            this.txtKeywords.Text = this.keywords;
            //图表或列表显示
            BLL.article bll = new BLL.article();
            DataSet     ds  = bll.GetWCodeList(this.wid, _channel_id, _category_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                int     cout = ds.Tables[0].Rows.Count;
                for (int i = 0; i < cout; i++)
                {
                    dr             = ds.Tables[0].Rows[i];
                    dr["link_url"] = SFUtils.getWebSite() + "/content.aspx?wid=" + SFUtils.ObjectToStr(dr["wid"]) + "&aid=" + dr["id"].ToString();
                }
                ds.AcceptChanges();
            }
            this.rptList1.DataSource = ds;
            this.rptList1.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = SFUtils.CombUrlTxt("article_page_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
                                                _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = SFUtils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
コード例 #2
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("manager_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount   = 0;
            int errorCount = 0;

            SF.BLL.manager bll = new SF.BLL.manager();
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount += 1;
                    }
                    else
                    {
                        errorCount += 1;
                    }
                }
            }
            AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除商户" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", SFUtils.CombUrlTxt("business_list.aspx", "keywords={0}", this.keywords));
        }
コード例 #3
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("channel_" + this.channel_name + "_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount   = 0;                                                                            //成功数量
            int errorCount = 0;                                                                            //失败数量

            BLL.article bll     = new BLL.article();
            Repeater    rptList = new Repeater();

            rptList = this.rptList1;

            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount++;
                    }
                    else
                    {
                        errorCount++;
                    }
                }
            }
            AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "删除" + this.channel_name + "单页内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", SFUtils.CombUrlTxt("article_page_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                                                                          this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
        }
コード例 #4
0
        private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby)
        {
            this.page = Globals.RequestQueryNum("page");
            if (this.page == 0)
            {
                this.page = 1;
            }
            if (this.category_id > 0)
            {
                this.ddlCategoryId.SelectedValue = _category_id.ToString();
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            //图表或列表显示
            BLL.article bll = new BLL.article();
            this.rptList2.DataSource = bll.GetWCodeList(this.wid, _channel_id, _category_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList2.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = SFUtils.CombUrlTxt("photoHdp_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
                                                _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = SFUtils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
コード例 #5
0
        //保存排序
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("articlemgr", DTEnums.ActionEnum.Edit.ToString()); //检查权限
            BLL.article bll     = new BLL.article();
            Repeater    rptList = new Repeater();

            switch (this.prolistview)
            {
            case "Txt":
                rptList = this.rptList1;
                break;

            default:
                rptList = this.rptList2;
                break;
            }
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                int sortId;
                if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
                {
                    sortId = 99;
                }
                bll.UpdateField(id, "sort_id=" + sortId.ToString());
            }
            AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "保存" + this.channel_name + "频道内容排序"); //记录日志
            JscriptMsg("保存排序成功啦!", SFUtils.CombUrlTxt("wx_article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                                      this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
        }
コード例 #6
0
        //设置分页数量
        protected void txtPageNum_TextChanged(object sender, EventArgs e)
        {
            int _pagesize;

            if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
            {
                if (_pagesize > 0)
                {
                    SFUtils.WriteCookie("manager_page_size", "DTcmsPage", _pagesize.ToString(), 14400);
                }
            }
            Response.Redirect(SFUtils.CombUrlTxt("business_list.aspx", "keywords={0}", this.keywords));
        }
コード例 #7
0
        private void RptBind(string _strWhere, string _orderby, ManagerInfo model)
        {
            this.page        = DTRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            SF.BLL.manager bll = new SF.BLL.manager();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = SFUtils.CombUrlTxt("business_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = SFUtils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
コード例 #8
0
        //设置分页数量
        protected void txtPageNum_TextChanged(object sender, EventArgs e)
        {
            int _pagesize;

            if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
            {
                if (_pagesize > 0)
                {
                    SFUtils.WriteCookie("wx_article_page_size", _pagesize.ToString(), 43200);
                }
            }
            Response.Redirect(SFUtils.CombUrlTxt("wx_article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                                 this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property));
        }
コード例 #9
0
 //删除类别
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("fenlei", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     BLL.article_category bll = new BLL.article_category();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.Delete(id);
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "删除" + this.channel_name + "微网站分类数据"); //记录日志
     JscriptMsg("删除数据成功!", SFUtils.CombUrlTxt("wx_category_list.aspx", "channel_id={0}", this.channel_id.ToString()), "Success");
 }
コード例 #10
0
 //保存排序
 protected void btnSave_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("fenlei", DTEnums.ActionEnum.Edit.ToString()); //检查权限
     BLL.article_category bll = new BLL.article_category();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "保存" + this.channel_name + "微网站分类排序"); //记录日志
     JscriptMsg("保存排序成功!", SFUtils.CombUrlTxt("wx_category_list.aspx", "channel_id={0}", this.channel_id.ToString()), "Success");
 }
コード例 #11
0
 //审核
 protected void btnAudit_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("channel_" + this.channel_name + "_comment", DTEnums.ActionEnum.Audit.ToString()); //检查权限
     BLL.article_comment bll = new BLL.article_comment();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.UpdateField(id, "is_lock=0");
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Audit.ToString(), "审核" + this.channel_name + "频道评论信息"); //记录日志
     JscriptMsg("审核通过成功!", SFUtils.CombUrlTxt("comment_list.aspx", "channel_id={0}&keywords={1}&property={2}",
                                              this.channel_id.ToString(), this.keywords, this.property), "Success");
 }
コード例 #12
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = Globals.RequestQueryNum("page");
            if (this.page == 0)
            {
                this.page = 1;
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            BLL.article_comment bll = new BLL.article_comment();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = SFUtils.CombUrlTxt("comment_list.aspx", "channel_id={0}&keywords={1}&property={2}&page={3}",
                                                this.channel_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = SFUtils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
コード例 #13
0
 //筛选类别
 protected void ddlCategoryId_SelectedIndexChanged(object sender, EventArgs e)
 {
     Response.Redirect(SFUtils.CombUrlTxt("photoHdp_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                          this.channel_id.ToString(), ddlCategoryId.SelectedValue, this.keywords, this.property));
 }
コード例 #14
0
 //关健字查询
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     Response.Redirect(SFUtils.CombUrlTxt("wx_article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                          this.channel_id.ToString(), this.category_id.ToString(), txtKeywords.Text, this.property));
 }
コード例 #15
0
 //关健字查询
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     Response.Redirect(SFUtils.CombUrlTxt("business_list.aspx", "keywords={0}", txtKeywords.Text));
 }
コード例 #16
0
 //筛选属性
 protected void ddlProperty_SelectedIndexChanged(object sender, EventArgs e)
 {
     Response.Redirect(SFUtils.CombUrlTxt("wx_article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                          this.channel_id.ToString(), this.category_id.ToString(), this.keywords, ddlProperty.SelectedValue));
 }
コード例 #17
0
 //设置图文列表显示
 protected void lbtnViewImg_Click(object sender, EventArgs e)
 {
     SFUtils.WriteCookie("wx_article_list_view", "Img", 14400);
     Response.Redirect(SFUtils.CombUrlTxt("wx_article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
                                          this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, this.page.ToString()));
 }
コード例 #18
0
        private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby)
        {
            this.page = Globals.RequestQueryNum("page");
            if (this.page == 0)
            {
                this.page = 1;
            }
            if (this.category_id > 0)
            {
                this.ddlCategoryId.SelectedValue = _category_id.ToString();
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            //图表或列表显示
            BLL.article bll   = new BLL.article();
            DataSet     artDs = bll.GetWCodeList(this.wid, _channel_id, _category_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            //url链接地址处理
            if (artDs != null && artDs.Tables.Count > 0 && artDs.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                int     count = artDs.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = artDs.Tables[0].Rows[i];
                    string linkUrl = SFUtils.ObjectToStr(dr["link_url"]);

                    if (linkUrl.Length > 0)
                    {
                        //外链地址
                        dr["link_url"] = "<span class=\"lianjie_wai\">[外]</span>" + " <a href=\"javascript:;\">" + linkUrl + "</a>";
                    }
                    else
                    {
                        dr["link_url"] = "<span class=\"lianjie_ben\">[本]</span>" + " <a href=\"javascript:;\">" + SFUtils.getWebSite() + "/detail.aspx?wid=" + SFUtils.ObjectToStr(dr["wid"]) + "&aid=" + dr["id"] + "</a>";
                    }
                }
                artDs.AcceptChanges();
            }

            switch (this.prolistview)
            {
            case "Img":
                this.rptList1.Visible    = false;
                this.rptList2.DataSource = artDs;
                this.rptList2.DataBind();
                SFUtils.WriteCookie("wx_article_list_view", "Img", 14400);
                break;

            default:
                this.rptList2.Visible    = false;
                this.rptList1.DataSource = artDs;
                this.rptList1.DataBind();
                SFUtils.WriteCookie("wx_article_list_view", "Txt", 14400);
                break;
            }
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = SFUtils.CombUrlTxt("wx_article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
                                                _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = SFUtils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }