当前位置: 首页>>代码示例>>C#>>正文


C# BLL.article类代码示例

本文整理汇总了C#中BLL.article的典型用法代码示例。如果您正苦于以下问题:C# BLL.article类的具体用法?C# BLL.article怎么用?C# BLL.article使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BLL.article类属于命名空间,在下文中一共展示了BLL.article类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnDelete_Click

        //批量删除
        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");
        }
开发者ID:yi724926089,项目名称:MyWx,代码行数:30,代码来源:article_page_list.aspx.cs

示例2: ShowInfo

        private void ShowInfo(int _id)
        {
            BLL.article bll = new BLL.article();
            Model.article_content model = bll.GetContentModel(_id);

            ddlCategoryId.SelectedValue = model.category_id.ToString();
            txtCallIndex.Text = model.call_index;
            txtTitle.Text = model.title;
            txtImgUrl.Text = model.img_url;
            txtLinkUrl.Text = model.link_url;
            if (model.is_msg == 1)
            {
                cblItem.Items[0].Selected = true;
            }
            if (model.is_red == 1)
            {
                cblItem.Items[1].Selected = true;
            }
            if (model.is_lock == 1)
            {
                cblItem.Items[2].Selected = true;
            }
            txtSortId.Text = model.sort_id.ToString();
            txtClick.Text = model.click.ToString();
            txtDiggGood.Text = model.digg_good.ToString();
            txtDiggBad.Text = model.digg_bad.ToString();
            txtContent.Value = model.content;
            txtSeoTitle.Text = model.seo_title;
            txtSeoKeywords.Text = model.seo_keywords;
            txtSeoDescription.Text = model.seo_description;
        }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:31,代码来源:edit.aspx.cs

示例3: btnDelete_Click

 //批量删除
 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");
 }
开发者ID:egojit,项目名称:B2C,代码行数:27,代码来源:list.aspx.cs

示例4: btnAudit_Click

 //批量审核
 protected void btnAudit_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("channel_" + this.channel_name + "_list", DTEnums.ActionEnum.Audit.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.UpdateField(id, "status=0");
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Audit.ToString(), "审核" + this.channel_name + "频道内容信息"); //记录日志
     JscriptMsg("批量审核成功!", Utils.CombUrlTxt("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));
 }
开发者ID:sfwjiao,项目名称:MyTestProject,代码行数:28,代码来源:article_list.aspx.cs

示例5: btnSave_Click

 //保存排序
 protected void btnSave_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);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     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");
 }
开发者ID:egojit,项目名称:B2C,代码行数:27,代码来源:list.aspx.cs

示例6: get_search_list

        protected int totalcount; //OUT数据总数

        #endregion Fields

        #region Methods

        /// <summary>
        /// 查询数据
        /// </summary>
        protected DataTable get_search_list(int _pagesize, out int _totalcount)
        {
            //创建一个DataTable
            DataTable dt = new DataTable();
            dt.Columns.Add("id", Type.GetType("System.Int32"));
            dt.Columns.Add("title", Type.GetType("System.String"));
            dt.Columns.Add("remark", Type.GetType("System.String"));
            dt.Columns.Add("channel_id", Type.GetType("System.String"));
            dt.Columns.Add("link_url", Type.GetType("System.String"));
            dt.Columns.Add("add_time", Type.GetType("System.String"));
            dt.Columns.Add("img_url", Type.GetType("System.String"));
            //创建一个DataSet,判断是使用Tags还是关健字查询
            DataSet ds = new BLL.article().GetSearch(channel, _pagesize, page, "(title like '%" + keyword + "%' or zhaiyao like '%" + keyword + "%')", "add_time desc,id desc", out _totalcount);
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    DataRow dr1 = ds.Tables[0].Rows[i];
                    string link_url = get_url_rewrite(Utils.StrToInt(dr1["channel_id"].ToString(), 0), dr1["call_index"].ToString(), Utils.StrToInt(dr1["id"].ToString(), 0));
                    if (!string.IsNullOrEmpty(link_url))
                    {
                        DataRow dr = dt.NewRow();
                        dr["id"] = dr1["id"]; //自增ID
                        dr["title"] = dr1["title"]; //标题
                        dr["remark"] = dr1["zhaiyao"]; //摘要
                        dr["link_url"] = link_url; //链接地址
                        dr["add_time"] = dr1["add_time"]; //发布时间
                        dr["channel_id"] = dr1["channel_id"]; //频道ID
                        dr["img_url"] = dr1["img_url"]; //发布时间
                        dt.Rows.Add(dr);
                    }
                }
            }
            return dt;
        }
开发者ID:rockhe168,项目名称:CMS,代码行数:44,代码来源:search.cs

示例7: RptBind

        private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();

            this.page = MXRequest.GetQueryInt("page", 1);
           
            this.txtKeywords.Text = this.keywords;
            //图表或列表显示
            BLL.article bll = new BLL.article();
            DataSet ds = bll.GetWCodeList(weixin.id, _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"] = MyCommFun.getWebSite() + "/content.aspx?wid=" +MyCommFun.ObjToStr(dr["wid"])  + "&aid=" + dr["id"].ToString();
                   
                }
                ds.AcceptChanges();
            }
            this.rptList1.DataSource = ds;
            this.rptList1.DataBind();
                    
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.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 = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:31,代码来源:article_page_list.aspx.cs

示例8: RptBind

 private void RptBind(string _strWhere, string _orderby)
 {
     this.page = DTRequest.GetQueryInt("page", 1);
     if (this.category_id > 0)
     {
         this.ddlCategoryId.SelectedValue = this.category_id.ToString();
     }
     this.ddlProperty.SelectedValue = this.property;
     this.txtKeywords.Text = this.keywords;
     //图表或列表显示
     BLL.article bll = new BLL.article();
     switch (this.prolistview)
     {
         case "Txt":
             this.rptList2.Visible = false;
             this.rptList1.DataSource = bll.GetGoodsList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
             this.rptList1.DataBind();
             break;
         default:
             this.rptList1.Visible = false;
             this.rptList2.DataSource = bll.GetGoodsList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
             this.rptList2.DataBind();
             break;
     }
     //绑定页码
     txtPageNum.Text = this.pageSize.ToString();
     string pageUrl = Utils.CombUrlTxt("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, "__id__");
     PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
 }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:30,代码来源:list.aspx.cs

示例9: ShowInfo

        private void ShowInfo(int _id)
        {
            BLL.article bll = new BLL.article();
            Model.article_download model = bll.GetDownloadModel(_id);

            ddlCategoryId.SelectedValue = model.category_id.ToString();
            txtTitle.Text = model.title;
            txtImgUrl.Text = model.img_url;
            txtLinkUrl.Text = model.link_url;
            if (model.is_msg == 1)
            {
                cblItem.Items[0].Selected = true;
            }
            if (model.is_red == 1)
            {
                cblItem.Items[1].Selected = true;
            }
            if (model.is_lock == 1)
            {
                cblItem.Items[2].Selected = true;
            }
            txtSortId.Text = model.sort_id.ToString();
            txtClick.Text = model.click.ToString();
            txtDiggGood.Text = model.digg_good.ToString();
            txtDiggBad.Text = model.digg_bad.ToString();
            txtContent.Value = model.content;
            txtSeoTitle.Text = model.seo_title;
            txtSeoKeywords.Text = model.seo_keywords;
            txtSeoDescription.Text = model.seo_description;
            //绑定附件
            rptAttach.DataSource = model.download_attachs;
            rptAttach.DataBind();
        }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:33,代码来源:edit.aspx.cs

示例10: ShowPage

 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     id = DTRequest.GetQueryInt("id", 0);
     BLL.article abll = new BLL.article();
     if (id > 0)
     {
         model = abll.GetModel(id);
         if (model == null)
         {
             HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错啦,您要浏览的页面不存在或已删除啦!")));
             return;
         }
         else
         {
             abll.UpdateField(model.id, "click=click+1");
         }
     }
     DataTable pre_dt = get_article_list("bangongfuwu", model.category_id, 1, "id<" + model.id, "sort_id asc");
     if (pre_dt.Rows.Count > 0)
     {
         preid = int.Parse(pre_dt.Rows[0]["id"].ToString());
     }
     DataTable next_dt = get_article_list("bangongfuwu", model.category_id, 1, "id>" + model.id, "sort_id asc");
     if (next_dt.Rows.Count > 0)
     {
         nextid = int.Parse(next_dt.Rows[0]["id"].ToString());
     }
 }
开发者ID:wangjinfang,项目名称:DTCMS,代码行数:31,代码来源:qyservicedetails.cs

示例11: get_article_list

 /// <summary>
 /// 文章列表
 /// </summary>
 /// <param name="channel_name">频道名称</param>
 /// <param name="category_id">分类ID</param>
 /// <param name="top">显示条数</param>
 /// <param name="strwhere">查询条件</param>
 /// <returns>DataTable</returns>
 protected DataTable get_article_list(string channel_name, int category_id, int top, string strwhere)
 {
     DataTable dt = new DataTable();
     if (!string.IsNullOrEmpty(channel_name))
     {
         dt = new BLL.article().GetList(channel_name, category_id, top, strwhere, "sort_id asc,add_time desc").Tables[0];
     }
     return dt;
 }
开发者ID:silverdan,项目名称:ahxrmyy2.0,代码行数:17,代码来源:article.cs

示例12: get_article_field

 /// <summary>
 /// 获取扩展字段的值
 /// </summary>
 /// <param name="article_id">内容ID</param>
 /// <param name="field_name">扩展字段名</param>
 /// <returns>String</returns>
 protected string get_article_field(int article_id, string field_name)
 {
     Model.article model = new BLL.article().GetModel(article_id);
     if (model != null && model.fields.ContainsKey(field_name))
     {
         return model.fields[field_name];
     }
     return string.Empty;
 }
开发者ID:wangjinfang,项目名称:DTCMS,代码行数:15,代码来源:article.cs

示例13: get_article_img_url

 /// <summary>
 /// 返回相应的图片
 /// </summary>
 /// <param name="article_id">信息ID</param>
 /// <returns>String</returns>
 protected string get_article_img_url(int article_id)
 {
     Model.article model = new BLL.article().GetModel(article_id);
     if (model != null)
     {
         return model.img_url;
     }
     return "";
 }
开发者ID:wangjinfang,项目名称:DTCMS,代码行数:14,代码来源:article.cs

示例14: get_goods_img_url

 /// <summary>
 /// 返回相应的商品图片
 /// </summary>
 /// <param name="goods_id">商品ID</param>
 /// <returns>String</returns>
 protected string get_goods_img_url(int goods_id)
 {
     Model.article_goods model = new BLL.article().GetGoodsModel(goods_id);
     if (model != null)
     {
         return model.img_url;
     }
     return "";
 }
开发者ID:imyandy,项目名称:DTcms_20_sql_src,代码行数:14,代码来源:article_goods.cs

示例15: ShowPage

 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     BLL.article bll = new BLL.article();
     model = bll.GetModel("about");
     if (model == null)
     {
         HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错啦,您要浏览的页面不存在或已删除啦!")));
         return;
     }
 }
开发者ID:wangjinfang,项目名称:DTCMS,代码行数:13,代码来源:about.cs


注:本文中的BLL.article类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。