當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。