제목 : 31.11.1. NewGroup.ascx.cs : 새로운 그룹(Roles) 추가
글번호:
|
|
213
|
작성자:
|
|
레드플러스
|
작성일:
|
|
2007/07/06 오후 8:42:00
|
조회수:
|
|
4802
|
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 System.Data.SqlClient;
public partial class NewGroupControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnAddGroup_Click(object sender, EventArgs e)
{
string strSql = "AddNewGroup";
SqlConnection objCon = new SqlConnection(ConfigurationManager.ConnectionStrings[
"ConnectionString"].ConnectionString);
SqlCommand objCmd = new SqlCommand();
objCmd.Connection = objCon;
objCmd.CommandText = strSql;
objCmd.CommandType = CommandType.StoredProcedure;
objCmd.Parameters.AddWithValue("@GroupUID", txtGroupUID.Text);
objCmd.Parameters.AddWithValue("@Name", txtName.Text);
objCmd.Parameters.AddWithValue("@Description", txtDescription.Text);
objCon.Open();
objCmd.ExecuteNonQuery();
objCon.Close();
Response.Redirect("GroupList.aspx");//
}
}