• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# BLL.article类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: get_article_content

 /// <summary>
 /// 根据调用标识取得内容
 /// </summary>
 /// <param name="call_index">调用别名</param>
 /// <returns>String</returns>
 protected string get_article_content(string call_index)
 {
     if (string.IsNullOrEmpty(call_index))
         return string.Empty;
     BLL.article bll = new BLL.article();
     if (bll.Exists(call_index))
     {
         return bll.GetModel(call_index).content;
     }
     return string.Empty;
 }
开发者ID:wangjinfang,项目名称:DTCMS,代码行数:16,代码来源:article.cs


示例17: get_article_list

 /// <summary>
 /// 文章分页列表
 /// </summary>
 /// <param name="channel_name">频道名称</param>
 /// <param name="category_id">分类ID</param>
 /// <param name="page_index">当前页码</param>
 /// <param name="strwhere">查询条件</param>
 /// <param name="totalcount">总记录数</param>
 /// <param name="_key">URL配置名称</param>
 /// <param name="_params">传输参数</param>
 /// <returns>DataTable</returns>
 protected DataTable get_article_list(string channel_name, int category_id, int page_index, string strwhere, out int totalcount, out string pagelist, string _key, params object[] _params)
 {
     DataTable dt = new DataTable();
     int pagesize;
     if (!string.IsNullOrEmpty(channel_name))
     {
         dt = new BLL.article().GetList(channel_name, category_id, page_index, strwhere, "sort_id asc,add_time desc", out totalcount, out pagesize).Tables[0];
         pagelist = Utils.OutPageList(pagesize, page_index, totalcount, linkurl(_key, _params), 8);
     }
     else
     {
         totalcount = 0;
         pagelist = "";
     }
     return dt;
 }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:27,代码来源:article.cs


示例18: get_prevandnext_article

 /// <summary>
 /// 获取上一条下一条的链接
 /// </summary>
 /// <param name="urlkey">urlkey</param>
 /// <param name="type">-1代表上一条,1代表下一条</param>
 /// <param name="defaultvalue">默认文本</param>
 /// <param name="callIndex">是否使用别名,0使用ID,1使用别名</param>
 /// <returns>A链接</returns>
 protected string get_prevandnext_article(string urlkey, int type, string defaultvalue, int callIndex)
 {
     string symbol = (type == -1 ? "<" : ">");
     BLL.article bll = new BLL.article();
     string str = string.Empty;
     str = " and category_id=" + model.category_id;
     DataSet ds = bll.GetList(1, "channel_id=" + model.channel_id + " " + str + " and status=0 and Id" + symbol + id, "id desc");
     if (ds == null || ds.Tables[0].Rows.Count <= 0)
     {
         return defaultvalue;
     }
     if (callIndex == 1 && !string.IsNullOrEmpty(ds.Tables[0].Rows[0]["call_index"].ToString()))
     {
         return "<a href=\"" + linkurl(urlkey, ds.Tables[0].Rows[0]["call_index"].ToString()) + "\">" + ds.Tables[0].Rows[0]["title"] + "</a>";
     }
     return "<a href=\"" + linkurl(urlkey, ds.Tables[0].Rows[0]["id"].ToString()) + "\">" + ds.Tables[0].Rows[0]["title"] + "</a>";
 }
开发者ID:yi724926089,项目名称:MyWx,代码行数:25,代码来源:article_show.cs


示例19: GetList

        /// <summary>
        /// 获得购物车列表
        /// </summary>
        public static IList<Model.cart_items> GetList(int group_id)
        {
            IDictionary<string, int> dic = GetCart();
            if (dic != null)
            {
                IList<Model.cart_items> iList = new List<Model.cart_items>();

                foreach (var item in dic)
                {
                    BLL.article bll = new BLL.article();
                    Model.article model = bll.GetModel(Convert.ToInt32(item.Key));
                    if (model == null || !model.fields.ContainsKey("sell_price"))
                    {
                        continue;
                    }
                    Model.cart_items modelt = new Model.cart_items();
                    modelt.id = model.id;
                    modelt.title = model.title;
                    modelt.img_url = model.img_url;
                    if (model.fields.ContainsKey("point"))
                    {
                        modelt.point = Utils.StrToInt(model.fields["point"], 0);
                    }
                    modelt.price = Utils.StrToDecimal(model.fields["sell_price"], 0);
                    modelt.user_price = Utils.StrToDecimal(model.fields["sell_price"], 0);
                    if (model.fields.ContainsKey("stock_quantity"))
                    {
                        modelt.stock_quantity = Utils.StrToInt(model.fields["stock_quantity"], 0);
                    }
                    //会员价格
                    if (model.group_price != null)
                    {
                        Model.user_group_price gmodel = model.group_price.Find(p => p.group_id == group_id);
                        if (gmodel != null)
                        {
                            modelt.user_price = gmodel.price;
                        }
                    }
                    modelt.quantity = item.Value;
                    iList.Add(modelt);
                }
                return iList;
            }
            return null;
        }
开发者ID:LutherW,项目名称:MTMS,代码行数:48,代码来源:ShoppingCart.cs


示例20: get_content_list

 /// <summary>
 /// 内容列表
 /// </summary>
 /// <param name="channel_id">频道ID</param>
 /// <param name="top">显示条数</param>
 /// <param name="strwhere">查询条件</param>
 /// <returns>DataTable</returns>
 protected DataTable get_content_list(int channel_id, int category_id, int top, string strwhere)
 {
     DataTable dt = new DataTable();
     if (channel_id > 0)
     {
         string _where = "channel_id=" + channel_id;
         if (category_id > 0)
         {
             _where += " and category_id in(select id from dt_category where channel_id=" + channel_id + " and class_list like '%," + category_id + ",%')";
         }
         if (!string.IsNullOrEmpty(strwhere))
         {
             _where += " and " + strwhere;
         }
         dt = new BLL.article().GetContentList(top, _where, "sort_id asc,add_time desc").Tables[0];
     }
     return dt;
 }
开发者ID:egojit,项目名称:B2C,代码行数:25,代码来源:article_content.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BLL.manager类代码示例发布时间:2022-05-24
下一篇:
C# BLL类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap