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

📄 constraccount_add.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_Constraccount_add : 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";  //清除缓存
        string UserNum = NetCMS.Global.Current.UserNum;
        int cut = con.sel_conStrCount(UserNum,0);
        if (cut > 0)
        {
            PageError("对不起不能在设置了一个账号只能设置一个", "Constraccount.aspx");
        }
    }
    #endregion
    //设置账号
    /// <summary>
    /// 设置账号
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    #region 设置账号
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            string address = NetCMS.Common.Input.Htmls(Request.Form["addressBox"].ToString());
            string postcode = NetCMS.Common.Input.Htmls(Request.Form["postcodeBox"].ToString());
            string RealName = NetCMS.Common.Input.Htmls(Request.Form["RealNameBox"].ToString());
            string bankName = NetCMS.Common.Input.Htmls(Request.Form["bankNameBox"].ToString());
            string bankaccount = NetCMS.Common.Input.Htmls(Request.Form["bankaccountBox"].ToString());
            string bankcard = NetCMS.Common.Input.Htmls(Request.Form["bankcardBox"].ToString());
            string bankRealName = NetCMS.Common.Input.Htmls(Request.Form["bankRealNameBox"].ToString());
            string UserNum = NetCMS.Global.Current.UserNum;
            NetCMS.Model.STuserother stcn;
            stcn.address = address;
            stcn.postcode = postcode;
            stcn.RealName = RealName;
            stcn.bankName = bankName;
            stcn.bankaccount = bankaccount;
            stcn.bankcard = bankcard;
            stcn.bankRealName = bankRealName;
            if (con.add_sysUserOther(stcn, UserNum) == 0)
            {
                PageError("添加失败<br>", "Constraccount.aspx");
            }
            else
            {
                PageRight("添加成功", "Constraccount.aspx");
            }
        }
    }
    #endregion
}


⌨️ 快捷键说明

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