initial commit
This commit is contained in:
commit
252dac3143
1516 changed files with 694271 additions and 0 deletions
41
Security/ForgotUser.aspx
Normal file
41
Security/ForgotUser.aspx
Normal file
|
@ -0,0 +1,41 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="ForgotUser.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.ForgotUser" %>
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="BaseClasses" Namespace="BaseClasses.Web.UI.WebControls" Assembly="BaseClasses" %><%@ Register TagPrefix="asp" Namespace="Recaptcha" Assembly="Recaptcha" %>
|
||||
<asp:Content id="PageSection" ContentPlaceHolderID="PageContent" Runat="server">
|
||||
<a id="StartOfPageContent"></a>
|
||||
<asp:UpdateProgress runat="server" id="UpdatePanel1_UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1">
|
||||
<ProgressTemplate>
|
||||
<div class="ajaxUpdatePanel">
|
||||
</div>
|
||||
<div style=" position:absolute; padding:30px;">
|
||||
<img src="../Images/updating.gif" alt="Updating" />
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
<asp:UpdatePanel runat="server" id="UpdatePanel1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<input type="hidden" id="_clientSideIsPostBack" name="clientSideIsPostBack" runat="server" />
|
||||
<table cellpadding="0" cellspacing="0" border="0"><tr><td><table class="dv" cellpadding="0" cellspacing="0" border="0"><tr><td class="dh"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="dhel"><img src="../Images/space.gif" alt="" /></td><td class="dheci" valign="middle"><asp:CollapsiblePanelExtender id="BlankFramePanelExtender" runat="server" TargetControlid="BlankFrameCollapsibleRegion" ExpandControlID="BlankFrameIcon" CollapseControlID="BlankFrameIcon" ImageControlID="BlankFrameIcon" ExpandedImage="../images/icon_panelcollapse.gif" CollapsedImage="../images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="BlankFrameIcon" runat="server" ToolTip="<%# GetResourceValue("Btn:ExpandCollapse") %>" causesvalidation="False" imageurl="../images/icon_panelcollapse.gif" /></td><td class="dhb"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="dht" valign="middle"><asp:Label runat="server" id="PanelTitle" Text="<%# GetResourceValue("Title:ForgotUser", "Persons") %>"> </asp:Label></td></tr></table>
|
||||
</td><td class="dher"><img src="../Images/space.gif" alt="" /></td></tr></table>
|
||||
</td></tr><tr><td><asp:panel id="BlankFrameCollapsibleRegion" runat="server"><table class="dv" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="dBody"><table cellpadding="0" cellspacing="0" border="0" class="dBody" align="center" width="100%"><tr><td style="padding-left: 8px; padding-top: 10px; padding-bottom:10px; padding-right:10px;"><b><asp:Label runat="server" id="ForgotUserInfoLabel" Text="<%# GetResourceValue("Txt:UserEmailed", "Persons") %>"> </asp:Label>
|
||||
<asp:Label runat="server" id="ForgotUserErrorLabel" visible="False"> </asp:Label></b></td></tr><tr><td style="padding-left: 8px; padding-top: 10px; padding-bottom:10px;"><nobr></nobr><asp:Label runat="server" id="EnterEmailLabel" Text="<%# GetResourceValue("Txt:EnterEmail", "Persons") %>"> </asp:Label>
|
||||
<br /><br />
|
||||
<asp:TextBox runat="server" id="Emailaddress" columns="50"> </asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" id="EmailaddressRequiredFieldValidator" ControlToValidate="Emailaddress" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Emailaddress") %>" enabled="True"> </asp:RequiredFieldValidator></td></tr><tr><td style="padding-left: 8px; padding-top: 10px; padding-bottom:10px;"><asp:Label runat="server" id="FillRecaptchaLabel" Text="<%# GetResourceValue("Txt:EnterCaptcha", "Persons") %>"> </asp:Label>
|
||||
<br /><br />
|
||||
<asp:RecaptchaControl ID="recaptcha" runat="server" theme="clean" PublicKey="Enter your key here" PrivateKey="Enter your key here" /></td></tr><tr><td style="padding-left:8px;padding-top:10px;padding-bottom:10px;text-align:center;"><table><tr><td style="width: 40%;"> </td><td><Persons:ThemeButton runat="server" id="SendButton" button-causesvalidation="True" button-commandname="ResetData" button-text="<%# GetResourceValue("Btn:Send", "Persons") %>" button-tooltip="<%# GetResourceValue("Btn:Send", "Persons") %>" commandname="EmailLinkButton_Command"></Persons:ThemeButton></td><td style="width: 40%;"> </td></tr></table>
|
||||
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</td></tr></table></ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"></div>
|
||||
<asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"></asp:ValidationSummary>
|
||||
</asp:Content>
|
658
Security/ForgotUser.aspx.vb
Normal file
658
Security/ForgotUser.aspx.vb
Normal file
|
@ -0,0 +1,658 @@
|
|||
|
||||
' This file implements the code-behind class for ForgotUser.aspx.
|
||||
' App_Code\ForgotUser.Controls.vb contains the Table, Row and Record control classes
|
||||
' for the page. Best practices calls for overriding methods in the Row or Record control classes.
|
||||
|
||||
#Region "Imports statements"
|
||||
|
||||
Option Strict On
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Collections
|
||||
Imports System.Collections.Generic
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports System.Web.UI
|
||||
Imports System.Web.UI.WebControls
|
||||
Imports BaseClasses
|
||||
Imports BaseClasses.Utils
|
||||
Imports BaseClasses.Utils.StringUtils
|
||||
Imports BaseClasses.Data
|
||||
Imports BaseClasses.Data.SqlProvider
|
||||
Imports BaseClasses.Data.OrderByItem.OrderDir
|
||||
Imports BaseClasses.Data.BaseFilter
|
||||
Imports BaseClasses.Data.BaseFilter.ComparisonOperator
|
||||
Imports BaseClasses.Web.UI.WebControls
|
||||
|
||||
Imports Persons.Business
|
||||
Imports Persons.Data
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Namespace Persons.UI
|
||||
|
||||
Partial Public Class ForgotUser
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the ForgotUser page.
|
||||
' Place your customizations in Section 1. Do not modify Section 2.
|
||||
|
||||
#Region "Section 1: Place your customizations here."
|
||||
|
||||
Public Sub SetPageFocus()
|
||||
'load scripts to all controls on page so that they will retain focus on PostBack
|
||||
Me.LoadFocusScripts(Me.Page)
|
||||
'To set focus on page load to a specific control pass this control to the SetStartupFocus method. To get a hold of a control
|
||||
'use FindControlRecursively method. For example:
|
||||
'Dim controlToFocus As System.Web.UI.WebControls.TextBox = DirectCast(Me.FindControlRecursively("ProductsSearch"), System.Web.UI.WebControls.TextBox)
|
||||
'Me.SetFocusOnLoad(controlToFocus)
|
||||
'If no control is passed or control does not exist this method will set focus on the first focusable control on the page.
|
||||
Me.SetFocusOnLoad()
|
||||
End Sub
|
||||
|
||||
Public Sub LoadData()
|
||||
' LoadData reads database data and assigns it to UI controls.
|
||||
' Customize by adding code before or after the call to LoadData_Base()
|
||||
' or replace the call to LoadData_Base().
|
||||
LoadData_Base()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate as BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object), ByVal includeDS as Boolean) As String
|
||||
Return EvaluateFormula_Base(formula, dataSourceForEvaluate, format, variables, includeDS)
|
||||
End Function
|
||||
|
||||
Public Sub Page_InitializeEventHandlers(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Init
|
||||
' Handles MyBase.Init.
|
||||
' Register the Event handler for any Events.
|
||||
Me.Page_InitializeEventHandlers_Base(sender,e)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub SaveControlsToSession()
|
||||
SaveControlsToSession_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Overrides Sub ClearControlsFromSession()
|
||||
ClearControlsFromSession_Base()
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub LoadViewState(ByVal savedState As Object)
|
||||
LoadViewState_Base(savedState)
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Overrides Function SaveViewState() As Object
|
||||
Return SaveViewState_Base()
|
||||
End Function
|
||||
|
||||
Public Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
|
||||
Me.Page_PreRender_Base(sender,e)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub SaveData()
|
||||
Me.SaveData_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub SetChartControl(ByVal chartCtrlName As String)
|
||||
Me.SetChartControl_Base(chartCtrlName)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
|
||||
'Override call to PreInit_Base() here to change top level master page used by this page.
|
||||
'For example for SharePoint applications uncomment next line to use Microsoft SharePoint default master page
|
||||
'If Not Me.Master Is Nothing Then Me.Master.MasterPageFile = Microsoft.SharePoint.SPContext.Current.Web.MasterUrl
|
||||
'You may change here assignment of application theme
|
||||
Try
|
||||
Me.PreInit_Base()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#Region "Ajax Functions"
|
||||
|
||||
<Services.WebMethod()> _
|
||||
Public Shared Function GetRecordFieldValue(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal fieldName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
' GetRecordFieldValue gets the pop up window content from the column specified by
|
||||
' columnName in the record specified by the recordID in data base table specified by tableName.
|
||||
' Customize by adding code before or after the call to GetRecordFieldValue_Base()
|
||||
' or replace the call to GetRecordFieldValue_Base().
|
||||
Return GetRecordFieldValue_Base(tableName, recordID, columnName, fieldName, title, persist, popupWindowHeight, popupWindowWidth, popupWindowScrollBar)
|
||||
End Function
|
||||
|
||||
<Services.WebMethod()> _
|
||||
Public Shared Function GetImage(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
' GetImage gets the Image url for the image in the column "columnName" and
|
||||
' in the record specified by recordID in data base table specified by tableName.
|
||||
' Customize by adding code before or after the call to GetImage_Base()
|
||||
' or replace the call to GetImage_Base().
|
||||
Return GetImage_Base(tableName, recordID, columnName, title, persist, popupWindowHeight, popupWindowWidth, popupWindowScrollBar)
|
||||
End Function
|
||||
|
||||
Protected Overloads Overrides Sub BasePage_PreRender(ByVal sender As Object, ByVal e As EventArgs)
|
||||
MyBase.BasePage_PreRender(sender, e)
|
||||
Base_RegisterPostback()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
' Page Event Handlers - buttons, sort, links
|
||||
|
||||
Public Sub SendButton_Click(ByVal sender As Object, ByVal args As EventArgs)
|
||||
' Click handler for SendButton.
|
||||
' Customize by adding code before the call or replace the call to the Base function with your own code.
|
||||
SendButton_Click_Base(sender, args)
|
||||
' NOTE: If the Base function redirects to another page, any code here will not be executed.
|
||||
End Sub
|
||||
|
||||
Public Sub SendEmailOnSendButton_Click()
|
||||
|
||||
' Customize by adding code before the call or replace the call to the Base function with your own code.
|
||||
SendEmailOnSendButton_Click_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
' Write out the Set methods
|
||||
|
||||
|
||||
' Write out the methods for DataSource
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Section 2: Do not modify this section."
|
||||
|
||||
Protected Sub Page_InitializeEventHandlers_Base(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
|
||||
' This page does not have FileInput control inside repeater which requires "multipart/form-data" form encoding, but it might
|
||||
'include ascx controls which in turn do have FileInput controls inside repeater. So check if they set Enctype property.
|
||||
If Not String.IsNullOrEmpty(Me.Enctype) Then Me.Page.Form.Enctype = Me.Enctype
|
||||
|
||||
|
||||
' the following code for accordion is necessary or the Me.{ControlName} will return Nothing
|
||||
|
||||
' Register the Event handler for any Events.
|
||||
|
||||
|
||||
' Setup the pagination events.
|
||||
|
||||
AddHandler Me.SendButton.Button.Click, AddressOf SendButton_Click
|
||||
|
||||
Me.ClearControlsFromSession()
|
||||
End Sub
|
||||
|
||||
Private Sub Base_RegisterPostback()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New()
|
||||
Me.IsUpdatesSessionNavigationHistory = False
|
||||
End Sub
|
||||
|
||||
|
||||
' Handles MyBase.Load. Read database data and put into the UI controls.
|
||||
' If you need to, you can add additional Load handlers in Section 1.
|
||||
Protected Overridable Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
Me.SetPageFocus()
|
||||
|
||||
' Check if user has access to this page. Redirects to either sign-in page
|
||||
' or 'no access' page if not. Does not do anything if role-based security
|
||||
' is not turned on, but you can override to add your own security.
|
||||
Me.Authorize("")
|
||||
|
||||
If (Not Me.IsPostBack) Then
|
||||
|
||||
' Setup the header text for the validation summary control.
|
||||
Me.ValidationSummary1.HeaderText = GetResourceValue("ValidationSummaryHeaderText", "Persons")
|
||||
|
||||
End If
|
||||
|
||||
'set value of the hidden control depending on the postback. It will be used by SetFocus script on the client side.
|
||||
Dim clientSideIsPostBack As System.Web.UI.HtmlControls.HtmlInputHidden = DirectCast(Me.FindControlRecursively("_clientSideIsPostBack"), System.Web.UI.HtmlControls.HtmlInputHidden)
|
||||
If Not clientSideIsPostBack Is Nothing Then
|
||||
If Me.IsPostBack AndAlso Not Me.Request("__EVENTTARGET") = "ChildWindowPostBack" Then
|
||||
clientSideIsPostBack.Value = "Y"
|
||||
Else
|
||||
clientSideIsPostBack.Value = "N"
|
||||
End If
|
||||
End If
|
||||
|
||||
' Load data only when displaying the page for the first time or if postback from child window
|
||||
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
|
||||
' Read the data for all controls on the page.
|
||||
' To change the behavior, override the DataBind method for the individual
|
||||
' record or table UI controls.
|
||||
Me.LoadData()
|
||||
End If
|
||||
|
||||
|
||||
Page.Title = GetResourceValue("Title:ForgotUser") + ""
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetRecordFieldValue_Base(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal fieldName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
If Not IsNothing(recordID) Then
|
||||
recordID = System.Web.HttpUtility.UrlDecode(recordID)
|
||||
End If
|
||||
Dim content as String = BaseClasses.Utils.MiscUtils.GetFieldData(tableName, recordID, columnName)
|
||||
|
||||
content = NetUtils.EncodeStringForHtmlDisplay(content)
|
||||
|
||||
'returnValue is an array of string values.
|
||||
'returnValue(0) represents title of the pop up window
|
||||
'returnValue(1) represents content of the pop up window
|
||||
' retrunValue(2) represents whether pop up window should be made persistant
|
||||
' or it should closes as soon as mouse moved out.
|
||||
' returnValue(5) represents whether pop up window should contain scroll bar.
|
||||
' returnValue(3), (4) represents pop up window height and width respectivly
|
||||
' (0),(2),(3),(4) and (5) is initially set as pass through attribute.
|
||||
' They can be modified by going to Attribute tab of the properties window of the control in aspx page.
|
||||
Dim returnValue(6) As Object
|
||||
returnValue(0) = title
|
||||
returnValue(1) = content
|
||||
returnValue(2) = persist
|
||||
returnValue(3) = popupWindowWidth
|
||||
returnValue(4) = popupWindowHeight
|
||||
returnValue(5) = popupWindowScrollBar
|
||||
Return returnValue
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function GetImage_Base(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
Dim content As String = "<IMG alt =""" & title & """ src =" & """../Shared/ExportFieldValue.aspx?Table=" & tableName & "&Field=" & columnName & "&Record=" & recordID & """/>"
|
||||
'returnValue is an array of string values.
|
||||
'returnValue(0) represents title of the pop up window.
|
||||
'returnValue(1) represents content ie, image url.
|
||||
' retrunValue(2) represents whether pop up window should be made persistant
|
||||
' or it should closes as soon as mouse moved out.
|
||||
' returnValue(3), (4) represents pop up window height and width respectivly
|
||||
' returnValue(5) represents whether pop up window should contain scroll bar.
|
||||
' (0),(2),(3),(4) and (5) is initially set as pass through attribute.
|
||||
' They can be modified by going to Attribute tab of the properties window of the control in aspx page.
|
||||
Dim returnValue(6) As Object
|
||||
returnValue(0) = title
|
||||
returnValue(1) = content
|
||||
returnValue(2) = persist
|
||||
returnValue(3) = popupWindowWidth
|
||||
returnValue(4) = popupWindowHeight
|
||||
returnValue(5) = popupWindowScrollBar
|
||||
Return returnValue
|
||||
End Function
|
||||
|
||||
Public Sub SetChartControl_Base(ByVal chartCtrlName As String)
|
||||
' Load data for each record and table UI control.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub SaveData_Base()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub SaveControlsToSession_Base()
|
||||
MyBase.SaveControlsToSession()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ClearControlsFromSession_Base()
|
||||
MyBase.ClearControlsFromSession()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadViewState_Base(ByVal savedState As Object)
|
||||
MyBase.LoadViewState(savedState)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Function SaveViewState_Base() As Object
|
||||
|
||||
Return MyBase.SaveViewState()
|
||||
End Function
|
||||
|
||||
|
||||
Public Sub PreInit_Base()
|
||||
'If it is SharePoint application this function performs dynamic Master Page assignment.
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Page_PreRender_Base(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
|
||||
' Load data for each record and table UI control.
|
||||
|
||||
' Data bind for each chart UI control.
|
||||
|
||||
InitializeEmail()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
' Load data from database into UI controls.
|
||||
' Modify LoadData in Section 1 above to customize. Or override DataBind() in
|
||||
' the individual table and record controls to customize.
|
||||
Public Sub LoadData_Base()
|
||||
Try
|
||||
|
||||
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
|
||||
' Must start a transaction before performing database operations
|
||||
DbUtils.StartTransaction()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Me.DataBind()
|
||||
|
||||
' Load and bind data for each record and table UI control.
|
||||
|
||||
|
||||
' Load data for chart.
|
||||
|
||||
|
||||
' initialize aspx controls
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
' An error has occured so display an error message.
|
||||
Utils.RegisterJScriptAlert(Me, "Page_Load_Error_Message", ex.Message)
|
||||
Finally
|
||||
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
|
||||
' End database transaction
|
||||
DbUtils.EndTransaction()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public EvaluateFormulaDelegate As BaseClasses.Data.DataSource.EvaluateFormulaDelegate = New BaseClasses.Data.DataSource.EvaluateFormulaDelegate(AddressOf Me.EvaluateFormula)
|
||||
|
||||
Public Overridable Function EvaluateFormula_Base(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object), ByVal includeDS As Boolean) As String
|
||||
Dim e As FormulaEvaluator = New FormulaEvaluator()
|
||||
|
||||
' add variables for formula evaluation
|
||||
If variables IsNot Nothing Then
|
||||
Dim enumerator As System.Collections.Generic.IEnumerator(Of System.Collections.Generic.KeyValuePair(Of String, Object)) = variables.GetEnumerator()
|
||||
While enumerator.MoveNext()
|
||||
e.Variables.Add(enumerator.Current.Key, enumerator.Current.Value)
|
||||
End While
|
||||
End If
|
||||
|
||||
If includeDS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
e.CallingControl = Me
|
||||
|
||||
e.DataSource = dataSourceForEvaluate
|
||||
|
||||
|
||||
Dim resultObj As Object = e.Evaluate(formula)
|
||||
If resultObj Is Nothing Then
|
||||
Return ""
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(format) AndAlso (String.IsNullOrEmpty(formula) OrElse formula.IndexOf("Format(") < 0) Then
|
||||
Return FormulaUtils.Format(resultObj, format)
|
||||
Else
|
||||
Return resultObj.ToString()
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object)) As String
|
||||
Return EvaluateFormula(formula, dataSourceForEvaluate, format, variables, True)
|
||||
End Function
|
||||
|
||||
|
||||
Private Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord) As String
|
||||
Return EvaluateFormula(formula, dataSourceForEvaluate, Nothing, Nothing, True)
|
||||
End Function
|
||||
|
||||
Public Function EvaluateFormula(ByVal formula As String, ByVal includeDS As Boolean) As String
|
||||
Return EvaluateFormula(formula, Nothing, Nothing, Nothing, includeDS)
|
||||
End Function
|
||||
|
||||
Public Function EvaluateFormula(ByVal formula As String) As String
|
||||
Return EvaluateFormula(formula, Nothing, Nothing, Nothing, True)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
' Write out the Set methods
|
||||
|
||||
|
||||
' Write out the DataSource properties and methods
|
||||
|
||||
|
||||
' Write out event methods for the page events
|
||||
|
||||
' event handler for Button with Layout
|
||||
Public Sub SendButton_Click_Base(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
Try
|
||||
|
||||
SendEmailOnSendButton_Click()
|
||||
|
||||
Catch ex As Exception
|
||||
Me.ErrorOnPage = True
|
||||
|
||||
' Report the error message to the end user
|
||||
Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", ex.Message)
|
||||
|
||||
' when there is an error sending email, redirect back to this page to do it again
|
||||
'get the user name from any argument
|
||||
|
||||
Dim uname As String = Me.Request.QueryString("Username")
|
||||
|
||||
Dim uarg As String = "?Username=" & uname & "&Error=" & ex.Message & "&Email=" & Me.Emailaddress.Text
|
||||
|
||||
Dim myUrl As String = BaseClasses.Configuration.ApplicationSettings.Current.ForgotUserPageUrl()
|
||||
|
||||
Response.ClearContent()
|
||||
Response.Redirect(myUrl & uarg)
|
||||
Response.End()
|
||||
|
||||
Finally
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub SendEmailOnSendButton_Click_Base()
|
||||
SendPasswordToUser()
|
||||
End Sub
|
||||
|
||||
|
||||
' Initialize the email field from a Username argument
|
||||
Public Sub InitializeEmail()
|
||||
|
||||
If Me.IsPostBack Then Return
|
||||
|
||||
'if there is a captcha control, then check that keys have been configured.
|
||||
Dim keyinit As String = "Enter"
|
||||
If recaptcha.PrivateKey.StartsWith(keyinit) OrElse recaptcha.PublicKey.StartsWith(keyinit) Then
|
||||
Me.FillRecaptchaLabel.Text = "You must configure the reCaptcha control with your key values before you use it."
|
||||
|
||||
' find any recaptcha_response_holder and make it invisible
|
||||
Dim pnlRecaptcha As Object = Me.FindControlRecursively("recaptcha_response_holder")
|
||||
If Not IsNull(pnlRecaptcha) Then
|
||||
CType(pnlRecaptcha, System.Web.UI.Control).Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
'get the user name and error message from any arguments
|
||||
|
||||
Dim uname As String = Me.Request.QueryString("Username")
|
||||
|
||||
Dim uerror As String = Me.Request.QueryString("Error")
|
||||
Dim emailarg As String = Me.Request.QueryString("Email")
|
||||
Me.Emailaddress.Text = ""
|
||||
|
||||
' if there is a user name given, start with any email address for it.
|
||||
Dim uemail As String = ""
|
||||
If Not String.IsNullOrEmpty(emailarg) Then
|
||||
' initialize the email address with the value in the argument
|
||||
uemail = emailarg
|
||||
If Not String.IsNullOrEmpty(uemail) Then
|
||||
Me.Emailaddress.Text = uemail
|
||||
End If
|
||||
ElseIf Not String.IsNullOrEmpty(uname) Then
|
||||
|
||||
' get the user record from the DB
|
||||
Dim rec As IUserIdentityRecord = Nothing
|
||||
Try
|
||||
rec = SystemUtils.GetUserInfoNoPassword(uname)
|
||||
Catch ex As Exception
|
||||
rec = Nothing
|
||||
End Try
|
||||
If Not IsNothing(rec) Then
|
||||
|
||||
' then initialize the email address with the value in the record
|
||||
uemail = rec.GetUserEmail()
|
||||
If Not String.IsNullOrEmpty(uemail) Then
|
||||
Me.Emailaddress.Text = uemail
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(uerror) Then
|
||||
Me.ForgotUserInfoLabel.Visible = False
|
||||
Me.ForgotUserErrorLabel.Visible = True
|
||||
Me.ForgotUserErrorLabel.Text = uerror
|
||||
Else
|
||||
Me.ForgotUserErrorLabel.Text = ""
|
||||
Me.ForgotUserInfoLabel.Visible = True
|
||||
Me.ForgotUserErrorLabel.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
'Send the user password to the user email
|
||||
'If link button was removed from the page this method has empty content.
|
||||
Private Sub SendPasswordToUser()
|
||||
'if there is a user identity table, with an email address field,
|
||||
'then send the user name and password to the user email
|
||||
|
||||
If Not Me.Page.IsValid() Then
|
||||
Dim exc As New Exception(Me.recaptcha.ErrorMessage)
|
||||
Throw exc
|
||||
End If
|
||||
|
||||
' The email address is required by validation
|
||||
Dim uemail As String = Me.Emailaddress.Text
|
||||
|
||||
' lookup the email address in the user identity table and abort if not present
|
||||
|
||||
' send the login info to the user email
|
||||
Dim email As New BaseClasses.Utils.MailSenderInThread()
|
||||
email.AddFrom(uemail)
|
||||
email.AddTo(uemail)
|
||||
email.SetSubject(GetResourceValue("Txt:GetSignin"))
|
||||
|
||||
' Be sure the URL is processed for substitution and encryption
|
||||
Dim uarg As String = CType(Me.Page, BaseApplicationPage).Encrypt(uemail, False)
|
||||
Dim cultarg As String = System.Threading.Thread.CurrentThread.CurrentUICulture.Name
|
||||
If Not String.IsNullOrEmpty(cultarg) Then
|
||||
cultarg = System.Web.HttpUtility.UrlEncode(cultarg)
|
||||
cultarg = BaseClasses.Web.UI.BasePage.APPLICATION_CULTURE_UI_URL_PARAM & "=" & cultarg
|
||||
End If
|
||||
|
||||
Dim SendEmailContentURL As String
|
||||
Dim pgUrl As String = BaseClasses.Configuration.ApplicationSettings.Current.SendUserInfoEmailUrl()
|
||||
If pgUrl.StartsWith("/") Then
|
||||
pgUrl = pgUrl.Substring(1)
|
||||
End If
|
||||
|
||||
SendEmailContentURL = pgUrl & "?Email=" & System.Web.HttpUtility.UrlEncode(uarg)
|
||||
If Not String.IsNullOrEmpty(cultarg) Then
|
||||
SendEmailContentURL &= "&" & cultarg
|
||||
End If
|
||||
|
||||
email.AreImagesEmbedded = True
|
||||
email.SetIsHtmlContent(True)
|
||||
email.SetContentURL(SendEmailContentURL, Me)
|
||||
|
||||
Try
|
||||
email.SendMessage()
|
||||
Catch ex As Exception
|
||||
Dim msg As String = GetResourceValue("Msg:SendToFailed") & " " & uemail & "<br />" & ex.Message
|
||||
Dim exc As New Exception(msg)
|
||||
Throw exc
|
||||
End Try
|
||||
|
||||
Me.ForgotUserInfoLabel.Visible = True
|
||||
Me.ForgotUserInfoLabel.Text = GetResourceValue("Msg:PwdEmailed") & " " & uemail
|
||||
Me.ForgotUserErrorLabel.Text = ""
|
||||
Me.ForgotUserErrorLabel.Visible = False
|
||||
Me.EnterEmailLabel.Visible = False
|
||||
Me.Emailaddress.Visible = False
|
||||
|
||||
Me.FillRecaptchaLabel.Visible = False
|
||||
|
||||
Me.recaptcha.SkipRecaptcha = True
|
||||
Me.recaptcha.Visible = False
|
||||
|
||||
Me.SendButton.Visible = False
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
476
Security/ForgotUser.xml
Normal file
476
Security/ForgotUser.xml
Normal file
|
@ -0,0 +1,476 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<ComponentDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ironspeed.com/designer">
|
||||
<Generator>Iron Speed Designer</Generator>
|
||||
<Version>9.2.0</Version>
|
||||
<Self>
|
||||
<Name>ForgotUser</Name>
|
||||
<Type>Page</Type>
|
||||
<SubType>DotNet</SubType>
|
||||
<MasterLayout>~/Master Pages/HorizontalMenu.master</MasterLayout>
|
||||
<GenerateDirectory>Security</GenerateDirectory>
|
||||
<Layout>Security\ForgotUser.xml</Layout>
|
||||
<DisplayName>ForgotUser</DisplayName>
|
||||
<Description>This is a blank page.</Description>
|
||||
<CheckSum>1629257623-1142</CheckSum>
|
||||
</Self>
|
||||
<ComposedOf>
|
||||
<ContainedComponent>
|
||||
<Name>Emailaddress</Name>
|
||||
<Type>TextBox</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Columns</Name>
|
||||
<Value>50</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EmailaddressRequiredFieldValidator:Enabled</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>EnterEmailLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:EnterEmail</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>FillRecaptchaLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:EnterCaptcha</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>ForgotUserErrorLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Visible</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>ForgotUserInfoLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:UserEmailed</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PageTitle</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>{Title:ForgotUser}</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PanelTitle</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Title:ForgotUser</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>recaptcha</Name>
|
||||
<Type>Aspx</Type>
|
||||
<ControlClass>Recaptcha.RecaptchaControl</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SendButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.html</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>ResetData</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Consumers</Name>
|
||||
<Value>page</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:Send</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-ToolTip</Name>
|
||||
<Value>Btn:Send</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>EmailLinkButton_Command</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>UpdatePanel1</Name>
|
||||
<Type>UpdatePanel</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>SmoothPanelUpdate</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
</ComposedOf>
|
||||
<LayoutDefinition><![CDATA[<?xml version="1.0" encoding="utf-16"?>
|
||||
<LayoutDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Layout Name="Page" Type="RootLayout">
|
||||
<Prolog>
|
||||
<Value>&lt;%@ Register TagPrefix="asp" Namespace="Recaptcha" Assembly="Recaptcha" %&gt;
|
||||
&lt;asp:Content id="PageSection" ContentPlaceHolderID="PageContent" Runat="server"&gt;
|
||||
&lt;a id="StartOfPageContent"&gt;&lt;/a&gt;
|
||||
&lt;GEN:UPDATEPANEL NAME="UpdatePanel1"&gt;</Value>
|
||||
</Prolog>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="BlankPanelWithHeader"/&gt;</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog>
|
||||
<Value>&lt;/GEN:UPDATEPANEL&gt;
|
||||
&lt;div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"&gt;&lt;/div&gt;
|
||||
&lt;asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"&gt;&lt;/asp:ValidationSummary&gt;
|
||||
&lt;/asp:Content&gt;</Value>
|
||||
</Epilog>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="BlankPanelWithHeader" Type="BlankPanel">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="BlankFramePanelHeader"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dh</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;asp:panel id="BlankFrameCollapsibleRegion" runat="server"&gt;&lt;GEN:PANEL NAME="BlankFramePanel"/&gt;&lt;/asp:panel&gt;</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog />
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="BlankFramePanelHeader" Type="BlankPanel">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhel</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;asp:CollapsiblePanelExtender id="BlankFramePanelExtender" runat="server" TargetControlid="BlankFrameCollapsibleRegion" ExpandControlID="BlankFrameIcon" CollapseControlID="BlankFrameIcon" ImageControlID="BlankFrameIcon" ExpandedImage="../images/icon_panelcollapse.gif" CollapsedImage="../images/icon_panelexpand.gif" SuppressPostBack="true"/&gt;
|
||||
&lt;asp:ImageButton id="BlankFrameIcon" runat="server" ToolTip="&amp;lt;%# GetResourceValue(&amp;quot;Btn:ExpandCollapse&amp;quot;) %&amp;gt;" causesvalidation="False" imageurl="../images/icon_panelcollapse.gif" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dheci</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="BlankFrameTitleRegion"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhb</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dher</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog />
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>100%</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="BlankFrameTitleRegion" Type="BlankPanel">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL Name="PanelTitle" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dht</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog />
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="BlankFramePanel" Type="BlankPanel">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="BlankPanel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dBody</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog />
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>100%</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="BlankPanel" Type="BlankPanel">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;b&gt;&lt;GEN:LABEL Name="ForgotUserInfoLabel" /&gt;
|
||||
&lt;GEN:LABEL Name="ForgotUserErrorLabel" /&gt;&lt;/b&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>padding-left: 8px; padding-top: 10px; padding-bottom:10px; padding-right:10px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;nobr&gt;&lt;/nobr&gt;&lt;GEN:LABEL Name="EnterEmailLabel" /&gt;&lt;/nobr&gt;
|
||||
&lt;br /&gt;&lt;br /&gt;
|
||||
&lt;GEN:TEXTBOX Name="Emailaddress" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>padding-left: 8px; padding-top: 10px; padding-bottom:10px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL Name="FillRecaptchaLabel" /&gt;
|
||||
&lt;br /&gt;&lt;br /&gt;
|
||||
&lt;asp:RecaptchaControl ID="recaptcha" runat="server" theme="clean" PublicKey="Enter your key here" PrivateKey="Enter your key here" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>padding-left: 8px; padding-top: 10px; padding-bottom:10px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="BlankPanelNoHeader" /&gt;
|
||||
</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>padding-left:8px;padding-top:10px;padding-bottom:10px;text-align:center;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog />
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dBody</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>align</Name>
|
||||
<AttributeValue>center</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>100%</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="BlankPanelNoHeader" Type="BlankPanel">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&amp;nbsp;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>width: 40%;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="SendButton" /&gt;</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&amp;nbsp;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>width: 40%;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog />
|
||||
<TableAttributes />
|
||||
</Layout>
|
||||
</LayoutDefinition>]]></LayoutDefinition>
|
||||
</ComponentDefinition>
|
22
Security/SignIn.aspx
Normal file
22
Security/SignIn.aspx
Normal file
|
@ -0,0 +1,22 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="SignIn.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.SignIn" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="BaseClasses" Namespace="BaseClasses.Web.UI.WebControls" Assembly="BaseClasses" %><asp:Content id="Content" ContentPlaceHolderID="PageContent" runat="server">
|
||||
<a id="StartOfPageContent"></a>
|
||||
<table class="dv" cellpadding="0" cellspacing="0" border="0"><tr><td class="dh"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="dhel"><img src="../Images/space.gif" alt="" /></td><td class="dheci" valign="middle"><asp:CollapsiblePanelExtender id="SignInCPExtender" runat="server" TargetControlid="SignInCollapsibleRegion" ExpandControlID="SignInToggleIcon" CollapseControlID="SignInToggleIcon" ImageControlID="SignInToggleIcon" ExpandedImage="../images/icon_panelcollapse.gif" CollapsedImage="../images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="SignInToggleIcon" runat="server" ToolTip="<%# GetResourceValue("Btn:ExpandCollapse", "Persons") %>" causesvalidation="False" imageurl="../images/icon_panelcollapse.gif" />
|
||||
</td><td class="dhb"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="dht" valign="middle"><asp:Literal runat="server" id="DialogTitle" Text="<%# GetResourceValue("Txt:SignIn", "Persons") %>"> </asp:Literal></td></tr></table>
|
||||
</td><td class="dher"><img src="../Images/space.gif" alt="" /></td></tr></table>
|
||||
</td></tr><tr><td class="dBody"><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("OKButton")) %><asp:panel id="SignInCollapsibleRegion" runat="server"><table cellpadding="0" cellspacing="0" border="0" width="325"><tr><td style="padding-left:8px; padding-right:8px; padding-top:4px"><table cellpadding="1" cellspacing="1" border="0"><tr><td colspan="4" style="height: 5px;"></td></tr><tr><td colspan="4"><asp:Label runat="server" id="LoginMessage"> </asp:Label></td></tr><tr><td colspan="4" style="height: 5px;"></td></tr><tr><td class="field_label"><asp:Label runat="server" id="UserNameLabel" Text="<%# GetResourceValue("Txt:UserName", "Persons") %>"> </asp:Label></td><td class="field_value"><asp:TextBox runat="server" id="UserName" columns="50" commandname="TextBoxUserName_Command" cssclass="field_input"> </asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" id="UserNameRequiredFieldValidator" ControlToValidate="UserName" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "UserName") %>" display="None" enabled="True"> </asp:RequiredFieldValidator></td><td><asp:CheckBox runat="server" id="RememberUserName" commandname="CheckBoxUN_Command" postback="True"> </asp:CheckBox></td><td class="field_label"><asp:Label runat="server" id="RememberUserNameLabel" Text="<%# GetResourceValue("Txt:RememberUN", "Persons") %>"> </asp:Label></td></tr><tr><td colspan="4" style="height: 5px;"></td></tr><tr><td class="field_label"><asp:Label runat="server" id="PasswordLabel" Text="<%# GetResourceValue("Txt:Password", "Persons") %>"> </asp:Label></td><td class="field_value"><asp:TextBox runat="server" id="Password" columns="50" commandname="TextBoxPassword_Command" cssclass="field_input" textmode="Password"> </asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" id="PasswordRequiredFieldValidator" ControlToValidate="Password" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Password") %>" display="None" enabled="True"> </asp:RequiredFieldValidator></td><td><asp:CheckBox runat="server" id="RememberPassword" commandname="CheckBoxPass_Command" postback="True"> </asp:CheckBox></td><td class="field_label"><asp:Label runat="server" id="RememberPasswordLabel" Text="<%# GetResourceValue("Txt:RememberPassword", "Persons") %>"> </asp:Label></td></tr><tr><td colspan="4" style="height: 5px;"></td></tr><tr><td></td><td class="fyp_link"><asp:LinkButton runat="server" id="EmailLinkButton" causesvalidation="False" commandname="ForgotUser" consumers="page" text="<%# GetResourceValue("Txt:ForgotPassword", "Persons") %>">
|
||||
</asp:LinkButton></td><td><asp:CheckBox runat="server" id="AutomaticallySignIn" commandname="CheckBoxAutoLogin_Command" postback="True"> </asp:CheckBox></td><td class="field_label"><asp:Label runat="server" id="AutomaticallySignInLabel" Text="<%# GetResourceValue("Txt:AutoLogin", "Persons") %>"> </asp:Label></td></tr><tr><td colspan="4" style="height: 5px;"></td></tr><tr><td style="height: 5px;"></td><td style="height: 5px;" colspan="3"><asp:Label runat="server" id="PasswordMessage"> </asp:Label></td></tr></table>
|
||||
</td></tr><tr><td><table cellpadding="0" cellspacing="0" border="0" style="padding-top:10px; padding-bottom:5px;" align="center"><tr><td><Persons:ThemeButton runat="server" id="OKButton" button-causesvalidation="True" button-commandname="Login" button-text="<%# GetResourceValue("Btn:OK", "Persons") %>" button-tooltip="<%# GetResourceValue("Btn:OK", "Persons") %>"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="CancelButton" button-causesvalidation="False" button-commandname="Redirect" button-text="<%# GetResourceValue("Btn:Cancel", "Persons") %>" button-tooltip="<%# GetResourceValue("Btn:Cancel", "Persons") %>"></Persons:ThemeButton></td></tr></table>
|
||||
</td></tr></table></asp:panel>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("OKButton")) %></td></tr></table><div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"></div>
|
||||
<asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"></asp:ValidationSummary>
|
||||
</asp:Content>
|
||||
|
1198
Security/SignIn.aspx.vb
Normal file
1198
Security/SignIn.aspx.vb
Normal file
File diff suppressed because it is too large
Load diff
749
Security/SignIn.xml
Normal file
749
Security/SignIn.xml
Normal file
|
@ -0,0 +1,749 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<ComponentDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ironspeed.com/designer">
|
||||
<Generator>Iron Speed Designer</Generator>
|
||||
<Version>9.2.0</Version>
|
||||
<Self>
|
||||
<Name>SignIn</Name>
|
||||
<Type>Page</Type>
|
||||
<SubType>DotNet</SubType>
|
||||
<MasterLayout>~/Master Pages/HorizontalMenu.master</MasterLayout>
|
||||
<GenerateDirectory>Security</GenerateDirectory>
|
||||
<Layout>Security\SignIn.html</Layout>
|
||||
<DisplayName>SignIn</DisplayName>
|
||||
<Description />
|
||||
<CheckSum />
|
||||
</Self>
|
||||
<ComposedOf>
|
||||
<ContainedComponent>
|
||||
<Name>AutomaticallySignIn</Name>
|
||||
<Type>Selection</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>CheckBoxAutoLogin_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PostBack</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>AutomaticallySignInLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>CheckBoxAutoLoginLbl_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:AutoLogin</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>CancelButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.html</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>Redirect</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-RedirectURL</Name>
|
||||
<Value>Back</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:Cancel</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-ToolTip</Name>
|
||||
<Value>Btn:Cancel</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>DialogTitle</Name>
|
||||
<Type>Html</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>HtmlEncodeWhiteSpace</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:SignIn</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>EmailLinkButton</Name>
|
||||
<Type>LinkButton</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CausesValidation</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>ForgotUser</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>page</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:ForgotPassword</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>LoginMessage</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>LoginMsg_Command</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>OKButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.html</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>Login</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:OK</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-ToolTip</Name>
|
||||
<Value>Btn:OK</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PageTitle</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>{Title:SignIn}</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>Password</Name>
|
||||
<Type>TextBox</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Columns</Name>
|
||||
<Value>50</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>TextBoxPassword_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PasswordRequiredFieldValidator:Display</Name>
|
||||
<Value>None</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PasswordRequiredFieldValidator:Enabled</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>TextMode</Name>
|
||||
<Value>Password</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PasswordLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:Password</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PasswordMessage</Name>
|
||||
<Type>Label</Type>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>RememberPassword</Name>
|
||||
<Type>Selection</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>CheckBoxPass_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PostBack</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>RememberPasswordLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>CheckBoxPassLbl_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:RememberPassword</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>RememberUserName</Name>
|
||||
<Type>Selection</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>CheckBoxUN_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PostBack</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>RememberUserNameLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>CheckBoxUNLbl_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:RememberUN</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>UserName</Name>
|
||||
<Type>TextBox</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Columns</Name>
|
||||
<Value>50</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CommandName</Name>
|
||||
<Value>TextBoxUserName_Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>UserNameRequiredFieldValidator:Display</Name>
|
||||
<Value>None</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>UserNameRequiredFieldValidator:Enabled</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>UserNameLabel</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:UserName</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
</ComposedOf>
|
||||
<LayoutDefinition><![CDATA[<?xml version="1.0" encoding="utf-16"?>
|
||||
<LayoutDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<Layout Name="Page" Type="RootLayout">
|
||||
<Prolog>
|
||||
<Value>&lt;asp:Content id="Content" ContentPlaceHolderID="PageContent" runat="server"&gt;
|
||||
&lt;a id="StartOfPageContent"&gt;&lt;/a&gt;
|
||||
</Value>
|
||||
</Prolog>
|
||||
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SignInPanelHeaderGroup"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dh</AttributeValue>
|
||||
</Attribute>
|
||||
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("OKButton")) %&gt;&lt;GEN:PANEL NAME="SignInPanelControl"/&gt;&lt;%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("OKButton")) %&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dBody</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
|
||||
<Epilog>
|
||||
<Value>&lt;div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"&gt;&lt;/div&gt;
|
||||
&lt;asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"&gt;&lt;/asp:ValidationSummary&gt;
|
||||
&lt;/asp:Content&gt;
|
||||
</Value>
|
||||
</Epilog>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="SignInPanelHeaderGroup" Type="Panel">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhel</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;asp:CollapsiblePanelExtender id="SignInCPExtender" runat="server" TargetControlid="SignInCollapsibleRegion" ExpandControlID="SignInToggleIcon" CollapseControlID="SignInToggleIcon" ImageControlID="SignInToggleIcon" ExpandedImage="../images/icon_panelcollapse.gif" CollapsedImage="../images/icon_panelexpand.gif" SuppressPostBack="true"/&gt;
|
||||
&lt;asp:ImageButton id="SignInToggleIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&amp;quot;Btn:ExpandCollapse&amp;quot;, &amp;quot;Persons&amp;quot;) %&gt;" causesvalidation="False" imageurl="../images/icon_panelcollapse.gif" /&gt;
|
||||
</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dheci</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SignInTitleGroup"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhb</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dher</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>100%</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="SignInTitleGroup" Type="Panel">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:HTML NAME="DialogTitle"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dht</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="SignInPanelControl" Type="Panel">
|
||||
<Prolog>
|
||||
<Value>&lt;asp:panel id="SignInCollapsibleRegion" runat="server"&gt;</Value>
|
||||
</Prolog>
|
||||
<Epilog>
|
||||
<Value>&lt;/asp:panel&gt;</Value>
|
||||
</Epilog>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SignInControl"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>padding-left:8px; padding-right:8px; padding-top:4px</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="PageButtons"/&gt;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>325</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="SignInControl" Type="Panel">
|
||||
<Row>
|
||||
<Cell>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>4</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>height: 5px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL NAME="LoginMessage"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>4</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value></Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>4</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>height: 5px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL NAME="UserNameLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>field_label</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:TEXTBOX NAME="UserName" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>field_value</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:SELECTION NAME="RememberUserName"/&gt;</Value>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL NAME="RememberUserNameLabel" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>field_label</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>4</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>height: 5px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL NAME="PasswordLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>field_label</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:TEXTBOX NAME="Password"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>field_value</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:SELECTION NAME="RememberPassword"/&gt;</Value>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL NAME="RememberPasswordLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>field_label</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>4</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>height: 5px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LINKBUTTON NAME="EmailLinkButton" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fyp_link</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:SELECTION NAME="AutomaticallySignIn"/&gt;</Value>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL NAME="AutomaticallySignInLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>field_label</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>4</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>height: 5px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>height: 5px;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:LABEL Name="PasswordMessage" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>height: 5px;</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>3</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>1</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>1</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="PageButtons" Type="PageButton">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="OKButton"/&gt;</Value>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="CancelButton"/&gt;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>padding-top:10px; padding-bottom:5px;</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>align</Name>
|
||||
<AttributeValue>center</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
</LayoutDefinition>]]>
|
||||
</LayoutDefinition>
|
||||
</ComponentDefinition>
|
18
Security/SignOut.aspx
Normal file
18
Security/SignOut.aspx
Normal file
|
@ -0,0 +1,18 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="SignOut.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.SignOut" %>
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="BaseClasses" Namespace="BaseClasses.Web.UI.WebControls" Assembly="BaseClasses" %><asp:Content id="Content" ContentPlaceHolderID="PageContent" runat="server">
|
||||
<a id="StartOfPageContent"></a>
|
||||
<table class="dv" cellpadding="0" cellspacing="0" border="0"><tr><td class="dh"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="dhel"><img src="../Images/space.gif" alt="" /></td><td class="dheci" valign="middle"><asp:CollapsiblePanelExtender id="SignOutCPExtender" runat="server" TargetControlid="SignOutCollapsibleRegion" ExpandControlID="SignOutToggleIcon" CollapseControlID="SignOutToggleIcon" ImageControlID="SignOutToggleIcon" ExpandedImage="../images/icon_panelcollapse.gif" CollapsedImage="../images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="SignOutToggleIcon" runat="server" ToolTip="<%# GetResourceValue("Btn:ExpandCollapse", "Persons") %>" causesvalidation="False" imageurl="../images/icon_panelcollapse.gif" />
|
||||
</td><td class="dhb"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="dht" valign="middle"><asp:Literal runat="server" id="DialogTitle" Text="<%# GetResourceValue("Txt:SignOut", "Persons") %>"> </asp:Literal></td></tr></table>
|
||||
</td><td class="dher"><img src="../Images/space.gif" alt="" /></td></tr></table>
|
||||
</td></tr><tr><td class="dBody"><asp:panel id="SignOutCollapsibleRegion" runat="server"><table cellpadding="0" cellspacing="0" border="0" width="325"><tr><td><asp:Label runat="server" id="SignOutMessage" Text="<%# GetResourceValue("Txt:SuccessfullySignOut", "Persons") %>"> </asp:Label><br /><br /></td></tr><tr><td align="center"><Persons:ThemeButton runat="server" id="ForgetSignInButton" button-causesvalidation="False" button-commandname="ForgetSignInInformation" button-text="<%# GetResourceValue("Btn:ForgetSignInButton", "Persons") %>" button-tooltip="<%# GetResourceValue("Txt:ForgetSignInButton", "Persons") %>"></Persons:ThemeButton></td></tr><tr><td><table cellpadding="0" cellspacing="0" border="0" style="padding-top:10px; padding-bottom:5px;" align="center"><tr><td><Persons:ThemeButton runat="server" id="OKButton" button-causesvalidation="False" button-text="<%# GetResourceValue("Btn:OK", "Persons") %>" button-tooltip="<%# GetResourceValue("Btn:OK", "Persons") %>"></Persons:ThemeButton></td><td></td></tr></table>
|
||||
</td></tr><tr><td><asp:Label id="CloseWindowMessage" runat="server" Text="<%# GetResourceValue("Txt:CloseWindowMessage", "Persons") %>" /> </td></tr></table></asp:panel>
|
||||
</td></tr></table><div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"></div>
|
||||
<asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"></asp:ValidationSummary>
|
||||
</asp:Content>
|
||||
|
580
Security/SignOut.aspx.vb
Normal file
580
Security/SignOut.aspx.vb
Normal file
|
@ -0,0 +1,580 @@
|
|||
|
||||
' This file implements the code-behind class for SignOut.aspx.
|
||||
' App_Code\SignOut.Controls.vb contains the Table, Row and Record control classes
|
||||
' for the page. Best practices calls for overriding methods in the Row or Record control classes.
|
||||
|
||||
#Region "Imports statements"
|
||||
|
||||
Option Strict On
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Collections
|
||||
Imports System.Collections.Generic
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports System.Web.UI
|
||||
Imports System.Web.UI.WebControls
|
||||
Imports BaseClasses
|
||||
Imports BaseClasses.Utils
|
||||
Imports BaseClasses.Utils.StringUtils
|
||||
Imports BaseClasses.Data
|
||||
Imports BaseClasses.Data.SqlProvider
|
||||
Imports BaseClasses.Data.OrderByItem.OrderDir
|
||||
Imports BaseClasses.Data.BaseFilter
|
||||
Imports BaseClasses.Data.BaseFilter.ComparisonOperator
|
||||
Imports BaseClasses.Web.UI.WebControls
|
||||
|
||||
Imports Persons.Business
|
||||
Imports Persons.Data
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Namespace Persons.UI
|
||||
|
||||
Partial Public Class SignOut
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the SignOut page.
|
||||
' Place your customizations in Section 1. Do not modify Section 2.
|
||||
|
||||
#Region "Section 1: Place your customizations here."
|
||||
|
||||
Public Sub SetPageFocus()
|
||||
'load scripts to all controls on page so that they will retain focus on PostBack
|
||||
Me.LoadFocusScripts(Me.Page)
|
||||
'To set focus on page load to a specific control pass this control to the SetStartupFocus method. To get a hold of a control
|
||||
'use FindControlRecursively method. For example:
|
||||
'Dim controlToFocus As System.Web.UI.WebControls.TextBox = DirectCast(Me.FindControlRecursively("ProductsSearch"), System.Web.UI.WebControls.TextBox)
|
||||
'Me.SetFocusOnLoad(controlToFocus)
|
||||
'If no control is passed or control does not exist this method will set focus on the first focusable control on the page.
|
||||
Me.SetFocusOnLoad()
|
||||
End Sub
|
||||
|
||||
Public Sub LoadData()
|
||||
' LoadData reads database data and assigns it to UI controls.
|
||||
' Customize by adding code before or after the call to LoadData_Base()
|
||||
' or replace the call to LoadData_Base().
|
||||
LoadData_Base()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate as BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object), ByVal includeDS as Boolean) As String
|
||||
Return EvaluateFormula_Base(formula, dataSourceForEvaluate, format, variables, includeDS)
|
||||
End Function
|
||||
|
||||
Public Sub Page_InitializeEventHandlers(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Init
|
||||
' Handles MyBase.Init.
|
||||
' Register the Event handler for any Events.
|
||||
Me.Page_InitializeEventHandlers_Base(sender,e)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub SaveControlsToSession()
|
||||
SaveControlsToSession_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Overrides Sub ClearControlsFromSession()
|
||||
ClearControlsFromSession_Base()
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub LoadViewState(ByVal savedState As Object)
|
||||
LoadViewState_Base(savedState)
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Overrides Function SaveViewState() As Object
|
||||
Return SaveViewState_Base()
|
||||
End Function
|
||||
|
||||
Public Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
|
||||
Me.Page_PreRender_Base(sender,e)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub SaveData()
|
||||
Me.SaveData_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub SetChartControl(ByVal chartCtrlName As String)
|
||||
Me.SetChartControl_Base(chartCtrlName)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
|
||||
'Override call to PreInit_Base() here to change top level master page used by this page.
|
||||
'For example for SharePoint applications uncomment next line to use Microsoft SharePoint default master page
|
||||
'If Not Me.Master Is Nothing Then Me.Master.MasterPageFile = Microsoft.SharePoint.SPContext.Current.Web.MasterUrl
|
||||
'You may change here assignment of application theme
|
||||
Try
|
||||
Me.PreInit_Base()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#Region "Ajax Functions"
|
||||
|
||||
<Services.WebMethod()> _
|
||||
Public Shared Function GetRecordFieldValue(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal fieldName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
' GetRecordFieldValue gets the pop up window content from the column specified by
|
||||
' columnName in the record specified by the recordID in data base table specified by tableName.
|
||||
' Customize by adding code before or after the call to GetRecordFieldValue_Base()
|
||||
' or replace the call to GetRecordFieldValue_Base().
|
||||
Return GetRecordFieldValue_Base(tableName, recordID, columnName, fieldName, title, persist, popupWindowHeight, popupWindowWidth, popupWindowScrollBar)
|
||||
End Function
|
||||
|
||||
<Services.WebMethod()> _
|
||||
Public Shared Function GetImage(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
' GetImage gets the Image url for the image in the column "columnName" and
|
||||
' in the record specified by recordID in data base table specified by tableName.
|
||||
' Customize by adding code before or after the call to GetImage_Base()
|
||||
' or replace the call to GetImage_Base().
|
||||
Return GetImage_Base(tableName, recordID, columnName, title, persist, popupWindowHeight, popupWindowWidth, popupWindowScrollBar)
|
||||
End Function
|
||||
|
||||
Protected Overloads Overrides Sub BasePage_PreRender(ByVal sender As Object, ByVal e As EventArgs)
|
||||
MyBase.BasePage_PreRender(sender, e)
|
||||
Base_RegisterPostback()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
' Page Event Handlers - buttons, sort, links
|
||||
|
||||
Public Sub ForgetSignInButton_Click(ByVal sender As Object, ByVal args As EventArgs)
|
||||
' Click handler for ForgetSignInButton.
|
||||
' Customize by adding code before the call or replace the call to the Base function with your own code.
|
||||
ForgetSignInButton_Click_Base(sender, args)
|
||||
' NOTE: If the Base function redirects to another page, any code here will not be executed.
|
||||
End Sub
|
||||
|
||||
Public Sub OKButton_Click(ByVal sender As Object, ByVal args As EventArgs)
|
||||
' Click handler for OKButton.
|
||||
' Customize by adding code before the call or replace the call to the Base function with your own code.
|
||||
OKButton_Click_Base(sender, args)
|
||||
' NOTE: If the Base function redirects to another page, any code here will not be executed.
|
||||
End Sub
|
||||
|
||||
|
||||
' Write out the Set methods
|
||||
|
||||
|
||||
' Write out the methods for DataSource
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Section 2: Do not modify this section."
|
||||
|
||||
Private Shared cultureui As String = ""
|
||||
|
||||
Protected Sub Page_InitializeEventHandlers_Base(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
|
||||
' This page does not have FileInput control inside repeater which requires "multipart/form-data" form encoding, but it might
|
||||
'include ascx controls which in turn do have FileInput controls inside repeater. So check if they set Enctype property.
|
||||
If Not String.IsNullOrEmpty(Me.Enctype) Then Me.Page.Form.Enctype = Me.Enctype
|
||||
|
||||
|
||||
' the following code for accordion is necessary or the Me.{ControlName} will return Nothing
|
||||
|
||||
' Register the Event handler for any Events.
|
||||
|
||||
|
||||
' Setup the pagination events.
|
||||
|
||||
AddHandler Me.ForgetSignInButton.Button.Click, AddressOf ForgetSignInButton_Click
|
||||
|
||||
AddHandler Me.OKButton.Button.Click, AddressOf OKButton_Click
|
||||
|
||||
Me.ClearControlsFromSession()
|
||||
End Sub
|
||||
|
||||
Private Sub Base_RegisterPostback()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
' Handles MyBase.Load. Read database data and put into the UI controls.
|
||||
' If you need to, you can add additional Load handlers in Section 1.
|
||||
Protected Overridable Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
Me.SetPageFocus()
|
||||
|
||||
|
||||
If (Not Me.IsPostBack) Then
|
||||
|
||||
' Setup the header text for the validation summary control.
|
||||
Me.ValidationSummary1.HeaderText = GetResourceValue("ValidationSummaryHeaderText", "Persons")
|
||||
|
||||
Me.StateInit()
|
||||
cultureui = DirectCast(Session("AppCultureUI"), String)
|
||||
DirectCast(Me.Page, BaseApplicationPage).CurrentSecurity.Logout(CType(Me.Page, BaseApplicationPage))
|
||||
End If
|
||||
|
||||
'set value of the hidden control depending on the postback. It will be used by SetFocus script on the client side.
|
||||
Dim clientSideIsPostBack As System.Web.UI.HtmlControls.HtmlInputHidden = DirectCast(Me.FindControlRecursively("_clientSideIsPostBack"), System.Web.UI.HtmlControls.HtmlInputHidden)
|
||||
If Not clientSideIsPostBack Is Nothing Then
|
||||
If Me.IsPostBack AndAlso Not Me.Request("__EVENTTARGET") = "ChildWindowPostBack" Then
|
||||
clientSideIsPostBack.Value = "Y"
|
||||
Else
|
||||
clientSideIsPostBack.Value = "N"
|
||||
End If
|
||||
End If
|
||||
|
||||
' Load data only when displaying the page for the first time or if postback from child window
|
||||
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
|
||||
' Read the data for all controls on the page.
|
||||
' To change the behavior, override the DataBind method for the individual
|
||||
' record or table UI controls.
|
||||
Me.LoadData()
|
||||
End If
|
||||
|
||||
|
||||
Page.Title = GetResourceValue("Title:SignOut") + ""
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetRecordFieldValue_Base(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal fieldName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
If Not IsNothing(recordID) Then
|
||||
recordID = System.Web.HttpUtility.UrlDecode(recordID)
|
||||
End If
|
||||
Dim content as String = BaseClasses.Utils.MiscUtils.GetFieldData(tableName, recordID, columnName)
|
||||
|
||||
content = NetUtils.EncodeStringForHtmlDisplay(content)
|
||||
|
||||
'returnValue is an array of string values.
|
||||
'returnValue(0) represents title of the pop up window
|
||||
'returnValue(1) represents content of the pop up window
|
||||
' retrunValue(2) represents whether pop up window should be made persistant
|
||||
' or it should closes as soon as mouse moved out.
|
||||
' returnValue(5) represents whether pop up window should contain scroll bar.
|
||||
' returnValue(3), (4) represents pop up window height and width respectivly
|
||||
' (0),(2),(3),(4) and (5) is initially set as pass through attribute.
|
||||
' They can be modified by going to Attribute tab of the properties window of the control in aspx page.
|
||||
Dim returnValue(6) As Object
|
||||
returnValue(0) = title
|
||||
returnValue(1) = content
|
||||
returnValue(2) = persist
|
||||
returnValue(3) = popupWindowWidth
|
||||
returnValue(4) = popupWindowHeight
|
||||
returnValue(5) = popupWindowScrollBar
|
||||
Return returnValue
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function GetImage_Base(ByVal tableName As String, _
|
||||
ByVal recordID As String, _
|
||||
ByVal columnName As String, _
|
||||
ByVal title As String, _
|
||||
ByVal persist As Boolean, _
|
||||
ByVal popupWindowHeight As Integer, _
|
||||
ByVal popupWindowWidth As Integer, _
|
||||
ByVal popupWindowScrollBar As Boolean _
|
||||
) As Object()
|
||||
Dim content As String = "<IMG alt =""" & title & """ src =" & """../Shared/ExportFieldValue.aspx?Table=" & tableName & "&Field=" & columnName & "&Record=" & recordID & """/>"
|
||||
'returnValue is an array of string values.
|
||||
'returnValue(0) represents title of the pop up window.
|
||||
'returnValue(1) represents content ie, image url.
|
||||
' retrunValue(2) represents whether pop up window should be made persistant
|
||||
' or it should closes as soon as mouse moved out.
|
||||
' returnValue(3), (4) represents pop up window height and width respectivly
|
||||
' returnValue(5) represents whether pop up window should contain scroll bar.
|
||||
' (0),(2),(3),(4) and (5) is initially set as pass through attribute.
|
||||
' They can be modified by going to Attribute tab of the properties window of the control in aspx page.
|
||||
Dim returnValue(6) As Object
|
||||
returnValue(0) = title
|
||||
returnValue(1) = content
|
||||
returnValue(2) = persist
|
||||
returnValue(3) = popupWindowWidth
|
||||
returnValue(4) = popupWindowHeight
|
||||
returnValue(5) = popupWindowScrollBar
|
||||
Return returnValue
|
||||
End Function
|
||||
|
||||
Public Sub SetChartControl_Base(ByVal chartCtrlName As String)
|
||||
' Load data for each record and table UI control.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub SaveData_Base()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub SaveControlsToSession_Base()
|
||||
MyBase.SaveControlsToSession()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ClearControlsFromSession_Base()
|
||||
MyBase.ClearControlsFromSession()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadViewState_Base(ByVal savedState As Object)
|
||||
MyBase.LoadViewState(savedState)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Function SaveViewState_Base() As Object
|
||||
|
||||
Return MyBase.SaveViewState()
|
||||
End Function
|
||||
|
||||
|
||||
Public Sub PreInit_Base()
|
||||
'If it is SharePoint application this function performs dynamic Master Page assignment.
|
||||
|
||||
End Sub
|
||||
|
||||
'sec_comment - this method switches off AutoLogin cookie at sign out
|
||||
Private Sub SignOut_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.PreRender
|
||||
|
||||
Dim state As UI.SignInState = New SignInState
|
||||
Me.ForgetSignInButton.Button.Enabled = (state.IsUNToRemember Or state.IsPassToRemember)
|
||||
Dim isAutoLogin As String = BaseClasses.Utils.NetUtils.GetCookie(NetUtils.CookieAutoLogin())
|
||||
If (isAutoLogin Is Nothing Or isAutoLogin = "") Then
|
||||
Return
|
||||
ElseIf (isAutoLogin.ToLower() = "true") Then
|
||||
BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieAutoLogin(), "False")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub StateInit()
|
||||
Dim state As UI.SignInState = New UI.SignInState
|
||||
Dim rUser As String = (BaseClasses.Utils.NetUtils.GetCookie(NetUtils.CookieRememberName()))
|
||||
If (Not (rUser Is Nothing)) AndAlso (rUser.ToLower() = "true") Then
|
||||
state.IsUNToRemember = True
|
||||
Else
|
||||
state.IsUNToRemember = False
|
||||
End If
|
||||
Dim rPassword As String = (BaseClasses.Utils.NetUtils.GetCookie(NetUtils.CookieRememberPassword()))
|
||||
If Not (rPassword Is Nothing) AndAlso (rPassword.ToLower() = "true") Then
|
||||
state.IsPassToRemember = True
|
||||
Else
|
||||
state.IsPassToRemember = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Page_PreRender_Base(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
|
||||
' Load data for each record and table UI control.
|
||||
|
||||
' Data bind for each chart UI control.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
' Load data from database into UI controls.
|
||||
' Modify LoadData in Section 1 above to customize. Or override DataBind() in
|
||||
' the individual table and record controls to customize.
|
||||
Public Sub LoadData_Base()
|
||||
Try
|
||||
|
||||
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
|
||||
' Must start a transaction before performing database operations
|
||||
DbUtils.StartTransaction()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Me.DataBind()
|
||||
|
||||
' Load and bind data for each record and table UI control.
|
||||
|
||||
|
||||
' Load data for chart.
|
||||
|
||||
|
||||
' initialize aspx controls
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
' An error has occured so display an error message.
|
||||
Utils.RegisterJScriptAlert(Me, "Page_Load_Error_Message", ex.Message)
|
||||
Finally
|
||||
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
|
||||
' End database transaction
|
||||
DbUtils.EndTransaction()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public EvaluateFormulaDelegate As BaseClasses.Data.DataSource.EvaluateFormulaDelegate = New BaseClasses.Data.DataSource.EvaluateFormulaDelegate(AddressOf Me.EvaluateFormula)
|
||||
|
||||
Public Overridable Function EvaluateFormula_Base(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object), ByVal includeDS As Boolean) As String
|
||||
Dim e As FormulaEvaluator = New FormulaEvaluator()
|
||||
|
||||
' add variables for formula evaluation
|
||||
If variables IsNot Nothing Then
|
||||
Dim enumerator As System.Collections.Generic.IEnumerator(Of System.Collections.Generic.KeyValuePair(Of String, Object)) = variables.GetEnumerator()
|
||||
While enumerator.MoveNext()
|
||||
e.Variables.Add(enumerator.Current.Key, enumerator.Current.Value)
|
||||
End While
|
||||
End If
|
||||
|
||||
If includeDS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
e.CallingControl = Me
|
||||
|
||||
e.DataSource = dataSourceForEvaluate
|
||||
|
||||
|
||||
Dim resultObj As Object = e.Evaluate(formula)
|
||||
If resultObj Is Nothing Then
|
||||
Return ""
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(format) AndAlso (String.IsNullOrEmpty(formula) OrElse formula.IndexOf("Format(") < 0) Then
|
||||
Return FormulaUtils.Format(resultObj, format)
|
||||
Else
|
||||
Return resultObj.ToString()
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object)) As String
|
||||
Return EvaluateFormula(formula, dataSourceForEvaluate, format, variables, True)
|
||||
End Function
|
||||
|
||||
|
||||
Private Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord) As String
|
||||
Return EvaluateFormula(formula, dataSourceForEvaluate, Nothing, Nothing, True)
|
||||
End Function
|
||||
|
||||
Public Function EvaluateFormula(ByVal formula As String, ByVal includeDS As Boolean) As String
|
||||
Return EvaluateFormula(formula, Nothing, Nothing, Nothing, includeDS)
|
||||
End Function
|
||||
|
||||
Public Function EvaluateFormula(ByVal formula As String) As String
|
||||
Return EvaluateFormula(formula, Nothing, Nothing, Nothing, True)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
' Write out the Set methods
|
||||
|
||||
|
||||
' Write out the DataSource properties and methods
|
||||
|
||||
|
||||
' Write out event methods for the page events
|
||||
|
||||
' event handler for Button with Layout
|
||||
Public Sub ForgetSignInButton_Click_Base(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
Dim state As SignInState = New SignInState
|
||||
BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieUserName(), "")
|
||||
BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookiePassword(), "")
|
||||
state.IsUNToRemember = False
|
||||
state.IsPassToRemember = False
|
||||
BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieRememberName(), Boolean.FalseString)
|
||||
BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieRememberPassword(), Boolean.FalseString)
|
||||
Try
|
||||
|
||||
Catch ex As Exception
|
||||
Me.ErrorOnPage = True
|
||||
|
||||
' Report the error message to the end user
|
||||
Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", ex.Message)
|
||||
|
||||
Finally
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
' event handler for Button with Layout
|
||||
Public Sub OKButton_Click_Base(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
' The redirect URL is set on the Properties, Custom Properties or Actions.
|
||||
' The ModifyRedirectURL call resolves the parameters before the
|
||||
' Response.Redirect redirects the page to the URL.
|
||||
' Any code after the Response.Redirect call will not be executed, since the page is
|
||||
' redirected to the URL.
|
||||
|
||||
|
||||
Dim url As String = "../Default.aspx"
|
||||
|
||||
Dim shouldRedirect As Boolean = True
|
||||
Dim TargetKey As String = Nothing
|
||||
Dim DFKA As String = TargetKey
|
||||
Dim id As String = DFKA
|
||||
Dim value As String = id
|
||||
|
||||
Try
|
||||
' Enclose all database retrieval/update code within a Transaction boundary
|
||||
DbUtils.StartTransaction
|
||||
|
||||
url = Me.ModifyRedirectUrl(url, "",False)
|
||||
|
||||
Catch ex As Exception
|
||||
' Upon error, rollback the transaction
|
||||
Me.RollBackTransaction(sender)
|
||||
shouldRedirect = False
|
||||
Me.ErrorOnPage = True
|
||||
|
||||
' Report the error message to the end user
|
||||
Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", ex.Message)
|
||||
|
||||
Finally
|
||||
DbUtils.EndTransaction
|
||||
End Try
|
||||
If shouldRedirect Then
|
||||
Me.Response.Redirect(url)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
352
Security/SignOut.xml
Normal file
352
Security/SignOut.xml
Normal file
|
@ -0,0 +1,352 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<ComponentDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ironspeed.com/designer">
|
||||
<Generator>Iron Speed Designer</Generator>
|
||||
<Version>9.2.0</Version>
|
||||
<Self>
|
||||
<Name>SignOut</Name>
|
||||
<Type>Page</Type>
|
||||
<SubType>DotNet</SubType>
|
||||
<MasterLayout>~/Master Pages/HorizontalMenu.master</MasterLayout>
|
||||
<GenerateDirectory>Security</GenerateDirectory>
|
||||
<Layout>Security\SignOut.html</Layout>
|
||||
<DisplayName>SignOut</DisplayName>
|
||||
<Description />
|
||||
<CheckSum />
|
||||
</Self>
|
||||
<ComposedOf>
|
||||
<ContainedComponent>
|
||||
<Name>DialogTitle</Name>
|
||||
<Type>Html</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>HtmlEncodeWhiteSpace</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:SignOut</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>ForgetSignInButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.html</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>ForgetSignInInformation</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:ForgetSignInButton</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-ToolTip</Name>
|
||||
<Value>Txt:ForgetSignInButton</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>OKButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.html</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-RedirectURL</Name>
|
||||
<Value>../Default.aspx</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:OK</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-ToolTip</Name>
|
||||
<Value>Btn:OK</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PageTitle</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>{Title:SignOut}</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SignOutMessage</Name>
|
||||
<Type>Label</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Txt:SuccessfullySignOut</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
</ComposedOf>
|
||||
<LayoutDefinition><![CDATA[<?xml version="1.0" encoding="utf-16"?>
|
||||
<LayoutDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<Layout Name="Page" Type="RootLayout">
|
||||
<Prolog>
|
||||
<Value>&lt;asp:Content id="Content" ContentPlaceHolderID="PageContent" runat="server"&gt;
|
||||
&lt;a id="StartOfPageContent"&gt;&lt;/a&gt;
|
||||
</Value>
|
||||
</Prolog>
|
||||
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SignOutPanelHeaderGroup"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dh</AttributeValue>
|
||||
</Attribute>
|
||||
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SignOutPanelControl"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dBody</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
|
||||
<Epilog>
|
||||
|
||||
<Value>&lt;div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"&gt;&lt;/div&gt;
|
||||
&lt;asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"&gt;&lt;/asp:ValidationSummary&gt;
|
||||
&lt;/asp:Content&gt;
|
||||
</Value>
|
||||
</Epilog>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="SignOutPanelHeaderGroup" Type="Panel">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhel</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;asp:CollapsiblePanelExtender id="SignOutCPExtender" runat="server" TargetControlid="SignOutCollapsibleRegion" ExpandControlID="SignOutToggleIcon" CollapseControlID="SignOutToggleIcon" ImageControlID="SignOutToggleIcon" ExpandedImage="../images/icon_panelcollapse.gif" CollapsedImage="../images/icon_panelexpand.gif" SuppressPostBack="true"/&gt;
|
||||
&lt;asp:ImageButton id="SignOutToggleIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&amp;quot;Btn:ExpandCollapse&amp;quot;, &amp;quot;Persons&amp;quot;) %&gt;" causesvalidation="False" imageurl="../images/icon_panelcollapse.gif" /&gt;
|
||||
</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dheci</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SignOutTitleGroup"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhb</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dher</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>100%</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="SignOutTitleGroup" Type="Panel">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:HTML NAME="DialogTitle"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dht</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
|
||||
|
||||
<Layout Name="SignOutPanelControl" Type="Panel">
|
||||
<Prolog>
|
||||
<Value>&lt;asp:panel id="SignOutCollapsibleRegion" runat="server"&gt;</Value>
|
||||
</Prolog>
|
||||
<Epilog>
|
||||
<Value>&lt;/asp:panel&gt;</Value>
|
||||
</Epilog>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:Label Name="SignOutMessage"/&gt;&lt;br/&gt;&lt;br /&gt;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:Button NAME="ForgetSignInButton"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>align</Name>
|
||||
<AttributeValue>center</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="PageButtons"/&gt;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;asp:Label id="CloseWindowMessage" runat="server" Text=&lt;%# GetResourceValue(&amp;quot;Txt:CloseWindowMessage&amp;quot;, &amp;quot;Persons&amp;quot;) %&gt;/&gt;&amp;nbsp;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>325</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
|
||||
<Layout Name="PageButtons" Type="PageButton">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="OKButton"/&gt;</Value>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="CancelButton"/&gt;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>padding-top:10px; padding-bottom:5px;</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>align</Name>
|
||||
<AttributeValue>center</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
</LayoutDefinition>]]>
|
||||
</LayoutDefinition>
|
||||
</ComponentDefinition>
|
Loading…
Add table
Add a link
Reference in a new issue