当前位置: 首页>>代码示例>>C#>>正文


C# UserInfo类代码示例

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


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

示例1: UpdateAllGestures

 /// <summary>
 /// Updates all gestures.
 /// </summary>
 /// <param name="data">The skeleton data.</param>
 public virtual void UpdateAllGestures(Skeleton data, UserInfo userInfo = null)
 {
     foreach (Gesture gesture in this.gestures)
     {
         gesture.UpdateGesture(data, userInfo);
     }
 }
开发者ID:vova1987,项目名称:KinectAdapter.github.io,代码行数:11,代码来源:GestureController.cs

示例2: InsertUser

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="_userinfo"></param>
        /// <returns></returns>
        public int InsertUser(UserInfo _userinfo)
        {
            string cmdText = @" insert into [loachs_users](
                                [Type],[UserName],[Name],[Password],[Email],[SiteUrl],[AvatarUrl],[Description],[displayorder],[Status],[PostCount],[CommentCount],[CreateDate])
                                values (
                                @Type,@UserName,@Name,@Password,@Email,@SiteUrl,@AvatarUrl,@Description,@Displayorder,@Status, @PostCount,@CommentCount,@CreateDate )";
            SqliteParameter[] prams = {
                                        SqliteDbHelper.MakeInParam("@Type", DbType.Int32,4, _userinfo.Type),
                                        SqliteDbHelper.MakeInParam("@UserName", DbType.String,50, _userinfo.UserName),
                                        SqliteDbHelper.MakeInParam("@Name", DbType.String,50, _userinfo.Name),
                                        SqliteDbHelper.MakeInParam("@Password", DbType.String,50, _userinfo.Password),
                                        SqliteDbHelper.MakeInParam("@Email", DbType.String,50, _userinfo.Email),
                                        SqliteDbHelper.MakeInParam("@SiteUrl", DbType.String,255, _userinfo.SiteUrl),
                                        SqliteDbHelper.MakeInParam("@AvatarUrl", DbType.String,255, _userinfo.AvatarUrl),
                                        SqliteDbHelper.MakeInParam("@Displayorder", DbType.String,255, _userinfo.Description),
                                        SqliteDbHelper.MakeInParam("@Status", DbType.Int32,4, _userinfo.Displayorder),
                                        SqliteDbHelper.MakeInParam("@Status", DbType.Int32,4, _userinfo.Status),
                                        SqliteDbHelper.MakeInParam("@PostCount", DbType.Int32,4, _userinfo.PostCount),
                                        SqliteDbHelper.MakeInParam("@CommentCount", DbType.Int32,4, _userinfo.CommentCount),
                                        SqliteDbHelper.MakeInParam("@CreateDate", DbType.Date,8, _userinfo.CreateDate),

                                    };
            int r = SqliteDbHelper.ExecuteNonQuery(CommandType.Text, cmdText, prams);
            if (r > 0)
            {
                return Convert.ToInt32(SqliteDbHelper.ExecuteScalar("select   [UserId] from [loachs_users]  order by [UserId] desc limit 1"));
            }
            return 0;
        }
开发者ID:jango2015,项目名称:LoachsMono,代码行数:34,代码来源:User.cs

示例3: PrivateHandle

        protected override void PrivateHandle(UserInfo info, List<string> args)
        {
            if (args.Count == 0)
            {
                info.AwayMessage = null;
                info.Modes.RemoveMode<ModeAway>();
                IrcDaemon.Replies.SendUnAway(info);
            }
            else
            {
                info.AwayMessage = args [0];
                info.Modes.Add (new ModeAway());
                IrcDaemon.Replies.SendNowAway(info);
            }

            foreach (var channel in info.Channels)
            {
                foreach (var user in  channel.Users)
                {
                    if (user.Capabilities.Contains("away-notify"))
                    {

                        Send (new AwayArgument (info, user, (args.Count == 0) ? null : args[0]));
                    }
                }
            }
        }
开发者ID:autocar,项目名称:ircddotnet,代码行数:27,代码来源:Away.cs

示例4: InsertUser

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="userinfo"></param>
        /// <returns></returns>
        public int InsertUser(UserInfo userinfo)
        {
            string cmdText =string.Format(@" insert into [{0}users](
                                [UserType],[UserName],[NickName],[Password],[Email],[SiteUrl],[AvatarUrl],[Description],[sortnum],[Status],[PostCount],[CommentCount],[CreateTime])
                                values (
                                @UserType,@UserName,@NickName,@Password,@Email,@SiteUrl,@AvatarUrl,@Description,@SortNum,@Status, @PostCount,@CommentCount,@CreateTime )",ConfigHelper.Tableprefix);
            SqliteParameter[] prams = {
                                        SqliteHelper.MakeInParam("@UserType", DbType.Int32,4, userinfo.UserType),
                                        SqliteHelper.MakeInParam("@UserName", DbType.String,50, userinfo.UserName),
                                        SqliteHelper.MakeInParam("@NickName", DbType.String,50, userinfo.NickName),
                                        SqliteHelper.MakeInParam("@Password", DbType.String,50, userinfo.Password),
                                        SqliteHelper.MakeInParam("@Email", DbType.String,50, userinfo.Email),
                                        SqliteHelper.MakeInParam("@SiteUrl", DbType.String,255, userinfo.SiteUrl),
                                        SqliteHelper.MakeInParam("@AvatarUrl", DbType.String,255, userinfo.AvatarUrl),
                                        SqliteHelper.MakeInParam("@Description", DbType.String,255, userinfo.Description),
                                        SqliteHelper.MakeInParam("@SortNum", DbType.Int32,4, userinfo.SortNum),
                                        SqliteHelper.MakeInParam("@Status", DbType.Int32,4, userinfo.Status),
                                        SqliteHelper.MakeInParam("@PostCount", DbType.Int32,4, userinfo.PostCount),
                                        SqliteHelper.MakeInParam("@CommentCount", DbType.Int32,4, userinfo.CommentCount),
                                        SqliteHelper.MakeInParam("@CreateTime", DbType.Date,8, userinfo.CreateTime),

                                    };
            int r = SqliteHelper.ExecuteNonQuery(CommandType.Text, cmdText, prams);
            if (r > 0)
            {
                return Convert.ToInt32(SqliteHelper.ExecuteScalar(string.Format("select [UserId] from [{0}users]  order by [UserId] desc limit 1",ConfigHelper.Tableprefix)));
            }
            return 0;
        }
开发者ID:robotbird,项目名称:jqpress-aspx,代码行数:34,代码来源:UserData.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {

        
        if (!IsPostBack)
        {

            DataTable dt = OrganizationInfo.GetLogoPath(UserOrganizationId);
            if (dt != null && dt.Rows.Count > 0)
            {
                string str = ConfigurationManager.AppSettings["LogoUploadLocation"] + dt.Rows[0]["vchLogoPath"].ToString();
                if (!string.IsNullOrEmpty(dt.Rows[0]["vchLogoPath"].ToString()))
                {
                    str = str.Replace("//", "/");
                    logoimg.Src = str;
                }
            }
            UserInfo obj = UserInfo.GetCurrentUserInfo();
            UserInfo objUser = new UserInfo(obj.UserId);
            if (objUser.UserProfileImage != null)
            {
                profileimage.Src = "data:image/(gif|png|jpeg|jpg);base64," + Convert.ToBase64String(objUser.UserProfileImage);
            }
        }
        GetMenuPermission();
        GetOrganizationAndRoleName();
        //lblProduct.Text = CatName; 
    }
开发者ID:AsmaBabarISL,项目名称:Epr_General,代码行数:28,代码来源:LeftNavigation.ascx.cs

示例6: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        lblAvialable.Text = GetString("User_Sites.Available");

        // Get user ID
        userId = QueryHelper.GetInteger("userid", 0);
        if (userId > 0)
        {
            // Check that only global administrator can edit global administrator's accouns
            ui = UserInfoProvider.GetUserInfo(userId);
            EditedObject = ui;
            CheckUserAvaibleOnSite(ui);

            if (!CheckGlobalAdminEdit(ui))
            {
                plcTable.Visible = false;
                lblError.Text = GetString("Administration-User_List.ErrorGlobalAdmin");
                lblError.Visible = true;
            }
            else
            {
                // Get the user sites
                currentValues = GetUserSites();

                if (!RequestHelper.IsPostBack())
                {
                    usSites.Value = currentValues;
                }

                usSites.OnSelectionChanged += usSites_OnSelectionChanged;
            }
        }
    }
开发者ID:v-jli,项目名称:jean0407large,代码行数:33,代码来源:User_Edit_Sites.aspx.cs

示例7: HandleEvent

        public override bool HandleEvent(CommandBase command, ChannelInfo channel, UserInfo user, List<string> args)
        {
            if (onlyOnce) { return true; }
            onlyOnce = true;

            if (command is Join)
            {
                user.IrcDaemon.Commands.Send(new NoticeArgument(user, user, channel.Name, "This channel automatically translates your messages, use the LANGUAGE command to set your preferred language"));
            }
            if (!channel.Modes.HandleEvent(command, channel, user, args))
            {
                onlyOnce = false;
                return false;
            }
            if (command is PrivateMessage || command is Notice)
            {

                var translateDelegate = new GoogleTranslate.TranslateMultipleDelegate(translator.TranslateText);
                translateDelegate.BeginInvoke(args[1], channel.Users.Select(u => u.Languages.First()).Distinct(), TranslateCallBack, Tuple.Create(channel, user, command));

                onlyOnce = false;
                return false;
            }

            onlyOnce = false;
            return true;
        }
开发者ID:autocar,项目名称:ircddotnet,代码行数:27,代码来源:ModeTranslate.cs

示例8: Import

        /// <summary>
        /// Import user from CSV format.
        /// </summary>
        /// <param name="rows">
        /// Each string in the list must contain 25 CSV fields, as follows:
        ///     0 - UserName
        ///     1 - StaffType
        ///     2 - Id
        ///     3 - FamilyName
        ///     4 - GivenName
        ///     5 - MiddleName
        ///     6 - Prefix
        ///     7 - Suffix
        ///     8 - Degree
        /// </param>
        /// <param name="context"></param>
        public override void Import(List<string> rows, IUpdateContext context)
        {
            _context = context;

            List<User> importedUsers = new List<User>();

            foreach (string row in rows)
            {
                string[] fields = ParseCsv(row, _numFields);

                string userName = fields[0];

                string staffId = fields[2];
                string staffFamilyName = fields[3];
                string staffGivenName = fields[4];

                User user = GetUser(userName, importedUsers);

                if (user == null)
                {
                	UserInfo userInfo =
                		new UserInfo(userName, string.Format("{0} {1}", staffFamilyName, staffGivenName), null, null, null);
					user = User.CreateNewUser(userInfo, _settings.DefaultTemporaryPassword);
                    _context.Lock(user, DirtyState.New);

                    importedUsers.Add(user);
                }
            }
        }
开发者ID:nhannd,项目名称:Xian,代码行数:45,代码来源:UserImporter.cs

示例9: Button1_Click

    protected void Button1_Click(object sender, EventArgs e)
    {
        UserInfo obj = new UserInfo();
        DataTable dtab1 = new DataTable();
        string username = TextBox1.Text;
        string password = TextBox2.Text;
        dtab1 = obj.signin(username, password);

        if (dtab1.Rows.Count > 0)
        {

            if (TextBox1.Text == "Administrator" && TextBox2.Text=="admin")
            {
                Session["Username"] = dtab1.Rows[0][1].ToString();
                Response.Redirect("Admin/index.aspx");
            }
            else
            {
                Response.Write("Logged in successfully");
                Session["userid"] = dtab1.Rows[0][0].ToString();
                Session["Username"] = dtab1.Rows[0][1].ToString();
                Response.Redirect("bus_details.aspx");
            }

        }
        else
        {
            Label3.Visible = true;
            Label3.Text="Incorrect Username /Password";
            TextBox2.Text = "";
            TextBox1.Text = "";
        }
    }
开发者ID:cloudbearings,项目名称:Bus-Reservation,代码行数:33,代码来源:index.aspx.cs

示例10: ProcessRequest

 public void ProcessRequest(HttpContext context)
 {
     using (UserOperateClient insUserBLL = new UserOperateClient())
     {
         //context.Response.ContentType = "text/plain";
         //context.Response.Write("Hello World");
         UserInfo strUserInfo = new UserInfo();
         //strUserInfo.LoginName = context.Application.Equals("loginName").ToString();
         strUserInfo.LoginName =context.Session["loginname"].ToString();
         strUserInfo.UserName = System.Web.HttpUtility.UrlDecode(context.Request["username"]);
         strUserInfo.Birthday = Convert.ToDateTime(System.Web.HttpUtility.UrlDecode(context.Request["birthday"]));
         strUserInfo.Sexy = System.Web.HttpUtility.UrlDecode(context.Request["sex"]);
         strUserInfo.GraduteSchool = System.Web.HttpUtility.UrlDecode(context.Request["school"]);
         strUserInfo.Job = System.Web.HttpUtility.UrlDecode(context.Request["job"]);
         strUserInfo.MobilPhone = System.Web.HttpUtility.UrlDecode(context.Request["mobilphone"]);
         strUserInfo.QQ = System.Web.HttpUtility.UrlDecode(context.Request["qq"]);
         strUserInfo.Msn = System.Web.HttpUtility.UrlDecode(context.Request["msn"]);
         strUserInfo.Weibo = System.Web.HttpUtility.UrlDecode(context.Request["weibo"]);
         strUserInfo.EnglishName = System.Web.HttpUtility.UrlDecode(context.Request["englishname"]);
         try
         {
             if (insUserBLL.UpdateUserInfo(strUserInfo) == true)
             {
                 context.Response.Write("success");
             }
             else
             {
                 context.Response.Write("fail");
             }
         }
         catch (Exception ex)
         { }
     }
 }
开发者ID:SuperRay,项目名称:MoMoWeb,代码行数:34,代码来源:IDInfoHandler.ashx.cs

示例11: PrivateHandle

        protected override void PrivateHandle(UserInfo info, List<string> args)
        {
            if (!IrcDaemon.Nicks.ContainsKey(args[0]))
            {
                IrcDaemon.Replies.SendNoSuchNick(info, args[0]);
                return;
            }

            var user = IrcDaemon.Nicks[args[0]];
            IrcDaemon.Replies.SendWhoIsUser(info, user);
            if (info.UserPerChannelInfos.Count > 0)
            {
                IrcDaemon.Replies.SendWhoIsChannels(info, user);
            }
            IrcDaemon.Replies.SendWhoIsServer(info, user);
            if (user.AwayMessage != null)
            {
                IrcDaemon.Replies.SendAwayMessage(info, user);
            }

            if (IrcDaemon.Options.IrcMode == IrcMode.Modern)
            {
                IrcDaemon.Replies.SendWhoIsLanguage(info, user);
            }

            if (user.Modes.Exist<ModeOperator>() || user.Modes.Exist<ModeLocalOperator>())
            {
                IrcDaemon.Replies.SendWhoIsOperator(info, user);
            }

            IrcDaemon.Replies.SendWhoIsIdle(info, user);
            IrcDaemon.Replies.SendEndOfWhoIs(info, user);
        }
开发者ID:autocar,项目名称:ircddotnet,代码行数:33,代码来源:WhoIs.cs

示例12: Submit_Click

        protected void Submit_Click(object sender, EventArgs e)
        {
            string strData = JsonChecked.Value;
            exception = "";
            List<UserInfo> userData = JSON.ScriptDeserialize<List<UserInfo>>(strData);
            for (int i = 0; i < userData.Count; i++)
            {
                UserInfo userinfo = new UserInfo();
                userinfo = userData.ElementAt(i);
                userinfo.UiType = userinfo.UiType.Remove(4, 1).Insert(4, "1");
                UserInfoBLL.Update(userinfo, ref exception);
            }

            if (exception == "" || exception == null)
            {
                Errors.Value = "提交成功";
                Hidden1.Value = "submit";
                ClientScript.RegisterStartupScript(this.GetType(), "", "tanchuang()", true);
                return;
            }
            else
            {
                Errors.Value = exception;
                Hidden1.Value = "submit";
                ClientScript.RegisterStartupScript(this.GetType(), "", "tanchuang()", true);
                return;
            }
        }
开发者ID:cntimothy,项目名称:TJEvaluationSystem,代码行数:28,代码来源:MakeEvaluated.aspx.cs

示例13: AddUser_GetUsers

        public void AddUser_GetUsers()
        {
            IUsersStorageProviderV30 prov = GetProvider();

            UserInfo u1 = new UserInfo("user", "User", "[email protected]", true, DateTime.Now.AddDays(-1), prov);
            UserInfo u2 = new UserInfo("john", null, "[email protected]", false, DateTime.Now, prov);

            UserInfo u1Out = prov.AddUser(u1.Username, u1.DisplayName, "password", u1.Email, u1.Active, u1.DateTime);
            Assert.IsNotNull(u1Out, "AddUser should return something");
            AssertUserInfosAreEqual(u1, u1Out, true);

            UserInfo u2Out = prov.AddUser(u2.Username, u2.DisplayName, "password", u2.Email, u2.Active, u2.DateTime);
            Assert.IsNotNull(u2Out, "AddUser should return something");
            AssertUserInfosAreEqual(u2, u2Out, true);

            Assert.IsNull(prov.AddUser("user", null, "pwd999", "[email protected]", false, DateTime.Now), "AddUser should return false");

            UserInfo[] users = prov.GetUsers();
            Array.Sort(users, delegate(UserInfo x, UserInfo y) { return x.Username.CompareTo(y.Username); });

            Assert.AreEqual(2, users.Length, "Wrong user count");

            AssertUserInfosAreEqual(u2, users[0], true);
            AssertUserInfosAreEqual(u1, users[1], true);
        }
开发者ID:mono,项目名称:ScrewTurnWiki,代码行数:25,代码来源:UsersStorageProviderTestScaffolding.cs

示例14: PrivateHandle

        protected override void PrivateHandle(UserInfo info, List<string> args)
        {
            var message = (args.Count > 1) ? args[1] : IrcDaemon.Options.StandardPartMessage;

            foreach (string channelName in GetSubArgument(args[0]))
            {
                if (IrcDaemon.Channels.ContainsKey(channelName))
                {
                    var chan = IrcDaemon.Channels[channelName];

                    if (info.Channels.Contains(chan))
                    {
                        Send(new PartArgument(info, chan, chan, message));
                        chan.RemoveUser(info);
                    }
                    else
                    {
                        IrcDaemon.Replies.SendNotOnChannel(info, channelName);
                    }
                }
                else
                {
                    IrcDaemon.Replies.SendNoSuchChannel(info, channelName);
                }
            }
        }
开发者ID:FreeApophis,项目名称:ircddotnet,代码行数:26,代码来源:Part.cs

示例15: btnSubmit_Click

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        GenralUserInfo objGenralUserInfo = new GenralUserInfo();
        UserInfo objUserInfo = new UserInfo();

        TributesPortal.Utilities.StateManager stateManager = StateManager.Instance;

        //stateManager.Add("UserId", objGenralUserInfo.RecentUsers.UserID.ToString(), StateManager.State.Session);
        objUserInfo.UserID = int.Parse(stateManager.Get("UserId", StateManager.State.Session).ToString());
        objUserInfo.UserEmail = txtEmail.Text.Trim();//int.Parse(stateManager.Get("UserId", StateManager.State.Session).ToString());
        objUserInfo.UserPassword = txtPassword.Text.Trim();
        objGenralUserInfo.RecentUsers = objUserInfo;
        _presenter.OnChangeEmailPassword(objGenralUserInfo);
        if (objGenralUserInfo.CustomError == null)
        {
            txtEmail.Text = objGenralUserInfo.RecentUsers.UserEmail;
            txtPassword.Text = objGenralUserInfo.RecentUsers.UserPassword;
            txtConformPassword.Text = objGenralUserInfo.RecentUsers.UserPassword;
            lblMessage.Text = ResourceText.GetString("msgSuccess_CEP");
        }
        else
        {
            lblMessage.Text = objGenralUserInfo.CustomError.ErrorMessage.ToString();
        }
    }
开发者ID:rupendra-sharma07,项目名称:MainTrunk,代码行数:25,代码来源:ChangeEmailPassword.aspx.cs


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