Beispiel #1
0
        private void BT_Update_Click(object sender, EventArgs e)
        {
            if (TB_Password.Text.Length < 7)
            {
                MessageBox.Show("密码长度必须大于7位");
            }
            if (TB_RealName.Text.Trim() == "" || TB_UserPhone.Text.Trim() == "" || TB_UserValidation.Text.Trim() == "")
            {
                MessageBox.Show("您必须完成所有必填项目!!");
            }

            if (TB_Password.Text.Trim() != "为空时保持原来的值")
            {
                UserManager_Client.UserUpdate_NoOldPassword(TB_UserName.Text.Trim(), TB_Password.Text.Trim());
            }

            if (TB_Answer.Text.Trim() != "为空时保持原来的值")
            {
                UserManager_Client.UserAQUpdate_NoOldPassword(TB_UserName.Text.Trim(), TB_Question.Text.Trim(), TB_Answer.Text.Trim());
            }
            Guid UserID = List_User.Where(P => P.UserName == TB_UserName.Text.Trim()).Single().UserID;

            UserManager_Client.UserEXUpdate(new WFpart.UserManagerService.aspnet_UsersEX()
            {
                User_RealName   = TB_RealName.Text.Trim(),
                User_Validation = TB_UserValidation.Text.Trim(),
                User_Phone      = TB_UserPhone.Text.Trim(),
                User_Adress     = TB_UserAdress.Text.Trim(),
                User_Info       = TB_UserInfo.Text.Trim(),
                User_ID         = UserID
            }
                                            );
            List_UserEX = UserManager_Client.SelectUserEXInfo_All().ToList();
            List_User   = UserManager_Client.SelectUserInfo_All().ToList();
            LB_UserName_SelectedIndexChanged(null, null);
        }