Exemplo n.º 1
0
        //批次刪除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel(channel_id, DTEnums.ActionEnum.Delete.ToString()); //檢查許可權
            BLL.article bll     = new BLL.article();
            Repeater    rptList = new Repeater();

            rptList = this.rptList1;
            switch (this.prolistview)
            {
            case "Txt":
                rptList = this.rptList1;
                break;
            }
            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);
                }
            }
            JscriptMsg("批次刪除成功!", Utils.CombUrlTxt("helper.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                                   this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
        }
Exemplo n.º 2
0
        //批次刪除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            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);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    bll.Delete(id);
                }
            }
            string Url = Utils.CombUrlTxt("list2.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                          this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property);

            this.Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('批次刪除成功');window.location.href='" + Url + "'</script>");
        }
Exemplo n.º 3
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("indexhdp", MXEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount   = 0;                                              //成功数量
            int errorCount = 0;                                              //失败数量

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

            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(MXEnums.ActionEnum.Edit.ToString(), "删除" + this.channel_name + "频道内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("photoHdp_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");
        }
Exemplo n.º 4
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel(channel_id, DTEnums.ActionEnum.Delete.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);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.Delete(id);
         }
     }
     JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("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");
 }
Exemplo n.º 5
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("channel_" + this.channel_name + "_list", MXEnums.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(MXEnums.ActionEnum.Edit.ToString(), "删除" + this.channel_name + "单页内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.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");
        }
Exemplo n.º 6
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("channel_" + this.channel_name + "_recycle", DTEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount   = 0;                                                                               //成功数量
            int errorCount = 0;                                                                               //失败数量

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

            //获取站点信息
            Model.channel_site site = new BLL.channel_site().GetSiteModel(this.channel_id);
            //循环删除
            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)
                {
                    Model.article model = bll.GetModel(id);
                    if (null != model)
                    {
                        if (bll.Delete(id))
                        {
                            sucCount++;
                            //是否开启百度推送
                            if (site.bdsend == 1 && !string.IsNullOrEmpty(site.bdtoken))
                            {
                                string url = get_url_rewrite(channel_name, "detail", model.call_index, model.id);
                                if (!string.IsNullOrEmpty(url))
                                {
                                    if (string.IsNullOrEmpty(site.domain))
                                    {
                                        url = siteConfig.weburl + url;
                                    }
                                    else
                                    {
                                        url = site.domain + url;
                                    }
                                    SeoHelper.BaiduDel(url, site.bdtoken);
                                }
                            }
                        }
                        else
                        {
                            errorCount++;
                        }
                    }
                    else
                    {
                        errorCount++;
                    }
                }
            }
            AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "删除" + this.channel_name + "频道内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("recycle_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                                                                        this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property));
        }
Exemplo n.º 7
0
 public void delSummary()
 {
     if (!string.IsNullOrEmpty(HttpContext.Current.Request.Form["Sid"]))
     {
         int         ID  = Utils.StringToNum(HttpContext.Current.Request.Form["Sid"]);
         BLL.article bll = new BLL.article();
         if (bll.Delete(ID))
         {
             HttpContext.Current.Response.Write("1");
         }
         else
         {
             HttpContext.Current.Response.Write("0");
         }
     }
 }
Exemplo n.º 8
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel(channel_id, ActionEnum.Delete.ToString()); //检查权限
     BLL.article bll = new BLL.article();
     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(this.channel_id, id);
         }
     }
     JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("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");
 }
Exemplo n.º 9
0
        //批次刪除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevelEdit("channel_goods", "Edit");
            //ChkAdminLevel("channel_" + this.channel_name + "_list", TWEnums.ActionEnum.Delete.ToString()); //檢查許可權
            int sucCount   = 0; //成功數量
            int errorCount = 0; //失敗數量

            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);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount++;
                    }
                    else
                    {
                        errorCount++;
                    }
                }
            }
            AddAdminLog(TWEnums.ActionEnum.Edit.ToString(), "刪除" + this.channel_name + "頻道內容成功" + sucCount + "條,失敗" + errorCount + "條"); //記錄日誌
            JscriptMsg("刪除成功" + sucCount + "條,失敗" + errorCount + "條!", Utils.CombUrlTxt("tuan_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&brand_id={4}",
                                                                                        this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, this.brand_id.ToString()));
        }
Exemplo n.º 10
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel(pageLevelName, MXEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount   = 0;                                                 //成功数量
            int errorCount = 0;                                                 //失败数量

            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);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount++;
                    }
                    else
                    {
                        errorCount++;
                    }
                }
            }
            AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "删除" + pageLevelName + "内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt(thisPage, "category_id={0}&keywords={1}&property={2}&levelName={3}",
                                                                                        this.category_id.ToString(), this.keywords, this.property, pageLevelName), "Success");
        }