initial commit
This commit is contained in:
commit
252dac3143
1516 changed files with 694271 additions and 0 deletions
66
Sport/AddSport.aspx
Normal file
66
Sport/AddSport.aspx
Normal file
|
@ -0,0 +1,66 @@
|
|||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="AddSport.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.AddSport" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.AddSport" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="BaseClasses" Namespace="BaseClasses.Web.UI.WebControls" Assembly="BaseClasses" %><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><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("CancelButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("EditButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("OKButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("SaveAndNewButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("SaveButton"))%>
|
||||
|
||||
<Persons:SportRecordControl runat="server" id="SportRecordControl"> <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="SportRecordControlPanelExtender" runat="server" TargetControlid="SportRecordControlCollapsibleRegion" ExpandControlID="SportRecordControlIcon" CollapseControlID="SportRecordControlIcon" ImageControlID="SportRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="SportRecordControlIcon" 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="dhtr" valign="middle"><asp:Literal runat="server" id="SportTitle" Text="<%#String.Concat(GetResourceValue("Title:Add")," Sport") %>"> </asp:Literal></td></tr></table>
|
||||
</td><td class="dher"><img src="../Images/space.gif" alt="" /></td></tr></table>
|
||||
</td></tr><tr><td><asp:panel id="SportRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="SportRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="SportIdLabel" Text="Sport"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="padding-right: 5px; vertical-align:top">
|
||||
<asp:TextBox runat="server" id="SportId" Columns="7" MaxLength="7" cssclass="field_input" enabled="False"></asp:TextBox></td>
|
||||
<td>
|
||||
|
||||
<asp:RequiredFieldValidator runat="server" id="SportIdRequiredFieldValidator" ControlToValidate="SportId" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Sport") %>" enabled="True" text="*"></asp:RequiredFieldValidator>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="SportIdTextBoxMaxLengthValidator" ControlToValidate="SportId" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "Sport") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="SPORTLabel" Text="Sport"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="SPORT" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="SPORTTextBoxMaxLengthValidator" ControlToValidate="SPORT" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "Sport") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr></table></asp:panel>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:SportRecordControl>
|
||||
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SaveButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SaveAndNewButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("OKButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("EditButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("CancelButton"))%>
|
||||
</td></tr><tr><td class="recordPanelButtonsAlignment"><table cellpadding="0" cellspacing="0" border="0"><tr><td><Persons:ThemeButton runat="server" id="SaveButton" button-causesvalidation="true" button-commandname="UpdateData" button-text="<%# GetResourceValue("Btn:Save", "Persons") %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="SaveAndNewButton" button-causesvalidation="true" button-commandname="UpdateData" button-text="<%# GetResourceValue("Btn:SaveNNew", "Persons") %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="CancelButton" button-causesvalidation="false" button-commandname="Redirect" button-text="<%# GetResourceValue("Btn:Cancel", "Persons") %>"></Persons:ThemeButton></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>
|
||||
|
657
Sport/AddSport.aspx.vb
Normal file
657
Sport/AddSport.aspx.vb
Normal file
|
@ -0,0 +1,657 @@
|
|||
|
||||
' This file implements the code-behind class for AddSport.aspx.
|
||||
' App_Code\AddSport.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
|
||||
|
||||
Public Partial Class AddSport
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the AddSport page.
|
||||
' Place your customizations in Section 1. Do not modify Section 2.
|
||||
|
||||
#Region "Section 1: Place your customizations here."
|
||||
|
||||
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
|
||||
|
||||
Public Overrides Sub SaveData()
|
||||
Me.SaveData_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "Ajax Functions"
|
||||
|
||||
' <Services.WebMethod()> _
|
||||
' Public Shared Function GetRecordFieldValue(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()
|
||||
' ' 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, 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 CancelButton_Click(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
' Click handler for CancelButton.
|
||||
' Customize by adding code before the call or replace the call to the Base function with your own code.
|
||||
CancelButton_Click_Base(sender, args)
|
||||
' NOTE: If the Base function redirects to another page, any code here will not be executed.
|
||||
End Sub
|
||||
|
||||
Public Sub SaveAndNewButton_Click(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
' Click handler for SaveAndNewButton.
|
||||
' Customize by adding code before the call or replace the call to the Base function with your own code.
|
||||
SaveAndNewButton_Click_Base(sender, args)
|
||||
' NOTE: If the Base function redirects to another page, any code here will not be executed.
|
||||
End Sub
|
||||
|
||||
Public Sub SaveButton_Click(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
' Click handler for SaveButton.
|
||||
' Customize by adding code before the call or replace the call to the Base function with your own code.
|
||||
SaveButton_Click_Base(sender, args)
|
||||
' NOTE: If the Base function redirects to another page, any code here will not be executed.
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Overloads Overrides Sub BasePage_PreRender(ByVal sender As Object, ByVal e As EventArgs)
|
||||
MyBase.BasePage_PreRender(sender, e)
|
||||
Base_RegisterPostback()
|
||||
End Sub
|
||||
<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
|
||||
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
|
||||
Public Overrides Sub SetChartControl(ByVal chartCtrlName As String)
|
||||
Me.SetChartControl_Base(chartCtrlName)
|
||||
End Sub
|
||||
Public Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
|
||||
Me.Page_PreRender_Base(sender,e)
|
||||
End Sub
|
||||
Protected Overrides Function SaveViewState() As Object
|
||||
Return SaveViewState_Base()
|
||||
End Function
|
||||
Protected Overrides Sub LoadViewState(ByVal savedState As Object)
|
||||
LoadViewState_Base(savedState)
|
||||
End Sub
|
||||
Protected Overrides Sub ClearControlsFromSession()
|
||||
ClearControlsFromSession_Base()
|
||||
End Sub
|
||||
Protected Overrides Sub SaveControlsToSession()
|
||||
SaveControlsToSession_Base()
|
||||
End Sub
|
||||
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
|
||||
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 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
|
||||
#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.CancelButton.Button.Click, AddressOf CancelButton_Click
|
||||
|
||||
AddHandler Me.SaveAndNewButton.Button.Click, AddressOf SaveAndNewButton_Click
|
||||
|
||||
Me.SaveAndNewButton.Button.Attributes.Add("onclick", "SubmitHRefOnce(this, """ & Me.GetResourceValue("Txt:SaveRecord", "Persons") & """);")
|
||||
|
||||
AddHandler Me.SaveButton.Button.Click, AddressOf SaveButton_Click
|
||||
|
||||
Me.SaveButton.Button.Attributes.Add("onclick", "SubmitHRefOnce(this, """ & Me.GetResourceValue("Txt:SaveRecord", "Persons") & """);")
|
||||
|
||||
Me.ClearControlsFromSession()
|
||||
End Sub
|
||||
|
||||
Private Sub Base_RegisterPostback()
|
||||
|
||||
Me.RegisterPostBackTrigger(MiscUtils.FindControlRecursively(Me,"SaveAndNewButton"))
|
||||
|
||||
Me.RegisterPostBackTrigger(MiscUtils.FindControlRecursively(Me,"SaveButton"))
|
||||
|
||||
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("NOT_ANONYMOUS")
|
||||
|
||||
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:Add") + " Sport"
|
||||
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()
|
||||
|
||||
Me.SportRecordControl.SaveData()
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Me.SportRecordControl.LoadData()
|
||||
Me.SportRecordControl.DataBind()
|
||||
|
||||
|
||||
' Load data for chart.
|
||||
|
||||
|
||||
' initialize aspx controls
|
||||
|
||||
'Set the corresponding menu item to be highlighted for this page
|
||||
Dim pageMaster As System.Web.UI.MasterPage = Me.Master
|
||||
If Not pageMaster is Nothing Then
|
||||
Dim menuComponent As IMenuComponent = CType(Me.Master.FindControl("_Menu"), IMenuComponent)
|
||||
If Not menuComponent is Nothing Then
|
||||
menuComponent.HiliteSettings = "SportMenuItem"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
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 CancelButton_Click_Base(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
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
|
||||
|
||||
|
||||
TargetKey = Me.Page.Request.QueryString.Item("Target")
|
||||
If Not TargetKey Is Nothing Then
|
||||
shouldRedirect = False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
shouldRedirect = False
|
||||
Me.ErrorOnPage = True
|
||||
|
||||
' Report the error message to the end user
|
||||
Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", ex.Message)
|
||||
|
||||
Finally
|
||||
|
||||
End Try
|
||||
If shouldRedirect Then
|
||||
Me.ShouldSaveControlsToSession = True
|
||||
Me.RedirectBack()
|
||||
ElseIf Not TargetKey Is Nothing AndAlso _
|
||||
Not shouldRedirect Then
|
||||
Me.ShouldSaveControlsToSession = True
|
||||
Me.CloseWindow(True)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' event handler for Button with Layout
|
||||
Public Sub SaveAndNewButton_Click_Base(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
Try
|
||||
' Enclose all database retrieval/update code within a Transaction boundary
|
||||
DbUtils.StartTransaction
|
||||
|
||||
|
||||
If (Not Me.IsPageRefresh) Then
|
||||
Me.SaveData()
|
||||
End If
|
||||
|
||||
Me.CommitTransaction(sender)
|
||||
Catch ex As Exception
|
||||
' Upon error, rollback the transaction
|
||||
Me.RollBackTransaction(sender)
|
||||
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
|
||||
|
||||
End Sub
|
||||
|
||||
' event handler for Button with Layout
|
||||
Public Sub SaveButton_Click_Base(ByVal sender As Object, ByVal args As EventArgs)
|
||||
|
||||
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
|
||||
|
||||
|
||||
If (Not Me.IsPageRefresh) Then
|
||||
Me.SaveData()
|
||||
End If
|
||||
|
||||
Me.CommitTransaction(sender)
|
||||
TargetKey = Me.Page.Request.QueryString.Item("Target")
|
||||
|
||||
If Not TargetKey Is Nothing Then
|
||||
|
||||
DFKA = NetUtils.GetUrlParam(Me, "DFKA", false)
|
||||
If Not Me.SportRecordControl Is Nothing AndAlso Not Me.SportRecordControl.DataSource Is Nothing Then
|
||||
|
||||
id = Me.SportRecordControl.DataSource.SportId.ToString
|
||||
If not String.IsNullOrEmpty(DFKA) then
|
||||
If DFKA.Trim().StartsWith("=") then
|
||||
Dim variables as System.Collections.Generic.IDictionary(Of String, Object) = new System.Collections.Generic.Dictionary(Of String, Object)()
|
||||
variables.Add(Me.SportRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.SportRecordControl.DataSource)
|
||||
value = EvaluateFormula(DFKA, Me.SportRecordControl.DataSource, Nothing,variables)
|
||||
Else
|
||||
value = Me.SportRecordControl.DataSource.GetValue(Me.SportRecordControl.DataSource.TableAccess.TableDefinition.ColumnList.GetByAnyName(DFKA)).ToString
|
||||
End If
|
||||
End If
|
||||
If value is Nothing Then
|
||||
value = id
|
||||
End If
|
||||
|
||||
Dim Formula As String = Me.Page.Request.QueryString.Item("Formula")
|
||||
If Not Formula Is Nothing Then
|
||||
Dim variables as System.Collections.Generic.IDictionary(Of String, Object) = new System.Collections.Generic.Dictionary(Of String, Object)()
|
||||
variables.Add(Me.SportRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.SportRecordControl.DataSource)
|
||||
value = EvaluateFormula(formula, Me.SportRecordControl.DataSource, Nothing,variables)
|
||||
End If
|
||||
|
||||
BaseClasses.Utils.MiscUtils.RegisterAddButtonScript(Me, TargetKey, id, value)
|
||||
End If
|
||||
shouldRedirect = False
|
||||
|
||||
End If
|
||||
|
||||
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.ShouldSaveControlsToSession = True
|
||||
Me.RedirectBack()
|
||||
ElseIf Not TargetKey Is Nothing AndAlso _
|
||||
Not shouldRedirect Then
|
||||
Me.ShouldSaveControlsToSession = True
|
||||
Me.CloseWindow(True)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
623
Sport/AddSport.xml
Normal file
623
Sport/AddSport.xml
Normal file
|
@ -0,0 +1,623 @@
|
|||
<?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>AddSport</Name>
|
||||
<Type>Page</Type>
|
||||
<SubType>DotNet</SubType>
|
||||
<MasterLayout>~/Master Pages/HorizontalMenu.master</MasterLayout>
|
||||
<GenerateDirectory>Sport</GenerateDirectory>
|
||||
<Layout>Sport\AddSport.html</Layout>
|
||||
<DisplayName>AddSport</DisplayName>
|
||||
<Description>Standard record panel.</Description>
|
||||
<MenuFileToHilite>Menu</MenuFileToHilite>
|
||||
<MenuHiliteItem>SportMenuItem</MenuHiliteItem>
|
||||
<LoginRequired><PRoles>NOT_ANONYMOUS</PRoles></LoginRequired>
|
||||
<CheckSum>-5613097-16912</CheckSum>
|
||||
</Self>
|
||||
<ComposedOf>
|
||||
<ContainedComponent>
|
||||
<Name>CancelButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.ascx</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>false</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>Redirect</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Consumers</Name>
|
||||
<Value>page</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-RedirectURL</Name>
|
||||
<Value>Back</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:Cancel</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PageTitle</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>{Title:Add} Sport</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SaveAndNewButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.ascx</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>true</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>UpdateData</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Consumers</Name>
|
||||
<Value>page</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:SaveNNew</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PostBack</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SaveButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.ascx</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>true</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>UpdateData</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Consumers</Name>
|
||||
<Value>page</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-RedirectURL</Name>
|
||||
<Value>Back</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:Save</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PostBack</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SPORT</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>SPORT</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>Sport</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>SPORTRequiredFieldValidator:Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportId</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>SportId</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>Sport</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>SportIdRequiredFieldValidator:Enabled</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>SportIdRequiredFieldValidator:Text</Name>
|
||||
<Value>*</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportIdLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>SportRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>SportId</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>Sport</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%Sport%SportId</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SPORTLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>SportRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>SPORT</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>Sport</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%Sport%SPORT</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportRecordControl</Name>
|
||||
<Type>Record</Type>
|
||||
<PanelStyle>AddRec_DTB_Parent</PanelStyle>
|
||||
<Table>Sport</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>EnterKeyCaptureToButton</Name>
|
||||
<Value>SaveButton,SaveAndNewButton,OKButton,EditButton,CancelButton</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>HideDataUntilSearched</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>AddRecord</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSourceArg</Name>
|
||||
<Value>Sport</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>URL</Name>
|
||||
<Value>Sport</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportRecordControlCollapsibleRegion</Name>
|
||||
<Type>Aspx</Type>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
<ControlClass>System.Web.UI.WebControls.Panel</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportRecordControlIcon</Name>
|
||||
<Type>Aspx</Type>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
<ControlClass>System.Web.UI.WebControls.ImageButton</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportRecordControlPanelExtender</Name>
|
||||
<Type>Aspx</Type>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
<ControlClass>AjaxControlToolkit.CollapsiblePanelExtender</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportTitle</Name>
|
||||
<Type>Html</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>HtmlEncodeWhiteSpace</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value><%#String.Concat(GetResourceValue("Title:Add")," Sport") %></Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>UpdatePanel1</Name>
|
||||
<Type>UpdatePanel</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>SmoothPanelUpdate</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
</ComposedOf>
|
||||
<LayoutDefinition><?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="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:RECORD NAME="SportRecordControl"&gt;&lt;/GEN:RECORD&gt;
|
||||
</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="PageButtons"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>recordPanelButtonsAlignment</AttributeValue>
|
||||
</Attribute>
|
||||
</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="SportRecordControl" Type="RecordPanel" PanelControlName="SportRecordControl">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SportPanelHeader"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dh</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;asp:panel id="SportRecordControlCollapsibleRegion" runat="server"&gt;&lt;GEN:PANEL NAME="SportPanel"/&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="SportPanelHeader" Type="PanelHeader" PanelControlName="SportRecordControl">
|
||||
<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="SportRecordControlPanelExtender" runat="server" TargetControlid="SportRecordControlCollapsibleRegion" ExpandControlID="SportRecordControlIcon" CollapseControlID="SportRecordControlIcon" ImageControlID="SportRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true"/&gt;
|
||||
&lt;asp:ImageButton id="SportRecordControlIcon" 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="SportRecordControlTitleRegion"/&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="SportRecordControlTitleRegion" PanelControlName="SportRecordControl">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:HTML NAME="SportTitle"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhtr</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="SportPanel" PanelControlName="SportRecordControl">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SportFields"/&gt;</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Epilog />
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dBody</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="SportFields" Type="RecordGrid" PanelControlName="SportRecordControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="SportIdLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="SportId"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="SPORTLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="SPORT"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes />
|
||||
</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="PageButtons" Type="PageButton">
|
||||
<Prolog />
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="SaveButton"/&gt;</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="SaveAndNewButton"/&gt;</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="CancelButton"/&gt;</Value>
|
||||
<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>
|
||||
</LayoutDefinition></LayoutDefinition>
|
||||
</ComponentDefinition>
|
87
Sport/EditSportTable.aspx
Normal file
87
Sport/EditSportTable.aspx
Normal file
|
@ -0,0 +1,87 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="BaseClasses" Namespace="BaseClasses.Web.UI.WebControls" Assembly="BaseClasses" %>
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditSportTable" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditSportTable.aspx.vb" Culture="th-TH" MasterPageFile="..\Master Pages\HorPersonalmenu.master" Inherits="Persons.UI.EditSportTable" %><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>
|
||||
<Persons:SportTableControl runat="server" id="SportTableControl"> <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="SportTableControlPanelExtender" runat="server" TargetControlid="SportTableControlCollapsibleRegion" ExpandControlID="SportTableControlIcon" CollapseControlID="SportTableControlIcon" ImageControlID="SportTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="SportTableControlIcon" 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="dhtr" valign="middle"><asp:Literal runat="server" id="SportTitle" Text="<%#String.Concat("Sport") %>"> </asp:Literal></td></tr></table>
|
||||
</td><td class="dher"><img src="../Images/space.gif" alt="" /></td></tr></table>
|
||||
</td></tr><tr><td><asp:panel id="SportTableControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fila"><%# GetResourceValue("Txt:SearchFor", "Persons") %></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("SportSearchButton"))%>
|
||||
<asp:TextBox runat="server" id="SportSearch" columns="50" cssclass="Search_Input"> </asp:TextBox>
|
||||
<asp:AutoCompleteExtender id="SportSearchAutoCompleteExtender" runat="server" TargetControlID="SportSearch" ServiceMethod="GetAutoCompletionList_SportSearch" MinimumPrefixLength="2" CompletionInterval="700" CompletionSetCount="10" CompletionListCssClass="autotypeahead_completionListElement" CompletionListItemCssClass="autotypeahead_listItem " CompletionListHighlightedItemCssClass="autotypeahead_highlightedListItem">
|
||||
</asp:AutoCompleteExtender>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SportSearchButton"))%>
|
||||
</td><td class="filbc"><Persons:ThemeButton runat="server" id="SportSearchButton" button-causesvalidation="False" button-commandname="Search" button-text="<%# GetResourceValue("Btn:SearchGoButtonText", "Persons") %>"></Persons:ThemeButton></td></tr><tr><td class="fila"><asp:Literal runat="server" id="SportIdLabel" Text="Sport"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("SportFilterButton"))%>
|
||||
<asp:TextBox runat="server" id="SportIdFromFilter" columns="30" cssclass="Filter_Input"> </asp:TextBox>
|
||||
<span class="rft"><asp:Label runat="server" id="SportIdRangeFilterText" Text="<%# GetResourceValue("Txt:To", "Persons") %>"> </asp:Label></span>
|
||||
<asp:TextBox runat="server" id="SportIdToFilter" columns="30" cssclass="Filter_Input"> </asp:TextBox>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SportFilterButton"))%>
|
||||
</td><td class="filbc" rowspan="2"><Persons:ThemeButton runat="server" id="SportFilterButton" button-causesvalidation="False" button-commandname="Search" button-text="<%# GetResourceValue("Btn:SearchGoButtonText", "Persons") %>"></Persons:ThemeButton></td></tr><tr><td class="fila"><asp:Literal runat="server" id="SPORTLabel" Text="Sport"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("SportFilterButton"))%>
|
||||
<asp:DropDownList runat="server" id="SPORTFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SportFilterButton"))%>
|
||||
</td></tr></table>
|
||||
</td></tr><tr><td class="pr"><table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="../Images/paginationRowEdgeL.gif" alt="" /></td><td class="prbbc"><img src="../Images/ButtonBarEdgeL.gif" alt="" /></td><td class="prbbc"><img src="../Images/ButtonBarDividerL.gif" alt="" /></td><td class="prbbc"><asp:ImageButton runat="server" id="SportAddButton" causesvalidation="false" commandname="AddRecord" imageurl="../Images/ButtonBarNew.gif" onmouseout="this.src='../Images/ButtonBarNew.gif'" onmouseover="this.src='../Images/ButtonBarNewOver.gif'" tooltip="<%# GetResourceValue("Btn:Add", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="SportEditButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/ButtonBarEdit.gif" onmouseout="this.src='../Images/ButtonBarEdit.gif'" onmouseover="this.src='../Images/ButtonBarEditOver.gif'" tooltip="<%# GetResourceValue("Btn:Edit", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="SportDeleteButton" causesvalidation="false" commandargument="DeleteOnUpdate" commandname="DeleteRecord" imageurl="../Images/ButtonBarDelete.gif" onmouseout="this.src='../Images/ButtonBarDelete.gif'" onmouseover="this.src='../Images/ButtonBarDeleteOver.gif'" tooltip="<%# GetResourceValue("Btn:Delete", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="SportSaveButton" causesvalidation="true" commandname="UpdateData" imageurl="../Images/ButtonBarSave.gif" onmouseout="this.src='../Images/ButtonBarSave.gif'" onmouseover="this.src='../Images/ButtonBarSaveOver.gif'" tooltip="<%# GetResourceValue("Btn:Save", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="SportRefreshButton" causesvalidation="false" commandname="ResetData" imageurl="../Images/ButtonBarRefresh.gif" onmouseout="this.src='../Images/ButtonBarRefresh.gif'" onmouseover="this.src='../Images/ButtonBarRefreshOver.gif'" tooltip="<%# GetResourceValue("Btn:Refresh", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="SportResetButton" causesvalidation="false" commandname="ResetFilters" imageurl="../Images/ButtonBarReset.gif" onmouseout="this.src='../Images/ButtonBarReset.gif'" onmouseover="this.src='../Images/ButtonBarResetOver.gif'" tooltip="<%# GetResourceValue("Btn:Reset", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><img src="../Images/ButtonBarDividerR.gif" alt="" /></td><td class="prbbc"><img src="../Images/ButtonBarEdgeR.gif" alt="" /></td><td class="pra"><Persons:Pagination runat="server" id="SportPagination"></Persons:Pagination></td><td><img src="../Images/paginationRowEdgeR.gif" alt="" /></td><td width="100%"> </td></tr></table>
|
||||
</td></tr><tr><td class="tre"><table cellpadding="0" cellspacing="0" border="0" width="100%" onkeydown="captureUpDownKey(this, event)"><tr class="tch"><th class="thcnb" colspan="3"><img src="../Images/space.gif" height="1" width="1" alt="" /></th><th class="thcwb" style="padding:0px;vertical-align:middle;"><asp:CheckBox runat="server" id="SportToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="SportIdLabel1" Text="Sport" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="SPORTLabel1" Text="Sport" CausesValidation="False"> </asp:LinkButton>
|
||||
</th></tr><asp:Repeater runat="server" id="SportTableControlRepeater"> <ITEMTEMPLATE> <Persons:SportTableControlRow runat="server" id="SportTableControlRow">
|
||||
<tr><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="SportRowViewButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_view.gif" tooltip="<%# GetResourceValue("Txt:ViewRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="SportRowEditButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_edit.gif" tooltip="<%# GetResourceValue("Txt:EditRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="SportRowDeleteButton" causesvalidation="False" commandargument="DeleteOnUpdate" commandname="DeleteRecord" cssclass="button_link" imageurl="../Images/icon_delete.gif" tooltip="<%# GetResourceValue("Txt:DeleteRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticwb"><asp:CheckBox runat="server" id="SportRecordRowSelection" onclick="moveToThisTableRow(this);"> </asp:CheckBox></td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="padding-right: 5px; vertical-align:top">
|
||||
<asp:TextBox runat="server" id="SportId" Columns="7" MaxLength="7" cssclass="field_input"></asp:TextBox></td>
|
||||
<td>
|
||||
|
||||
<asp:RequiredFieldValidator runat="server" id="SportIdRequiredFieldValidator" ControlToValidate="SportId" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Sport") %>" enabled="True" text="*"></asp:RequiredFieldValidator>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="SportIdTextBoxMaxLengthValidator" ControlToValidate="SportId" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "Sport") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="SPORT" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="SPORTTextBoxMaxLengthValidator" ControlToValidate="SPORT" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "Sport") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr></Persons:SportTableControlRow>
|
||||
</ITEMTEMPLATE>
|
||||
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:SportTableControl>
|
||||
|
||||
</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>
|
||||
|
499
Sport/EditSportTable.aspx.vb
Normal file
499
Sport/EditSportTable.aspx.vb
Normal file
|
@ -0,0 +1,499 @@
|
|||
|
||||
' This file implements the code-behind class for EditSportTable.aspx.
|
||||
' App_Code\EditSportTable.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
|
||||
|
||||
Public Partial Class EditSportTable
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the EditSportTable page.
|
||||
' Place your customizations in Section 1. Do not modify Section 2.
|
||||
|
||||
#Region "Section 1: Place your customizations here."
|
||||
|
||||
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
|
||||
|
||||
Public Overrides Sub SaveData()
|
||||
Me.SaveData_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "Ajax Functions"
|
||||
|
||||
' <Services.WebMethod()> _
|
||||
' Public Shared Function GetRecordFieldValue(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()
|
||||
' ' 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, 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
|
||||
|
||||
<Services.WebMethod()> _
|
||||
Public Shared Function GetAutoCompletionList_SportSearch(ByVal prefixText As String, ByVal count As Integer) As String()
|
||||
' GetSportSearchCompletionList gets the list of suggestions from the database.
|
||||
' prefixText is the search text typed by the user .
|
||||
' count specifies the number of suggestions to be returned.
|
||||
' Customize by adding code before or after the call to GetAutoCompletionList_SportSearch()
|
||||
' or replace the call to GetAutoCompletionList_SportSearch().
|
||||
Return GetAutoCompletionList_SportSearch_Base(prefixText, count)
|
||||
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
|
||||
|
||||
|
||||
|
||||
Protected Overloads Overrides Sub BasePage_PreRender(ByVal sender As Object, ByVal e As EventArgs)
|
||||
MyBase.BasePage_PreRender(sender, e)
|
||||
Base_RegisterPostback()
|
||||
End Sub
|
||||
<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
|
||||
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
|
||||
Public Overrides Sub SetChartControl(ByVal chartCtrlName As String)
|
||||
Me.SetChartControl_Base(chartCtrlName)
|
||||
End Sub
|
||||
Public Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
|
||||
Me.Page_PreRender_Base(sender,e)
|
||||
End Sub
|
||||
Protected Overrides Function SaveViewState() As Object
|
||||
Return SaveViewState_Base()
|
||||
End Function
|
||||
Protected Overrides Sub LoadViewState(ByVal savedState As Object)
|
||||
LoadViewState_Base(savedState)
|
||||
End Sub
|
||||
Protected Overrides Sub ClearControlsFromSession()
|
||||
ClearControlsFromSession_Base()
|
||||
End Sub
|
||||
Protected Overrides Sub SaveControlsToSession()
|
||||
SaveControlsToSession_Base()
|
||||
End Sub
|
||||
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
|
||||
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 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
|
||||
#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.
|
||||
|
||||
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()
|
||||
|
||||
' 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("NOT_ANONYMOUS")
|
||||
|
||||
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:Edit") + " Sport"
|
||||
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()
|
||||
|
||||
Me.SportTableControl.SaveData()
|
||||
|
||||
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.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Function GetAutoCompletionList_SportSearch_Base(ByVal prefixText As String, ByVal count As Integer) As String()
|
||||
' Since this method is a shared/static method it does not maintain information about page or controls within the page.
|
||||
' Hence we can not invoke any method associated with any controls.
|
||||
' So, if we need to use any control in the page we need to instantiate it.
|
||||
Dim control as Persons.UI.Controls.EditSportTable.SportTableControl
|
||||
control = new Persons.UI.Controls.EditSportTable.SportTableControl()
|
||||
|
||||
Return control.GetAutoCompletionList_SportSearch(prefixText, count)
|
||||
|
||||
End Function
|
||||
|
||||
' 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.
|
||||
|
||||
Me.SportTableControl.LoadData()
|
||||
Me.SportTableControl.DataBind()
|
||||
|
||||
|
||||
' Load data for chart.
|
||||
|
||||
|
||||
' initialize aspx controls
|
||||
|
||||
'Set the corresponding menu item to be highlighted for this page
|
||||
Dim pageMaster As System.Web.UI.MasterPage = Me.Master
|
||||
If Not pageMaster is Nothing Then
|
||||
Dim menuComponent As IMenuComponent = CType(Me.Master.FindControl("_Menu"), IMenuComponent)
|
||||
If Not menuComponent is Nothing Then
|
||||
menuComponent.HiliteSettings = "SportMenuItem"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
1544
Sport/EditSportTable.xml
Normal file
1544
Sport/EditSportTable.xml
Normal file
File diff suppressed because it is too large
Load diff
47
Sport/SportWebReport.aspx
Normal file
47
Sport/SportWebReport.aspx
Normal file
|
@ -0,0 +1,47 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.SportWebReport" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="SportWebReport.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.SportWebReport" %>
|
||||
<%@ Register Tagprefix="BaseClasses" Namespace="BaseClasses.Web.UI.WebControls" Assembly="BaseClasses" %><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>
|
||||
<Persons:SportTableControl runat="server" id="SportTableControl"> <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="SportTableControlPanelExtender" runat="server" TargetControlid="SportTableControlCollapsibleRegion" ExpandControlID="SportTableControlIcon" CollapseControlID="SportTableControlIcon" ImageControlID="SportTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="SportTableControlIcon" 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="dhtr" valign="middle"><asp:Literal runat="server" id="SportTitle" Text="<%#String.Concat("Sport") %>"> </asp:Literal></td></tr></table>
|
||||
</td><td class="dher"><img src="../Images/space.gif" alt="" /></td></tr></table>
|
||||
</td></tr><tr><td><asp:panel id="SportTableControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="tre"><table cellpadding="0" cellspacing="0" border="0" width="100%" onkeydown="captureUpDownKey(this, event)"><tr class="tch"><th class="thc" scope="col"><asp:Literal runat="server" id="SportIdLabel1" Text="Sport"> </asp:Literal>
|
||||
</th><th class="thc" scope="col"><asp:Literal runat="server" id="SPORTLabel1" Text="Sport"> </asp:Literal>
|
||||
</th></tr><asp:Repeater runat="server" id="SportTableControlRepeater"> <ITEMTEMPLATE> <Persons:SportTableControlRow runat="server" id="SportTableControlRow">
|
||||
<tr><td class="ttc" style="text-align: right;"><span style="white-space:nowrap;">
|
||||
<asp:Literal runat="server" id="SportId"></asp:Literal></span>
|
||||
</td><td class="ttc"><asp:Literal runat="server" id="SPORT"></asp:Literal> </td></tr></Persons:SportTableControlRow>
|
||||
</ITEMTEMPLATE>
|
||||
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:SportTableControl>
|
||||
|
||||
</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>
|
||||
|
478
Sport/SportWebReport.aspx.vb
Normal file
478
Sport/SportWebReport.aspx.vb
Normal file
|
@ -0,0 +1,478 @@
|
|||
|
||||
' This file implements the code-behind class for SportWebReport.aspx.
|
||||
' App_Code\SportWebReport.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
|
||||
|
||||
Public Partial Class SportWebReport
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the SportWebReport page.
|
||||
' Place your customizations in Section 1. Do not modify Section 2.
|
||||
|
||||
#Region "Section 1: Place your customizations here."
|
||||
|
||||
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
|
||||
|
||||
Public Overrides Sub SaveData()
|
||||
Me.SaveData_Base()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "Ajax Functions"
|
||||
|
||||
' <Services.WebMethod()> _
|
||||
' Public Shared Function GetRecordFieldValue(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()
|
||||
' ' 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, 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
|
||||
|
||||
|
||||
|
||||
Protected Overloads Overrides Sub BasePage_PreRender(ByVal sender As Object, ByVal e As EventArgs)
|
||||
MyBase.BasePage_PreRender(sender, e)
|
||||
Base_RegisterPostback()
|
||||
End Sub
|
||||
<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
|
||||
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
|
||||
Public Overrides Sub SetChartControl(ByVal chartCtrlName As String)
|
||||
Me.SetChartControl_Base(chartCtrlName)
|
||||
End Sub
|
||||
Public Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
|
||||
Me.Page_PreRender_Base(sender,e)
|
||||
End Sub
|
||||
Protected Overrides Function SaveViewState() As Object
|
||||
Return SaveViewState_Base()
|
||||
End Function
|
||||
Protected Overrides Sub LoadViewState(ByVal savedState As Object)
|
||||
LoadViewState_Base(savedState)
|
||||
End Sub
|
||||
Protected Overrides Sub ClearControlsFromSession()
|
||||
ClearControlsFromSession_Base()
|
||||
End Sub
|
||||
Protected Overrides Sub SaveControlsToSession()
|
||||
SaveControlsToSession_Base()
|
||||
End Sub
|
||||
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
|
||||
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 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
|
||||
#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.
|
||||
|
||||
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()
|
||||
|
||||
' 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("NO_ACCESS")
|
||||
|
||||
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 = "Sport"
|
||||
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()
|
||||
|
||||
Me.SportTableControl.SaveData()
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Me.SportTableControl.LoadData()
|
||||
Me.SportTableControl.DataBind()
|
||||
|
||||
|
||||
' Load data for chart.
|
||||
|
||||
|
||||
' initialize aspx controls
|
||||
|
||||
'Set the corresponding menu item to be highlighted for this page
|
||||
Dim pageMaster As System.Web.UI.MasterPage = Me.Master
|
||||
If Not pageMaster is Nothing Then
|
||||
Dim menuComponent As IMenuComponent = CType(Me.Master.FindControl("_Menu"), IMenuComponent)
|
||||
If Not menuComponent is Nothing Then
|
||||
menuComponent.HiliteSettings = "SportMenuItem"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
563
Sport/SportWebReport.xml
Normal file
563
Sport/SportWebReport.xml
Normal file
|
@ -0,0 +1,563 @@
|
|||
<?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>SportWebReport</Name>
|
||||
<Type>Page</Type>
|
||||
<SubType>DotNet</SubType>
|
||||
<MasterLayout>~/Master Pages/HorizontalMenu.master</MasterLayout>
|
||||
<GenerateDirectory>Sport</GenerateDirectory>
|
||||
<Layout>Sport\SportWebReport.html</Layout>
|
||||
<DisplayName>SportWebReport</DisplayName>
|
||||
<Description>Table view to show or edit multiple records.</Description>
|
||||
<MenuFileToHilite>Menu</MenuFileToHilite>
|
||||
<MenuHiliteItem>SportMenuItem</MenuHiliteItem>
|
||||
<LoginRequired><PRoles>NO_ACCESS</PRoles></LoginRequired>
|
||||
<CheckSum>898127491-5461</CheckSum>
|
||||
</Self>
|
||||
<ComposedOf>
|
||||
<ContainedComponent>
|
||||
<Name>PageTitle</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>Sport</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SPORT</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>SPORT</Field>
|
||||
<FieldValueStyle>Literal</FieldValueStyle>
|
||||
<Table>Sport</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>FieldMaxLength</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>HTMLEncodeValue</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>NullValueText</Name>
|
||||
<Value>&nbsp;</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupDisplay</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupThreshold</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowHeight</Name>
|
||||
<Value>200</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowPersist</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowScrollBar</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowTitle</Name>
|
||||
<Value>%ISD_DEFAULT%</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowWidth</Name>
|
||||
<Value>300</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>TextFormat</Name>
|
||||
<Value>{0}</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
<InsideItemTemplate>true</InsideItemTemplate>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportId</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>SportId</Field>
|
||||
<FieldValueStyle>Literal</FieldValueStyle>
|
||||
<Table>Sport</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>FieldMaxLength</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>HTMLEncodeValue</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>NullValueText</Name>
|
||||
<Value>&nbsp;</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupDisplay</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupThreshold</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowHeight</Name>
|
||||
<Value>200</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowPersist</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowScrollBar</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowTitle</Name>
|
||||
<Value>%ISD_DEFAULT%</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PopupWindowWidth</Name>
|
||||
<Value>300</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>TextFormat</Name>
|
||||
<Value>{0}</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
<InsideItemTemplate>true</InsideItemTemplate>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportIdLabel1</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>SportTableControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>SportId</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>Sport</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%Sport%SportId</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SPORTLabel1</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>SportTableControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>SPORT</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>Sport</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%Sport%SPORT</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportTableControl</Name>
|
||||
<Type>Table</Type>
|
||||
<PanelStyle>WebReport</PanelStyle>
|
||||
<Table>Sport</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>HideDataUntilSearched</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InitialRowDisplayStyle</Name>
|
||||
<Value>FirstRowExpanded</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>TableOrQuery</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PageSize</Name>
|
||||
<Value>500</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportTableControlCollapsibleRegion</Name>
|
||||
<Type>Aspx</Type>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
<ControlClass>System.Web.UI.WebControls.Panel</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportTableControlIcon</Name>
|
||||
<Type>Aspx</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>InternalUse:TreatAs</Name>
|
||||
<Value>FieldFilter</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
<ControlClass>System.Web.UI.WebControls.ImageButton</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportTableControlPanelExtender</Name>
|
||||
<Type>Aspx</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>InternalUse:TreatAs</Name>
|
||||
<Value>FieldFilter</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
<ControlClass>AjaxControlToolkit.CollapsiblePanelExtender</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SportTitle</Name>
|
||||
<Type>Html</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>HtmlEncodeWhiteSpace</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value><%#String.Concat("Sport") %></Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>SportTableControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>UpdatePanel1</Name>
|
||||
<Type>UpdatePanel</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>SmoothPanelUpdate</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
</ComposedOf>
|
||||
<LayoutDefinition><?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="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:TABLE NAME="SportTableControl"&gt;&lt;/GEN:TABLE&gt;
|
||||
</Value>
|
||||
</Cell>
|
||||
</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="SportTableControl" Type="TablePanel" PanelControlName="SportTableControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SportPanelHeader"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dh</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;asp:panel id="SportTableControlCollapsibleRegion" runat="server"&gt;&lt;GEN:PANEL NAME="SportPanel"/&gt;&lt;/asp:panel&gt;</Value>
|
||||
</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>
|
||||
</Layout>
|
||||
<Layout Name="SportPanelHeader" Type="PanelHeader" PanelControlName="SportTableControl">
|
||||
<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="SportTableControlPanelExtender" runat="server" TargetControlid="SportTableControlCollapsibleRegion" ExpandControlID="SportTableControlIcon" CollapseControlID="SportTableControlIcon" ImageControlID="SportTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true"/&gt;
|
||||
&lt;asp:ImageButton id="SportTableControlIcon" 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="SportTableControlTitleRegion"/&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="SportTableControlTitleRegion" PanelControlName="SportTableControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:HTML NAME="SportTitle"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhtr</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="SportPanel" PanelControlName="SportTableControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="SportFields"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>tre</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dBody</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="SportFields" Type="TableGridRegular" PanelControlName="SportTableControl">
|
||||
<Row Type="Header">
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="SportIdLabel1"/&gt;
|
||||
</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>thc</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>scope</Name>
|
||||
<AttributeValue>col</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="SPORTLabel1"/&gt;
|
||||
</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>thc</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>scope</Name>
|
||||
<AttributeValue>col</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<RowAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>tch</AttributeValue>
|
||||
</Attribute>
|
||||
</RowAttributes>
|
||||
</Row>
|
||||
<Row Type="Repeater">
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="SportId"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>ttc</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>text-align: right;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="SPORT"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>ttc</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>
|
||||
<Attribute>
|
||||
<Name>onkeydown</Name>
|
||||
<AttributeValue>captureUpDownKey(this, event)</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
</LayoutDefinition></LayoutDefinition>
|
||||
</ComponentDefinition>
|
Loading…
Add table
Add a link
Reference in a new issue