当前位置: 首页>>代码示例>>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;未经允许,请勿转载。