QuicklyBuildModelUserManage.aspx [Quick Category Setup Backstage User Management Page Code]

zhaozj2021-02-16  56

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 Objlogin.quicklyBuildModel {///

/// userManage Summary Description. /// public class UserManage: SecurityPage {protected System.Web.UI.WebControls.Button btnUserRegister; protected System.Web.UI.WebControls.RequiredFieldValidator ValidatorToPassword; protected System.Web.UI.WebControls.TextBox tbPassword; protected System.Web.UI.WebControls.Label Label2; protected System.Web.UI.WebControls.TextBox tbUserName; protected System.Web.UI.WebControls.Label Label1; protected System.Web.UI.WebControls.RequiredFieldValidator ValidatorToUserName; protected System. Web.ui.WebControls.Button BtnmodifyUser; protected system.web.ui.webcontrols.button btndeluser; protected system.web.ui.webcontrols.button btnsearchuser;

Private user user; private void page_load (object sender, system.eventargs e) {// Place user code here to initialize page // this.checkloginandSetPage (); this.user = new user ();}

#Region Web Form Designer Generated Code Override Protected Void OnNit (Eventargs E) {// // Codegen: This call is required for the ASP.NET Web Form Designer. // InitializeComponent (); base.onit (e);} ///

/// Designer Supports the required method - Do not use the code editor to modify the // / this method. /// private void InitializeComponent () {this.btnUserRegister.Click = new System.EventHandler (this.btnUserRegister_Click); this.btnDelUser.Click = new System.EventHandler (this.btnDelUser_Click); this.btnModifyUser .Click = new System.EventHandler (this.btnModifyUser_Click); this.btnSearchUser.Click = new System.EventHandler (this.btnSearchUser_Click); this.Load = new System.EventHandler (this.Page_Load);} #endregion

private void btnUserRegister_Click (object sender, System.EventArgs e) {if (this.user.ReceiveUserInfo (true)) {if (this.user.Register (false)) Response.Write ( "registered successfully"); else ShowErrorMessage () Else showerrorMessage ();

}

///

/// Displays the reason information of accepting user information failure /// private void showerrorMessage () {response.write (this.user.ErrorMessage);}

private void btnModifyUser_Click (object sender, System.EventArgs e) {if (this.user.ReceiveUserInfo (true)) {if (this.user.Update (true)) Response.Write ( "Update Success"); else this.ShowErrorMessage ();} Else this.showerrorMessage ();

private void btnDelUser_Click (object sender, System.EventArgs e) {if (this.user.ReceiveUserInfo (true)) {if (this.user.Delete (true)) Response.Write ( "deleted successfully"); else this.ShowErrorMessage ();} Else this.showerrorMessage ();

private void btnSearchUser_Click (object sender, System.EventArgs e) {if (this.user.ReceiveUserInfo (true)) {if (this.user.SeachUser (true)) Response.Write ( "found"); else this.ShowErrorMessage ();} Else this.showerrorMessage ();}}}}}

转载请注明原文地址:https://www.9cbs.com/read-19354.html

New Post(0)