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

📄 discussacti_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 manage_discussacti_up : NetCMS.Web.UI.ManagePage
{
    //连接数据库
    Discuss dis = new Discuss();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string AId = "";
            if (Request.QueryString["AId"] != "" && Request.QueryString["AId"] != null)
            {
                AId = Request.QueryString["AId"];
            }
            else 
            {
                PageError("对不起数据错误", "discussacti_list.aspx");
            }
            DataTable dt = dis.sel_discussInfo(AId,5);
            this.ActivesubjectBox.Text = dt.Rows[0]["Activesubject"].ToString();
            this.ActivePlaceBox.Text = dt.Rows[0]["ActivePlace"].ToString();
            this.CutofftimeBox.Text = DateTime.Parse(dt.Rows[0]["Cutofftime"].ToString()).ToShortDateString();
            this.AnumBox.Text = dt.Rows[0]["Anum"].ToString();
            this.ActiveExpenseBox.Text = dt.Rows[0]["ActiveExpense"].ToString();
            this.ContactmethodBox.Text = dt.Rows[0]["Contactmethod"].ToString();
            this.ActivePlanBox.Text = dt.Rows[0]["ActivePlan"].ToString();
            
            if (dt.Rows[0]["ALabel"].ToString() != "")
            {
                int ALabelsa = Convert.ToInt32(dt.Rows[0]["ALabel"].ToString());//会员性别
                switch (ALabelsa)
                {
                    case 0:
                        this.ALabelList.Items[0].Selected = true;
                        break;
                    case 1:
                        this.ALabelList.Items[1].Selected = true;
                        break;
                }
            }
        }
    }

    protected void inBox_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)//判断是否通过验证
        {
            string AIds = Request.QueryString["AId"];
            string Activesubject =Request.Form["ActivesubjectBox"].ToString();
            string ActivePlace = Request.Form["ActivePlaceBox"].ToString();
            int Anum = int.Parse(Request.Form["AnumBox"].ToString());
            string ActivePlan = Request.Form["ActivePlanBox"].ToString();
            string Contactmethod =Request.Form["ContactmethodBox"].ToString();
            DateTime Cutofftime = DateTime.Parse(Request.Form["CutofftimeBox"].ToString());
            string ActiveExpense =Request.Form["ActiveExpenseBox"].ToString();
            int ALabel = this.ALabelList.SelectedIndex;
            DateTime CreaTime = DateTime.Now;//获取当前系统时间
            if (dis.update_disActive(Activesubject, ActivePlace, ActiveExpense, Anum, ActivePlan, Contactmethod, Cutofftime, CreaTime, ALabel, AIds) != 0)
            {
                PageRight("修改成功", "discussacti_list.aspx");
            }
            else
            {
                PageError("修改失败", "discussacti_list.aspx");
            }
        }
    }
}

⌨️ 快捷键说明

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