PageRenderTime 50ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/Ataman/UserProfile.aspx

http://ataman.googlecode.com/
ASP.NET | 111 lines | 108 code | 3 blank | 0 comment | 9 complexity | c4727e54e04b036d8f4ebc7950411014 MD5 | raw file
  1. <%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="UserProfile.aspx.cs"
  2. Inherits="UserProfile" Title="&#1040;&#1090;&#1072;&#1084;&#1072;&#1085; &#1084;&#1077;&#1073;&#1077;&#1083;&#1100;: &#1051;&#1080;&#1095;&#1085;&#1099;&#1081; &#1082;&#1072;&#1073;&#1080;&#1085;&#1077;&#1090;" %>
  3. <script runat="server">
  4. public void EditUserProf(object sender, EventArgs e)
  5. {
  6. // Create an empty Profile for the newly created user
  7. //ProfileCommon p = (ProfileCommon)ProfileCommon.Properties.Remove(logName.ToString());
  8. ProfileCommon pr = (ProfileCommon)ProfileCommon.Create(logName.ToString(), true);
  9. // Populate some Profile properties off of the create user wizard
  10. if (Name1.Text != "") pr.Name = Name1.Text;
  11. if (Surname1.Text != "") pr.Surname = Surname1.Text;
  12. if (LastName1.Text != "") pr.LastName = LastName1.Text;
  13. if (Phone1.Text != "") pr.Phone = Phone1.Text;
  14. pr.Save();
  15. // p.Save();
  16. }
  17. </script>
  18. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  19. <div id="pagetitle">&#1051;&#1080;&#1095;&#1085;&#1099;&#1081; &#1082;&#1072;&#1073;&#1080;&#1085;&#1077;&#1090;</div>
  20. <div class="userProfile">
  21. <div class="clear">
  22. <div class ="personalInfo">
  23. <h1>???????????? ??????????</h1>
  24. <div class="logName">
  25. <asp:Label ID="lbllogName" AssociatedControlID="logName" Text="??????? ??????:" runat="server" />
  26. <asp:LoginName ID="logName" runat="server" />
  27. </div>
  28. <div class="userRole">
  29. <asp:Label ID="lblRole" AssociatedControlID="grdRoles" Text="????:" runat="server" />
  30. <asp:GridView id="grdRoles" DataSourceID="srcRoles" ShowHeader="false" EmptyDataText="user" GridLines="None" Runat="server" CssClass="roleName" />
  31. <asp:ObjectDataSource id="srcRoles" TypeName="System.Web.Security.Roles" SelectMethod="GetRolesForUser" Runat="server" />
  32. </div>
  33. <div class="userName">
  34. ???: <asp:Label ID="Name" runat="server" Text="" />
  35. </div>
  36. <div class="userSurname">
  37. ???????: <asp:Label ID="Surname" runat="server" Text="" />
  38. </div>
  39. <div class="userLastName">
  40. ????????: <asp:Label ID="LastName" runat="server" Text="" />
  41. </div>
  42. <div class="userPhone">
  43. ???????: <asp:Label ID="Phone" runat="server" Text="" />
  44. </div>
  45. </div>
  46. <div class="userForm">
  47. <asp:ChangePassword ID="ChangePassword1" runat="server" CssClass="userForm">
  48. <ChangePasswordTemplate>
  49. <h1>&#1048;&#1079;&#1084;&#1077;&#1085;&#1077;&#1085;&#1080;&#1077; &#1087;&#1072;&#1088;&#1086;&#1083;&#1103;</h1>
  50. <div class="currentPass">
  51. <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword" Text="&#1055;&#1072;&#1088;&#1086;&#1083;&#1100;:" CssClass="label" />
  52. <asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password" CssClass="form" />
  53. <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
  54. ErrorMessage="&#1042;&#1074;&#1077;&#1076;&#1080;&#1090;&#1077; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100;." ToolTip="&#1042;&#1074;&#1077;&#1076;&#1080;&#1090;&#1077; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100;." ValidationGroup="ChangePassword1">*
  55. </asp:RequiredFieldValidator>
  56. </div>
  57. <div class="newPass">
  58. <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword" Text="&#1053;&#1086;&#1074;&#1099;&#1081; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100;:" CssClass="label" />
  59. <asp:TextBox ID="NewPassword" runat="server" TextMode="Password" CssClass="form" />
  60. <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
  61. ErrorMessage="New Password is required." ToolTip="New Password is required." ValidationGroup="ChangePassword1">*
  62. </asp:RequiredFieldValidator>
  63. </div>
  64. <div class="confirmPas">
  65. <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword" Text="&#1055;&#1086;&#1076;&#1090;&#1074;&#1077;&#1088;&#1078;&#1076;&#1077;&#1085;&#1080;&#1077; &#1085;&#1086;&#1074;&#1086;&#1075;&#1086; &#1087;&#1072;&#1088;&#1086;&#1083;&#1103;:" CssClass="label" />
  66. <asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password" CssClass="form" />
  67. <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
  68. ErrorMessage="Confirm New Password is required." ToolTip="Confirm New Password is required." ValidationGroup="ChangePassword1">*
  69. </asp:RequiredFieldValidator>
  70. </div>
  71. <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword"
  72. ControlToValidate="ConfirmNewPassword" Display="Dynamic" ErrorMessage="&#1055;&#1086;&#1076;&#1090;&#1074;&#1077;&#1088;&#1078;&#1076;&#1077;&#1085;&#1080;&#1077; &#1080; &#1085;&#1086;&#1074;&#1099;&#1081; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100; &#1086;&#1083;&#1078;&#1085;&#1099; &#1089;&#1086;&#1074;&#1087;&#1072;&#1076;&#1072;&#1090;&#1100;."
  73. ValidationGroup="ChangePassword1"></asp:CompareValidator>
  74. <asp:Literal ID="FailureText" runat="server" EnableViewState="False" />
  75. <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword" Text="&#1048;&#1079;&#1084;&#1077;&#1085;&#1080;&#1090;&#1100; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100;"
  76. ValidationGroup="ChangePassword1" CssClass="changePassButton" />
  77. <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="&#1054;&#1090;&#1084;&#1077;&#1085;&#1072;" CssClass="cancelButton" />
  78. </ChangePasswordTemplate>
  79. <SuccessTemplate>
  80. &#1057;&#1084;&#1077;&#1085;&#1072; &#1087;&#1072;&#1088;&#1086;&#1083;&#1103; &#1079;&#1072;&#1074;&#1077;&#1088;&#1096;&#1077;&#1085;&#1072;.
  81. &#1055;&#1072;&#1088;&#1086;&#1083;&#1100; &#1080;&#1079;&#1084;&#1077;&#1085;&#1105;&#1085; &#1091;&#1089;&#1087;&#1077;&#1096;&#1085;&#1086;!
  82. <asp:Button ID="ContinuePushButton" runat="server" CausesValidation="False" CommandName="Continue" Text="&#1053;&#1072; &#1075;&#1083;&#1072;&#1074;&#1085;&#1091;&#1102;" PostBackUrl="~/Default.aspx"/>
  83. </SuccessTemplate>
  84. </asp:ChangePassword>
  85. </div>
  86. <div class="userDetails">
  87. <h1>????????? ?????? ?????</h1>
  88. <div class="nameForm">
  89. <asp:Label ID="NameLabel" runat="server" AssociatedControlID="Name1" Text="???:" CssClass="label" />
  90. <asp:TextBox ID="Name1" runat="server" CssClass="form" />
  91. </div>
  92. <div class="surnameForm">
  93. <asp:Label ID="SurnameLabel" runat="server" AssociatedControlID="Surname1" CssClass="label" Text="???????:" />
  94. <asp:TextBox ID="Surname1" runat="server" CssClass="form" />
  95. </div>
  96. <div class="lastNameForm">
  97. <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastName1" Text="????????:" CssClass="label" />
  98. <asp:TextBox ID="LastName1" runat="server" CssClass="form" />
  99. </div>
  100. <div class="phoneForm">
  101. <asp:Label ID="PhoneLabel" runat="server" AssociatedControlID="Phone1" Text="???????:" CssClass="label" />
  102. <asp:TextBox ID="Phone1" runat="server" CssClass="form" />
  103. </div>
  104. <asp:Button runat="server" ID="btnConfirm" OnClick="EditUserProf" Text="????????" PostBackUrl="~/Default.aspx" />
  105. </div>
  106. </div>
  107. </div>
  108. </asp:Content>