• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UserStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UserStatus的典型用法代码示例。如果您正苦于以下问题:C# UserStatus类的具体用法?C# UserStatus怎么用?C# UserStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UserStatus类属于命名空间,在下文中一共展示了UserStatus类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: UpdateUserRoleAndStatus

        public async Task<int> UpdateUserRoleAndStatus(CompetentAuthorityUser user, Role role, UserStatus status)
        {
            user.UpdateUserStatus(status.ToDomainEnumeration<Domain.User.UserStatus>());
            user.UpdateRole(role);

            return await context.SaveChangesAsync();
        }
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:7,代码来源:UpdateCompetentAuthorityUserRoleAndStatusDataAccess.cs


示例2: ChatListSubItem

 public ChatListSubItem()
 {
     this.status = UserStatus.Online;
     this.displayName = "displayName";
     this.nicName = "nicName";
     this.personalMsg = "Personal Message ...";
 }
开发者ID:zimengyu1992,项目名称:WorkLogForm,代码行数:7,代码来源:ChatListSubItem.cs


示例3: User

 /// <summary>
 /// Initializes a new instance of the <see cref="User" /> class.
 /// Default constructor.
 /// </summary>
 public User()
 {
     this.personData = new Person();
     this.priceUAH = 0;
     this.priceUSD = 0;
     this.status = UserStatus.NotLogged;
 }
开发者ID:RomanTino,项目名称:Store,代码行数:11,代码来源:User.cs


示例4: GetUserDetails

        public static List<User> GetUserDetails(UserStatus status)
        {
            List<User> Users = new List<User>();

            using (sqlDBConnection = new SqlConnection(ConfigurationManager.ConnectionStrings[Connection.ConnectionName].ConnectionString))
            {
                StringBuilder sqlstmt = new StringBuilder("select id,username,password,firstname,lastname,address,contactnumber,dateofbirth,emailid,securityquestion,answer,addressproof,photoidentity,status,rewardpoints from [dbo].[User] where status = @status");
                //sqlstmt.Append(Convert.ToString(userid));
                SqlCommand myCommand = new SqlCommand(sqlstmt.ToString(), sqlDBConnection);
                myCommand.CommandType = CommandType.Text;
                myCommand.Parameters.AddWithValue("@status", (int)status);

                sqlDBConnection.Open();
                using (SqlDataReader myReader = myCommand.ExecuteReader())
                {
                    User user;
                    while (myReader.Read())
                    {
                        user = FillDataRecord(myReader);
                        Users.Add(user);
                    }
                    myReader.Close();
                }
                sqlDBConnection.Close();
            }
            return Users;
        }
开发者ID:sunnyrajrathod,项目名称:OnePointTelecom,代码行数:27,代码来源:UserDB.cs


示例5: CompetentAuthorityUser

 public CompetentAuthorityUser(string userId, Guid competentAuthorityId, UserStatus userStatus, Role role)
 {
     UserId = userId;
     CompetentAuthorityId = competentAuthorityId;
     UserStatus = userStatus;
     Role = role;
 }
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:7,代码来源:CompetentAuthorityUser.cs


示例6: ToString

        /// <summary>
        /// Convert UserStatus to string status name.
        /// </summary>
        /// <param name="status">Enum UserStatus.</param>
        /// <returns>Status name.</returns>
        public static String ToString(UserStatus status)
        {
            String statusName = String.Empty;
            switch (status)
            {
                case UserStatus.Offline:
                    {
                        statusName = "offline";
                    }
                    break;
                case UserStatus.Online:
                    {
                        statusName = "online";
                    }
                    break;
                case UserStatus.AtHome:
                    {
                        statusName = "at home";
                    }
                    break;
                case UserStatus.AtWork:
                    {
                        statusName = "at work";
                    }
                    break;
                case UserStatus.Busy:
                    {
                        statusName = "busy";
                    }
                    break;
            }

            return statusName;
        }
开发者ID:ausatov,项目名称:SocialNetwork,代码行数:39,代码来源:EnumsHelper.cs


示例7: SetStatusMessage

 /// <summary>
 /// Set new status message.
 /// </summary>
 /// <param name="userID">User identificator.</param>
 /// <param name="message">Message content.</param>
 /// <param name="status">Type of status.</param>
 public static void SetStatusMessage(Guid userID, String message, UserStatus status)
 {
     using (SocialNetworkDBEntities record = new SocialNetworkDBEntities())
     {
         record.spInsStatus(userID, message, (Int32)status);
     }
 }
开发者ID:ausatov,项目名称:SocialNetwork,代码行数:13,代码来源:StatusRepository.cs


示例8: User

 public User(int uid, String username, String email, UserStatus status)
 {
     Username = username;
     Email = email;
     UID = uid;
     Status = status;
 }
开发者ID:kellyelton,项目名称:octgn-server-old,代码行数:7,代码来源:User.cs


示例9: SetUserStatus

        public void SetUserStatus(UserStatus status) {
             

            logger.debug("set status {0} to user {1}", status, FullName);
            switch(user.Constructor) {
                case Constructor.userEmpty:
                    break;
                case Constructor.userSelf:
                    ((UserSelfConstructor) user).status = status;
                    break;
                case Constructor.userContact:
                    ((UserContactConstructor) user).status = status;
                    break;
                case Constructor.userRequest:
                    ((UserRequestConstructor) user).status = status;
                    break;
                case Constructor.userForeign:
                    ((UserForeignConstructor) user).status = status;
                    break;
                case Constructor.userDeleted:
                    break;
                default:
                    throw new InvalidDataException("invalid constructor");   
            }

            OnPropertyChanged("Status");
        }
开发者ID:Grief-Code,项目名称:kilogram,代码行数:27,代码来源:UserModel.cs


示例10: SetUserStatusStatement

        public SetUserStatusStatement(string userName, UserStatus status)
        {
            if (String.IsNullOrEmpty(userName))
                throw new ArgumentNullException("userName");

            UserName = userName;
            Status = status;
        }
开发者ID:furesoft,项目名称:deveeldb,代码行数:8,代码来源:SetUserStatusStatement.cs


示例11: User

		public User(string username, string password, UserAuthorization authorization, UserStatus status) {
			this._mongoServer = MyMongoDB.GetServer();

			this._username = username;
			this._password = password;
			this._authorization = authorization;
			this._status = status;
		}
开发者ID:CodeFork,项目名称:eMailServer.NET,代码行数:8,代码来源:User.cs


示例12: UpdateStatus

 /// <summary>
 /// 更新用户状态
 /// </summary>
 /// <param name="sysNo">用户编号</param>
 /// <param name="status">用户状态</param>
 /// <returns></returns>
 public static bool UpdateStatus(int sysNo, UserStatus status)
 {
     DataCommand cmd = DataCommandManager.GetDataCommand("Users_UpdateStatus");
     cmd.SetParameterValue("@Status", (int)status);
     cmd.SetParameterValue("@SysNo", sysNo);
     cmd.ExecuteNonQuery();
     return true;
 }
开发者ID:jeanmahai,项目名称:28helpmate,代码行数:14,代码来源:UserDA.cs


示例13: LockUser

        public void LockUser()
        {
            Assert.DoesNotThrow(() => QueryContext.SetUserStatus("tester", UserStatus.Locked));

            UserStatus status = new UserStatus();
            Assert.DoesNotThrow(() => status = QueryContext.GetUserStatus("tester"));
            Assert.AreEqual(UserStatus.Locked, status);
        }
开发者ID:furesoft,项目名称:deveeldb,代码行数:8,代码来源:UserManagementTests.cs


示例14: User

 public User()
 {
     this.CreatedAt = DateTime.Now;
     this.ID = Guid.NewGuid();
     this.status = UserStatus.Pending;
     this.Logs = new List<UserActivityLog>();
     this.MailerLogs = new List<UserMailerLog>();
 }
开发者ID:mariusjo,项目名称:MonkeyFist,代码行数:8,代码来源:User.cs


示例15: CreateUser

        private void CreateUser(UserGender gender, UserStatus status)
        {
            ((App)App.Current).Client.CreateUserAsync((user, callbackParams) =>
            {
                Utilities.HandleAsyncResults(user, callbackParams, () => { this.UserCreated(user); }, "Create user failed. Please try again.");

            }, this.Name.Text, this.Password.Password, gender: gender, age: this.GetAge(),
            email: this.Email.Text, status: status);
        }
开发者ID:bradser,项目名称:BuddyTest,代码行数:9,代码来源:LoginOrCreateUser.xaml.cs


示例16: MyUser

 public MyUser(int _userId, String _username, String _name, String _contactno, UserType _usertype, UserStatus _status)
 {
     this.userId=_userId;
     this.username = _username;
     this.status = _status;
     this.name = _name;
     this.contactNo = _contactno;
     this.usertype = _usertype;
 }
开发者ID:jainprachi2506,项目名称:MyCloudClassroom,代码行数:9,代码来源:User.cs


示例17: MsgCenterTreeNode

 public MsgCenterTreeNode(Staff staff, bool isMark)
 {
     this.viewModel.AddEventListenerHandler();
     this.InitializeComponent();
     this.staff = staff;
     this.status = UserStatus.Online;
     this.StaffIsMark = isMark;
     base.MouseLeftButtonUp += new MouseButtonEventHandler(this.StaffMsgCenterTreeNode_MouseLeftButtonUp);
     this.UpdateInfoStaff();
 }
开发者ID:super860327,项目名称:firstwpftest,代码行数:10,代码来源:MsgCenterTreeNode.xaml.cs


示例18: User

		public User(int userId, string name, string @namespace)
		{
			if(string.IsNullOrWhiteSpace(name))
				throw new ArgumentNullException("name");

			_userId = userId;
			this.Name = _fullName = name.Trim();
			this.Namespace = @namespace;
			_status = UserStatus.Unapproved;
			_createdTime = DateTime.Now;
		}
开发者ID:Zongsoft,项目名称:Zongsoft.CoreLibrary,代码行数:11,代码来源:User.cs


示例19: OrganisationUser

        public OrganisationUser(Guid userId, Guid organisationId, UserStatus userStatus)
        {
            UserId = userId.ToString();
            OrganisationId = organisationId;
            UserStatus = userStatus;

            if (userStatus == UserStatus.Pending)
            {
                // Raise a domain event indicating that a user's request to join an organisation is pending.
                RaiseEvent(new OrganisationUserRequestEvent(this.OrganisationId, userId));
            }
        }
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:12,代码来源:OrganisationUser.cs


示例20: CreateUser

        public string CreateUser(string email, string passwordHash, string salt, UserStatus status = UserStatus.Signup)
        {
            var user = new User
            {
                Email = email,
                PasswordHash = passwordHash,
                Salt = salt,
                Status = (int) status
            };

            return CreateUser(user);
        }
开发者ID:sufong2001,项目名称:XpmsAzure,代码行数:12,代码来源:DAOUsers.cs



注:本文中的UserStatus类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UserStore类代码示例发布时间:2022-05-24
下一篇:
C# UserService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap