ProjectAdd.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:2k
- using System;
- using System.Data;
- using System.Data.SqlClient;
- using System.Configuration;
- using System.Text;
- 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 com.etong.BusinessRule.Zwf;
- public partial class SysManage_ProjectAdd : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- BT_Cancel.Attributes.Add("onclick", "javascript:if(confirm('确定要退出吗?')) {window.close();return;} else {return;}");
- }
- protected void BT_Confirm_Click(object sender, EventArgs e)
- {
- string SerialName = this.TB_SerialName.Text;
- string decs = this.TB_Decs.Text;
- // serialname
- EtongZwf etongzwf = new EtongZwf();
- int RowsCount = 0;
- RowsCount=etongzwf.ProjectSearchByName(SerialName.Trim());
- if (RowsCount > 0)
- {
- ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:此项目名称已存在!');</script>");
- return;
- }
- bool returnvalue = false;
- returnvalue = etongzwf.ProjectAdd(SerialName);
- if (returnvalue)
- Response.Write("<script>alert('系统提示:添加记录成功!');window.close();</script>");
- else
- Response.Write("<script>alert('系统提示:添加记录不成功!');window.close();</script>");
- }
- }