/Ataman/UserProfile.aspx
http://ataman.googlecode.com/ · ASP.NET · 111 lines · 108 code · 3 blank · 0 comment · 9 complexity · c4727e54e04b036d8f4ebc7950411014 MD5 · raw file
- <%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="UserProfile.aspx.cs"
- Inherits="UserProfile" Title="Атаман мебель: Личный кабинет" %>
- <script runat="server">
- public void EditUserProf(object sender, EventArgs e)
- {
-
- // Create an empty Profile for the newly created user
- //ProfileCommon p = (ProfileCommon)ProfileCommon.Properties.Remove(logName.ToString());
- ProfileCommon pr = (ProfileCommon)ProfileCommon.Create(logName.ToString(), true);
-
- // Populate some Profile properties off of the create user wizard
- if (Name1.Text != "") pr.Name = Name1.Text;
- if (Surname1.Text != "") pr.Surname = Surname1.Text;
- if (LastName1.Text != "") pr.LastName = LastName1.Text;
- if (Phone1.Text != "") pr.Phone = Phone1.Text;
-
- pr.Save();
- // p.Save();
- }
- </script>
- <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
- <div id="pagetitle">Личный кабинет</div>
- <div class="userProfile">
- <div class="clear">
- <div class ="personalInfo">
- <h1>???????????? ??????????</h1>
- <div class="logName">
- <asp:Label ID="lbllogName" AssociatedControlID="logName" Text="??????? ??????:" runat="server" />
- <asp:LoginName ID="logName" runat="server" />
- </div>
- <div class="userRole">
- <asp:Label ID="lblRole" AssociatedControlID="grdRoles" Text="????:" runat="server" />
- <asp:GridView id="grdRoles" DataSourceID="srcRoles" ShowHeader="false" EmptyDataText="user" GridLines="None" Runat="server" CssClass="roleName" />
- <asp:ObjectDataSource id="srcRoles" TypeName="System.Web.Security.Roles" SelectMethod="GetRolesForUser" Runat="server" />
- </div>
- <div class="userName">
- ???: <asp:Label ID="Name" runat="server" Text="" />
- </div>
- <div class="userSurname">
- ???????: <asp:Label ID="Surname" runat="server" Text="" />
- </div>
- <div class="userLastName">
- ????????: <asp:Label ID="LastName" runat="server" Text="" />
- </div>
- <div class="userPhone">
- ???????: <asp:Label ID="Phone" runat="server" Text="" />
- </div>
- </div>
- <div class="userForm">
- <asp:ChangePassword ID="ChangePassword1" runat="server" CssClass="userForm">
- <ChangePasswordTemplate>
- <h1>Изменение пароля</h1>
- <div class="currentPass">
- <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword" Text="Пароль:" CssClass="label" />
- <asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password" CssClass="form" />
- <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
- ErrorMessage="Введите пароль." ToolTip="Введите пароль." ValidationGroup="ChangePassword1">*
- </asp:RequiredFieldValidator>
- </div>
- <div class="newPass">
- <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword" Text="Новый пароль:" CssClass="label" />
- <asp:TextBox ID="NewPassword" runat="server" TextMode="Password" CssClass="form" />
- <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
- ErrorMessage="New Password is required." ToolTip="New Password is required." ValidationGroup="ChangePassword1">*
- </asp:RequiredFieldValidator>
- </div>
- <div class="confirmPas">
- <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword" Text="Подтверждение нового пароля:" CssClass="label" />
- <asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password" CssClass="form" />
- <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
- ErrorMessage="Confirm New Password is required." ToolTip="Confirm New Password is required." ValidationGroup="ChangePassword1">*
- </asp:RequiredFieldValidator>
- </div>
- <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword"
- ControlToValidate="ConfirmNewPassword" Display="Dynamic" ErrorMessage="Подтверждение и новый пароль олжны совпадать."
- ValidationGroup="ChangePassword1"></asp:CompareValidator>
- <asp:Literal ID="FailureText" runat="server" EnableViewState="False" />
- <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword" Text="Изменить пароль"
- ValidationGroup="ChangePassword1" CssClass="changePassButton" />
- <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Отмена" CssClass="cancelButton" />
- </ChangePasswordTemplate>
- <SuccessTemplate>
- Смена пароля завершена.
- Пароль изменён успешно!
- <asp:Button ID="ContinuePushButton" runat="server" CausesValidation="False" CommandName="Continue" Text="На главную" PostBackUrl="~/Default.aspx"/>
- </SuccessTemplate>
- </asp:ChangePassword>
- </div>
- <div class="userDetails">
- <h1>????????? ?????? ?????</h1>
- <div class="nameForm">
- <asp:Label ID="NameLabel" runat="server" AssociatedControlID="Name1" Text="???:" CssClass="label" />
- <asp:TextBox ID="Name1" runat="server" CssClass="form" />
- </div>
- <div class="surnameForm">
- <asp:Label ID="SurnameLabel" runat="server" AssociatedControlID="Surname1" CssClass="label" Text="???????:" />
- <asp:TextBox ID="Surname1" runat="server" CssClass="form" />
- </div>
- <div class="lastNameForm">
- <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastName1" Text="????????:" CssClass="label" />
- <asp:TextBox ID="LastName1" runat="server" CssClass="form" />
- </div>
- <div class="phoneForm">
- <asp:Label ID="PhoneLabel" runat="server" AssociatedControlID="Phone1" Text="???????:" CssClass="label" />
- <asp:TextBox ID="Phone1" runat="server" CssClass="form" />
- </div>
- <asp:Button runat="server" ID="btnConfirm" OnClick="EditUserProf" Text="????????" PostBackUrl="~/Default.aspx" />
- </div>
- </div>
- </div>
- </asp:Content>