當前位置: 首頁>>代碼示例>>C#>>正文


C# BLL.article.UpdateField方法代碼示例

本文整理匯總了C#中BLL.article.UpdateField方法的典型用法代碼示例。如果您正苦於以下問題:C# BLL.article.UpdateField方法的具體用法?C# BLL.article.UpdateField怎麽用?C# BLL.article.UpdateField使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BLL.article的用法示例。


在下文中一共展示了BLL.article.UpdateField方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: 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

示例3: 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

示例4: ShowPage

 /// <summary>
 /// 重寫虛方法,此方法將在Init事件前執行
 /// </summary>
 protected override void ShowPage()
 {
     id = DTRequest.GetQueryInt("id");
     BLL.article bll = new BLL.article();
     if (!bll.Exists(id))
     {
         HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出錯啦,您要瀏覽的頁麵不存在或已刪除啦!"));
         return;
     }
     model = bll.GetGoodsModel(id);
     //瀏覽數+1
     bll.UpdateField(id, "click=click+1");
     //跳轉URL
     if (model.link_url != null)
         model.link_url = model.link_url.Trim();
     if (!string.IsNullOrEmpty(model.link_url))
     {
         HttpContext.Current.Response.Redirect(model.link_url);
     }
 }
開發者ID:egojit,項目名稱:B2C,代碼行數:23,代碼來源:goods_show.cs

示例5: btnSave_Click

        //保存排序
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("channel_" + this.channel_name + "_list", MXEnums.ActionEnum.Edit.ToString()); //檢查權限
            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);
                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(MXEnums.ActionEnum.Edit.ToString(), "保存" + this.channel_name + "頻道內容排序"); //記錄日誌
            JscriptMsg("保存排序成功啦!", 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,代碼行數:22,代碼來源:article_page_list.aspx.cs

示例6: ShowPage

 /// <summary>
 /// 重寫虛方法,此方法將在Init事件前執行
 /// </summary>
 protected override void ShowPage()
 {
     id = DTRequest.GetQueryInt("id");
     page = DTRequest.GetQueryString("page");
     BLL.article bll = new BLL.article();
     BLL.sys_channel bll_channel = new BLL.sys_channel();
     if (id > 0)
     {
         if (!bll.Exists(id))
         {
             HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出錯啦,您要瀏覽的頁麵不存在或已刪除啦!"));
             return;
         }
         model = bll.GetContentModel(id);
     }
     else if (!string.IsNullOrEmpty(page))
     {
         if (!bll.ContentExists(page))
         {
             HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出錯啦,您要瀏覽的頁麵不存在或已刪除啦!"));
             return;
         }
         model = bll.GetContentModel(page);
     }
     else
     {
         Server.Transfer("error.aspx");
         return;
     }
     //瀏覽數+1
     bll.UpdateField(model.id, "click=click+1");
     //跳轉URL
     if (model.link_url != null)
         model.link_url = model.link_url.Trim();
     if (!string.IsNullOrEmpty(model.link_url))
     {
         HttpContext.Current.Response.Redirect(model.link_url);
     }
     channel = bll_channel.GetModel(model.channel_id);
 }
開發者ID:sichina,項目名稱:or-dtcms2.0,代碼行數:43,代碼來源:content_show.cs

示例7: rptList_ItemCommand

 //設置操作
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     ChkAdminLevel("channel_" + this.channel_name + "_list", DTEnums.ActionEnum.Edit.ToString()); //檢查權限
     int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value);
     BLL.article bll = new BLL.article();
     Model.article model = bll.GetModel(id);
     switch (e.CommandName)
     {
         case "lbtnIsMsg":
             if (model.is_msg == 1)
                 bll.UpdateField(id, "is_msg=0");
             else
                 bll.UpdateField(id, "is_msg=1");
             break;
         case "lbtnIsTop":
             if (model.is_top == 1)
                 bll.UpdateField(id, "is_top=0");
             else
                 bll.UpdateField(id, "is_top=1");
             break;
         case "lbtnIsRed":
             if (model.is_red == 1)
                 bll.UpdateField(id, "is_red=0");
             else
                 bll.UpdateField(id, "is_red=1");
             break;
         case "lbtnIsHot":
             if (model.is_hot == 1)
                 bll.UpdateField(id, "is_hot=0");
             else
                 bll.UpdateField(id, "is_hot=1");
             break;
         case "lbtnIsSlide":
             if (model.is_slide == 1)
                 bll.UpdateField(id, "is_slide=0");
             else
                 bll.UpdateField(id, "is_slide=1");
             break;
     }
     this.RptBind(this.channel_id, this.category_id, "id>0" + CombSqlTxt(this.keywords, this.property), "sort_id asc,add_time desc,id desc");
 }
開發者ID:sfwjiao,項目名稱:MyTestProject,代碼行數:42,代碼來源:article_list.aspx.cs

示例8: view_article_click

 private void view_article_click(HttpContext context)
 {
     int article_id = DTRequest.GetInt("id", 0);
     int click = DTRequest.GetInt("click", 0);
     int hide = DTRequest.GetInt("hide", 0);
     int count = 0;
     if (article_id > 0)
     {
         BLL.article bll = new BLL.article();
         count = bll.GetClick(article_id);
         if (click > 0)
         {
             bll.UpdateField(article_id, "click=click+1");
         }
     }
     if (hide == 0)
     {
         context.Response.Write("document.write('" + count + "');");
     }
 }
開發者ID:silverdan,項目名稱:ahxrmyy2.0,代碼行數:20,代碼來源:submit_ajax.ashx.cs

示例9: digg_article_add

 //資訊模塊
 private void digg_article_add(HttpContext context)
 {
     string channel_type = DTRequest.GetFormString("channel_type");
     string digg_type = DTRequest.GetFormString("digg_type");
     int id = DTRequest.GetFormInt("id");
     BLL.article bll = new BLL.article();
     if (!bll.Exists(id))
     {
         context.Response.Write("{msg:0, msgbox:\"信息不存在或已刪除!\"}");
         return;
     }
     if (digg_type == "good")
     {
         bll.UpdateField(id, "digg_good=digg_good+1");
     }
     else
     {
         bll.UpdateField(id, "digg_act=digg_act+1");
     }
     Model.article model = bll.GetModel(id);
     context.Response.Write("{msg:1, digggood:" + model.digg_good + ", diggact:" + model.digg_act + ", msgbox:\"成功頂或踩了一下!\"}");
     Utils.WriteCookie(DTKeys.COOKIE_DIGG_KEY, channel_type + id.ToString(), id.ToString(), 8640);
     return;
 }
開發者ID:SihengWang,項目名稱:CorporateWebsite,代碼行數:25,代碼來源:submit_ajax.ashx.cs

示例10: LinkButton2_Click

 protected void LinkButton2_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();
     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, "is_put=1");
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "上架" + this.channel_name + "頻道內容成功" + sucCount + "條,失敗" + errorCount + "條"); //記錄日誌
     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), "Success");
 }
開發者ID:wangjinfang,項目名稱:DTCMS,代碼行數:29,代碼來源:article_list.aspx.cs

示例11: ddlMoveId_SelectedIndexChanged

 //批量移動
 protected void ddlMoveId_SelectedIndexChanged(object sender, EventArgs e)
 {
     ChkAdminLevel("channel_" + this.channel_name + "_list", DTEnums.ActionEnum.Edit.ToString()); //檢查權限
     int sucCount = 0; //成功數量
     if (ddlMoveId.SelectedValue == "")
     {
         ddlMoveId.SelectedIndex = 0;
         JscriptMsg("請選擇要移動的類別!", string.Empty);
         return;
     }
     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)
         {
             sucCount++;
             bll.UpdateField(id, "category_id=" + ddlMoveId.SelectedValue);
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "批量移動" + this.channel_name + "頻道內容分類"); //記錄日誌
     JscriptMsg("批量移動成功" + sucCount + "條", 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:503945930,項目名稱:qknow-site,代碼行數:36,代碼來源:article_list.aspx.cs


注:本文中的BLL.article.UpdateField方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。