font> td>
TR>
Table>
form>
body>
Html>
Post the background encoding class of this file:
Add_User.aspx.cs
Using system;
Using system.collections;
Using system.componentmodel;
Using system.data;
Using system.drawing;
Using system.Web;
Using system.Web.SessionState;
Using system.Web.ui;
Using system.Web.ui.webcontrols;
Using system.Web.ui.htmlcontrols;
Namespace OA.Admin.Users
{
///
/// AdduSer's summary description.
/// summary>
Public class adduser: system.web.ui.page
{
Protected system.Web.ui.WebControls.RequidFieldValidator RequiredFieldValidator1;
Protected system.Web.ui.WebControls.RequidFieldValidator RequiredFieldValidator2;
Protected system.Web.ui.WebControls.RequidFieldValidator RequiredFieldValidator3;
protected system.web.ui.webcontrols.textbox user_name;
protected system.web.ui.webcontrols.textbox user_psw;
Protected system.Web.ui.webcontrols.dropdownlist user_flag;
protected system.web.ui.webcontrols.textbox user_danwei;
Protected system.web.ui.webcontrols.dropdownlist user_address;
protected system.web.ui.webcontrols.textbox user_shuoming;
protected system.web.ui.webcontrols.button button1;
Protected system.Web.ui.WebControls.RequidFieldValidator RequiredFieldValidator4;
Private Void Page_Load (Object Sender, System.EventArgs E)
{
User_flag.datasource = HT_USER_FLAG ();
User_flag.databind ();
ListItem Li = new ListItem ();
li.value = "0";
Li.Text = "System Administrator";
User_flag.Items.insert (0, Li);
User_address.dataSource = dt_user_address ();
User_address.databind ();
/ / Place the user code here to initialize the page
}
Icollection ht_user_flag ()
{
Hashtable ht = new hashtable ();
HT.Add ("Hall Leaders", "1");
HT.Add ("Provincial Lawyers Association", "2");
HT.Add ("Provincial Lawyers", "3");
HT.Add ("City Lawyers Association", "4");
HT.ADD ("City Lawyers", "5");
HT.Add ("Provincial Limited Law Firm", "6");
Return HT;
}
ICollection DT_USER_ADDRESS ()
{
// It is actually tied to such a TEXT and VALUE values.
DataTable DT = New DataTable ();
// DATAROW DR;
DataRow [] Dr = New DataRow [6];
Dt.columns.Add (New Datacolumn ("S1", TypeOf (String)))
Dt.Columns.Add (New Datacolumn ("S2", TypeOf (String)))); DR [0] = DT.NEWROW ();
DR [0] ["S1"] = "Shijiazhuang";
DR [0] ["s2"] = "Shijiazhuang";
Dt.Rows.Add (DR [0]);
DR [1] = DT.NEWROW ();
DR [1] ["S1"] = "Baoding";
DR [1] ["S2"] = "Baoding";
Dt.Rows.Add (DR [1]);
DR [2] = DT.NEWROW ();
DR [2] ["s1"] = "Xingtai";
DR [2] ["S2"] = "Xingtai";
Dt.Rows.Add (DR [2]);
DR [3] = DT.NEWROW ();
DR [3] ["S1"] = "Zhangjiakou";
DR [3] ["s2"] = "Zhangjiakou";
Dt.Rows.Add (DR [3]);
DR [4] = DT.NEWROW ();
DR [4] ["S1"] = "Hengshui";
DR [4] ["S2"] = "Hengshui";
Dt.Rows.Add (DR [4]);
DR [5] = DT.NEWROW ();
DR [5] ["S1"] = "Zhangzhou";
DR [5] ["S2"] = "Zhangzhou";
Dt.Rows.Add (DR [5]);
DataView DV = New DataView (DT);
Return DV;
}
#Region web form designer generated code
Override protected void oninit (Eventargs E)
{
//
// Codegen: This call is necessary for the ASP.NET Web Form Designer.
//
InitializationComponent ();
Base.onit (E);
}
Private vidinitiRizeComponent ()
{
This.Button1.click = new system.eventhandler (this.button1_click);
This.Load = New System.EventHandler (this.page_load);
}
#ndregion
Private void Button1_Click (Object Sender, System.Eventargs E)
{
String msg;
Oa.cls.cls_user user = new oa.cls.cls_user ();
User.user_name = user_name.text.toString ();
User.user_psw = user_psw.text.toString ();
User.user_flag = user_flag.selecteditedItem.Value.toString ();
User.user_danwei = user_danwei.text.tostring ();
User.user_address = user_address.selectedItem.Value.toString ();
User.user_shuoming = user_shuoming.text.toString ();
User.Adduser (OUT MSG))
{
Response.write ("