⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 constrclass_up.aspx.cs

📁 最好用的站点内容管理系统 全部源代码都有
💻 CS
字号:
//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NetCMS.Content;

public partial class user_ConstrClass_up : NetCMS.Web.UI.UserPage
{
    Constr con = new Constr();
    /// <summary>
    /// 初始化
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    /// 
    #region 初始化
    protected void Page_Load(object sender, EventArgs e)
    {
        
        Response.CacheControl = "no-cache";
        if (!IsPostBack)
        {
            string Ccids = Request.QueryString["Ccid"];
            DataTable dt = con.sel_ConstrInfo(Ccids,4);
            int cut = dt.Rows.Count;
            cNameBox.Text = dt.Rows[0]["cName"].ToString();
            ContentBox.Text = dt.Rows[0]["Content"].ToString();
            if (cut==0)
            {
                PageError("对不起参数错误", "");
            }
        }
    }
    #endregion
    /// <summary>
    /// 修改数据
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    /// 
    #region 修改数据
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            string Ccid1 =Request.QueryString["Ccid"];
            string cName = NetCMS.Common.Input.Htmls(Request.Form["cNameBox"].ToString());
            string Content = NetCMS.Common.Input.Htmls(Request.Form["ContentBox"].ToString());
            NetCMS.Model.STConstrClass stcn;
            stcn.cName = cName;
            stcn.Content = Content;

            if (con.update_conStrClass(stcn, Ccid1) != 0)
            { 
                PageRight("修改成功","ConstrClass.aspx");
            }
                else
            {
                PageError("修改失败<br>", "ConstrClass.aspx");
            }       
        }
    }
    #endregion
    /// <summary>
    /// 页面转向
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    /// 
    #region 页面转向
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("ConstrClass.aspx");
    }
    #endregion
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -