📄 discussacti.aspx.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;
using NetCMS.Content.Common;
public partial class manage_user_discussacti : NetCMS.Web.UI.ManagePage
{
Discuss dis = new Discuss();
protected void Page_Load(object sender, EventArgs e)
{
Response.CacheControl = "no-cache";
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
#region 添加数据
protected void inBox_Click(object sender, EventArgs e)
{
if (Page.IsValid)//判断是否通过验证
{
rootPublic rd = new rootPublic();
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());
DateTime CreaTime = DateTime.Now;//获取当前系统时间
string AId = NetCMS.Common.Rand.Number(12);
int ALabel = this.ALabelList.SelectedIndex;
string ActiveExpense = Request.Form["ActiveExpenseBox"].ToString();
DataTable dt1 = dis.sel_discussInfo(UserNum,0);
string UName1 = dt1.Rows[0]["UserName"].ToString();
string site = dt1.Rows[0]["SiteID"].ToString();
NetCMS.Model.STDiscussActive DA = new NetCMS.Model.STDiscussActive();
DA.ActiveExpense = ActiveExpense;
DA.ActivePlace = ActivePlace;
DA.ActivePlan = ActivePlan;
DA.Activesubject = Activesubject;
DA.AId = AId;
DA.ALabel = ALabel;
DA.Anum = Anum;
DA.Contactmethod = Contactmethod;
DA.CreaTime = CreaTime;
DA.Cutofftime = Cutofftime;
DA.siteID = site;
DA.UserName = UName1;
if (dis.sel_discussStr() != AId)
{
if (dis.add_userDiscuss(DA) != 0)
{
rd.SaveUserAdminLogs(1, 1, UserNum, "创建讨论组", "创建成功");
PageRight("创建成功", "discussacti_list.aspx");
}
else
{
rd.SaveUserAdminLogs(1, 1, UserNum, "创建讨论组", "创建失败");
PageError("创建失败", "discussacti_list.aspx");
}
}
else
{
PageError("创建失败可能编号重复", "discussacti_list.aspx");
}
}
}
#endregion
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -