Using system;
Namespace objlogin.quicklybuildmodel {
/// /// User rights type undefined /// summary> Enum userRankCollection {rank1, rank2, rank3};
/// /// User class fast model does not implement /// Package All Operations for Use /// summary> public class user {
#REGION attribute /// /// user name domain, is encapsulated /// summary> private string username;
/// /// username properties, package username domain /// summary> public string username {get {i (this.username == null) Return string.empty; else returnimpty;} Set {this.username = value;}} /// /// User cryptod domain, is encapsulated /// summary> private string password;
/// /// User Password Properties, Package Password /// Summary> Public String Password {Get {IF (this.password == Null) Return String.empty; Else Return this.password;} set {This.password = value;}}
/// /// User Rights Domain, encapsulated /// summary> // private int usrrank;
/// /// Error message /// summary> public string errorMessage;
#ndregion
#REGION constructor
/// /// Constructor /// summary> 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 /// summary> /// Return to the setting value param> /// returns> 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 // / summary> public void initsions () {
}
/// /// Get login failed information /// summary> /// returns> 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 //// ////// returns> 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 /// summary> /// param> public Bool ReceiveUserInfo (BOOL RETURNVALUE) {// if (get failed) this.xxxMessage = "ReturnValue == false this.ErrorMessage =" Reason for failure "; Return ReturnValue;
/// /// Remove current user /// summary> /// param> /// returns> public bool delete (Bool ReturnValue ) {If (returnvalue == false) this.ErrorMessage = "Remove the reason"; Return ReturnValue;}
/// /// Update current user information /// summary> /// param> /// returns> public bool update (Bool ReturnValue) {if (returnvalue == false) this.ErrorMessage = "Reason for Update Failed"; Return ReturnValue;} /// /// Find User /// Summary> /// param> /// returns> public bool seabhuser (Bool ReturnValue) {Return ReturnValue;} #ENDREGION
}