QuicklyBuildModelUser.cs [Quick Category Model User Code]

zhaozj2021-02-16  52

Using system;

Namespace objlogin.quicklybuildmodel {

///

/// User rights type undefined /// Enum userRankCollection {rank1, rank2, rank3};

///

/// User class fast model does not implement /// Package All Operations for Use /// public class user {

#REGION attribute ///

/// user name domain, is encapsulated /// private string username;

///

/// username properties, package username domain /// public string username {get {i (this.username == null) Return string.empty; else returnimpty;} Set {this.username = value;}} /// /// User cryptod domain, is encapsulated /// private string password;

///

/// User Password Properties, Package Password /// Public String Password {Get {IF (this.password == Null) Return String.empty; Else Return this.password;} set {This.password = value;}}

///

/// User Rights Domain, encapsulated /// // private int usrrank;

///

/// Error message /// public string errorMessage;

#ndregion

#REGION constructor

///

/// Constructor /// public user () {// // Todo: Add constructor logic //}

Public user (string ausername, string apassword) {this.username = ausername.trim (); this.password = apassword.trim ();} #ENDREGION

#REGION model interface ///

/// This user exists in the database, and via authentication /// Note: Model interface, does not perform any operation, only return settings /// /// Return to the setting value /// public bool checkloginok (bool returnvalue) {if (returnvalue == false) {this.ErrorMessage = " Login failed information! ";} Return ReturnValue;} /// /// Initialization Session Value /// Usually, it is often written to the session /// model after verification, no operation // / public void initsions () {

}

///

/// Get login failed information /// /// public string getCheckloginfailMessage () {if (this.ErrorMessage == Null) Return "User authentication Success! "; Else Return ErrorMessage;}

///

/// User registration /// Register successfully returns TRUE Otherwise, no operation is not implemented in false //// Public Bool Register (BOOL RETURNVALUE) {if (returnvalue == false) this.ErrorMessage = "Reason for registration failed"; Return ReturnValue;}

///

/// Get User Information /// Get Successful Return True Otherwise, Back False /// If the acquisition failure will fail the cause /// /// public Bool ReceiveUserInfo (BOOL RETURNVALUE) {// if (get failed) this.xxxMessage = "ReturnValue == false this.ErrorMessage =" Reason for failure "; Return ReturnValue;

///

/// Remove current user /// /// /// public bool delete (Bool ReturnValue ) {If (returnvalue == false) this.ErrorMessage = "Remove the reason"; Return ReturnValue;}

///

/// Update current user information /// /// /// public bool update (Bool ReturnValue) {if (returnvalue == false) this.ErrorMessage = "Reason for Update Failed"; Return ReturnValue;} /// /// Find User /// /// /// public bool seabhuser (Bool ReturnValue) {Return ReturnValue;} #ENDREGION

}

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

New Post(0)