/// <summary> /// Gets the property value by name. /// </summary> /// <param name="entity">The entity.</param> /// <param name="propertyName">Name of the property.</param> /// <returns></returns> public static object GetPropertyValueByName(VwUserRole entity, string propertyName) { switch (propertyName) { case "RoleId": return(entity.RoleId); case "RoleName": return(entity.RoleName); case "UserId": return(entity.UserId); case "UserName": return(entity.UserName); case "UserCnName": return(entity.UserCnName); case "Telephone": return(entity.Telephone); case "Email": return(entity.Email); case "UserStatus": return(entity.UserStatus); case "FeBadgeId": return(entity.FeBadgeId); case "Mobile": return(entity.Mobile); case "UserType": return(entity.UserType); case "UserCredit": return(entity.UserCredit); case "Password": return(entity.Password); } return(null); }
///<summary> /// A simple factory method to create a new <see cref="VwUserRole"/> instance. ///</summary> ///<param name="_roleId"></param> ///<param name="_roleName"></param> ///<param name="_userId"></param> ///<param name="_userName"></param> ///<param name="_userCnName"></param> ///<param name="_telephone"></param> ///<param name="_email"></param> ///<param name="_userStatus"></param> ///<param name="_feBadgeId"></param> ///<param name="_mobile"></param> ///<param name="_userType"></param> ///<param name="_userCredit"></param> ///<param name="_password"></param> public static VwUserRole CreateVwUserRole(System.String _roleId, System.String _roleName, System.String _userId, System.String _userName, System.String _userCnName, System.String _telephone, System.String _email, System.Int32?_userStatus, System.String _feBadgeId, System.String _mobile, System.Int32?_userType, System.Int32?_userCredit, System.String _password) { VwUserRole newVwUserRole = new VwUserRole(); newVwUserRole.RoleId = _roleId; newVwUserRole.RoleName = _roleName; newVwUserRole.UserId = _userId; newVwUserRole.UserName = _userName; newVwUserRole.UserCnName = _userCnName; newVwUserRole.Telephone = _telephone; newVwUserRole.Email = _email; newVwUserRole.UserStatus = _userStatus; newVwUserRole.FeBadgeId = _feBadgeId; newVwUserRole.Mobile = _mobile; newVwUserRole.UserType = _userType; newVwUserRole.UserCredit = _userCredit; newVwUserRole.Password = _password; return(newVwUserRole); }
///<summary> /// Returns a Typed VwUserRoleBase Entity ///</summary> public virtual VwUserRoleBase Copy() { //shallow copy entity VwUserRole copy = new VwUserRole(); copy.RoleId = this.RoleId; copy.RoleName = this.RoleName; copy.UserId = this.UserId; copy.UserName = this.UserName; copy.UserCnName = this.UserCnName; copy.Telephone = this.Telephone; copy.Email = this.Email; copy.UserStatus = this.UserStatus; copy.FeBadgeId = this.FeBadgeId; copy.Mobile = this.Mobile; copy.UserType = this.UserType; copy.UserCredit = this.UserCredit; copy.Password = this.Password; copy.AcceptChanges(); return((VwUserRole)copy); }