initial commit

This commit is contained in:
Siwat Sirichai 2025-06-08 16:22:20 +07:00
commit 252dac3143
1516 changed files with 694271 additions and 0 deletions

View file

@ -0,0 +1,151 @@
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="AddPersonalEducation.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.AddPersonalEducation" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.AddPersonalEducation" %>
<%@ 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:PersonalEducationRecordControl runat="server" id="PersonalEducationRecordControl"> <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="PersonalEducationRecordControlPanelExtender" runat="server" TargetControlid="PersonalEducationRecordControlCollapsibleRegion" ExpandControlID="PersonalEducationRecordControlIcon" CollapseControlID="PersonalEducationRecordControlIcon" ImageControlID="PersonalEducationRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="PersonalEducationRecordControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="PersonalEducationTitle" Text="&lt;%#String.Concat(GetResourceValue(&quot;Title:Add&quot;),&quot; Personal Education&quot;) %>"> </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="PersonalEducationRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="PersonalEducationRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="PersonalIdLabel" Text="ชื่อ นามสกุล"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="PersonalId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="PersonalIdFvLlsHyperLink" ControlToUpdate="PersonalId" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="PersonalId" Field="PersonalId_.PersonalId" DisplayField="PersonalId_.PersonalName"></Selectors:FvLlsHyperLink>&nbsp;
<asp:RequiredFieldValidator runat="server" id="PersonalIdRequiredFieldValidator" ControlToValidate="PersonalId" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueIsRequired&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ชื่อ นามสกุล&quot;) %>" enabled="True" initialvalue="--PLEASE_SELECT--" text="*"></asp:RequiredFieldValidator></span>
<asp:ImageButton runat="server" id="PersonalIdAddRecordLink" causesvalidation="False" commandname="Redirect" imageurl="../Images/iconNewFlat.gif" tooltip="&lt;%# GetResourceValue(&quot;Btn:Add&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton> </td><td class="fls"><asp:Literal runat="server" id="StartDateLabel" Text="ตั้งแต่"> </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="StartDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="StartDateCalendarExtender" TargetControlID="StartDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="StartDateTextBoxMaxLengthValidator" ControlToValidate="StartDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ตั้งแต่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="EndDateLabel" Text="ถึง"> </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="EndDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="EndDateCalendarExtender" TargetControlID="EndDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ถึง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td><td class="fls"><asp:Literal runat="server" id="CourseLabel" Text="หลักสูตร"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Course" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseTextBoxMaxLengthValidator" ControlToValidate="Course" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;หลักสูตร&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ(สาขา)"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseAbbr" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseAbbrTextBoxMaxLengthValidator" ControlToValidate="CourseAbbr" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คุณวุฒิ(สาขา)&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="InstitueLabel" Text="สถาบันการศึกษา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Institue" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="InstitueTextBoxMaxLengthValidator" ControlToValidate="Institue" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สถาบันการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="FacultryLabel" Text="สาขาวิชา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Facultry" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FacultryTextBoxMaxLengthValidator" ControlToValidate="Facultry" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สาขาวิชา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="LevelIdLabel" Text="ระดับการศึกษา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="LevelId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="LevelIdFvLlsHyperLink" ControlToUpdate="LevelId" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Education" Field="Education_.EducationId" DisplayField="Education_.Level"></Selectors:FvLlsHyperLink></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="EdYearLabel" Text="ปีที่จบการศึกษา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="EdYear" Columns="4" MaxLength="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EdYearTextBoxMaxLengthValidator" ControlToValidate="EdYear" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ปีที่จบการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="EducationPeriodLabel" Text="ก่อน/หลัง รับราชการ"> </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="EducationPeriod" Columns="4" MaxLength="4" cssclass="field_input"></asp:TextBox></td>
<td>
&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EducationPeriodTextBoxMaxLengthValidator" ControlToValidate="EducationPeriod" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ก่อน/หลัง รับราชการ&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="EducationTypeLabel" Text="รร.ทหาร/พลเรือน"> </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="EducationType" Columns="4" MaxLength="4" cssclass="field_input"></asp:TextBox></td>
<td>
&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EducationTypeTextBoxMaxLengthValidator" ControlToValidate="EducationType" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;รร.ทหาร/พลเรือน&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td><td class="fls"><asp:Literal runat="server" id="COUNTRYLabel" Text="ประเทศ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="COUNTRY" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="COUNTRYFvLlsHyperLink" ControlToUpdate="COUNTRY" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Country" Field="Country_.CountryId" DisplayField="Country_.Country"></Selectors:FvLlsHyperLink></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CourseNoLabel" Text="รุ่นที่"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseNo" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseNoTextBoxMaxLengthValidator" ControlToValidate="CourseNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;รุ่นที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="ScoreNoLabel" Text="ได้ลำดับที่"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="ScoreNo" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreNoTextBoxMaxLengthValidator" ControlToValidate="ScoreNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ได้ลำดับที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="NoAllLabel" Text="จากทั้งหมด"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="NoAll" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="NoAllTextBoxMaxLengthValidator" ControlToValidate="NoAll" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;จากทั้งหมด&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="ScoreLabel" Text="ระดับคะแนน"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Score" Columns="5" MaxLength="5" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreTextBoxMaxLengthValidator" ControlToValidate="Score" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ระดับคะแนน&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CommandLabel" Text="คำสั้ง"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Command" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คำสั้ง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="CommandDateLabel" Text="ลงวันที่"> </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="CommandDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="CommandDateCalendarExtender" TargetControlID="CommandDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ลงวันที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td></tr></table></asp:panel>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalEducationRecordControl>
<%= 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="&lt;%# GetResourceValue(&quot;Btn:Save&quot;, &quot;Persons&quot;) %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="SaveAndNewButton" button-causesvalidation="true" button-commandname="UpdateData" button-text="&lt;%# GetResourceValue(&quot;Btn:SaveNNew&quot;, &quot;Persons&quot;) %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="CancelButton" button-causesvalidation="false" button-commandname="Redirect" button-text="&lt;%# GetResourceValue(&quot;Btn:Cancel&quot;, &quot;Persons&quot;) %>"></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>

View file

@ -0,0 +1,657 @@

' This file implements the code-behind class for AddPersonalEducation.aspx.
' App_Code\AddPersonalEducation.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 AddPersonalEducation
Inherits BaseApplicationPage
' Code-behind class for the AddPersonalEducation 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") + " Personal Education"
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.PersonalEducationRecordControl.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.PersonalEducationRecordControl.LoadData()
Me.PersonalEducationRecordControl.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 = "PersonalEducationMenuItem"
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.PersonalEducationRecordControl Is Nothing AndAlso Not Me.PersonalEducationRecordControl.DataSource Is Nothing Then
id = Me.PersonalEducationRecordControl.DataSource.EducationId.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.PersonalEducationRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalEducationRecordControl.DataSource)
value = EvaluateFormula(DFKA, Me.PersonalEducationRecordControl.DataSource, Nothing,variables)
Else
value = Me.PersonalEducationRecordControl.DataSource.GetValue(Me.PersonalEducationRecordControl.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.PersonalEducationRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalEducationRecordControl.DataSource)
value = EvaluateFormula(formula, Me.PersonalEducationRecordControl.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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,129 @@
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonalEducation" %>
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonalEducation.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.EditPersonalEducation" %>
<%@ 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:PersonalEducationRecordControl runat="server" id="PersonalEducationRecordControl"> <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="PersonalEducationRecordControlPanelExtender" runat="server" TargetControlid="PersonalEducationRecordControlCollapsibleRegion" ExpandControlID="PersonalEducationRecordControlIcon" CollapseControlID="PersonalEducationRecordControlIcon" ImageControlID="PersonalEducationRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="PersonalEducationRecordControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="PersonalEducationTitle" Text="&lt;%#String.Concat(GetResourceValue(&quot;Title:Edit&quot;),&quot; Personal Education&quot;) %>"> </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="PersonalEducationRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="PersonalEducationRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="PersonalIdLabel" Text="ชื่อ นามสกุล"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><asp:Label runat="server" id="PersonalId" enabled="False"></asp:Label>
</td><td class="fls"></td><td class="dfv" style="white-space:nowrap;"></td></tr><tr><td class="fls"><asp:Literal runat="server" id="StartDateLabel" Text="ตั้งแต่"> </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="StartDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="StartDateCalendarExtender" TargetControlID="StartDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="StartDateTextBoxMaxLengthValidator" ControlToValidate="StartDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ตั้งแต่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td><td class="fls"><asp:Literal runat="server" id="EndDateLabel" Text="ถึง"> </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="EndDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="EndDateCalendarExtender" TargetControlID="EndDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ถึง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CourseLabel" Text="หลักสูตร"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Course" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseTextBoxMaxLengthValidator" ControlToValidate="Course" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;หลักสูตร&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"></td><td class="dfv" style="white-space:nowrap;"></td></tr><tr><td class="fls"><asp:Literal runat="server" id="InstitueLabel" Text="สถาบันการศึกษา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Institue" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="InstitueTextBoxMaxLengthValidator" ControlToValidate="Institue" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สถาบันการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="FacultryLabel" Text="สาขาวิชา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Facultry" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FacultryTextBoxMaxLengthValidator" ControlToValidate="Facultry" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สาขาวิชา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="LevelIdLabel" Text="ระดับการศึกษา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="LevelId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="LevelIdFvLlsHyperLink" ControlToUpdate="LevelId" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Education" Field="Education_.EducationId" DisplayField="Education_.Level"></Selectors:FvLlsHyperLink></span>
</td><td class="fls"><asp:Literal runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ(สาขา)"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseAbbr" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseAbbrTextBoxMaxLengthValidator" ControlToValidate="CourseAbbr" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คุณวุฒิ(สาขา)&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="EducationTypeLabel" Text="รร.ทหาร/พลเรือน"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="EducationType" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList></span>
</td><td class="fls"><asp:Literal runat="server" id="EducationPeriodLabel" Text="ก่อน/หลัง รับราชการ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="EducationPeriod" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="EducationPeriodFvLlsHyperLink" ControlToUpdate="EducationPeriod" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" Table="EducationPeriod" Field="EducationPeriod_.PeriodId" DisplayField="EducationPeriod_.Period"></Selectors:FvLlsHyperLink></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="EdYearLabel" Text="ปีที่จบการศึกษา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="EdYear" Columns="4" MaxLength="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EdYearTextBoxMaxLengthValidator" ControlToValidate="EdYear" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ปีที่จบการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="COUNTRYLabel" Text="ประเทศ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="COUNTRY" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="COUNTRYFvLlsHyperLink" ControlToUpdate="COUNTRY" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Country" Field="Country_.CountryId" DisplayField="Country_.Country"></Selectors:FvLlsHyperLink></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CourseNoLabel" Text="รุ่นที่"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseNo" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseNoTextBoxMaxLengthValidator" ControlToValidate="CourseNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;รุ่นที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="ScoreNoLabel" Text="ได้ลำดับที่"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="ScoreNo" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreNoTextBoxMaxLengthValidator" ControlToValidate="ScoreNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ได้ลำดับที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="NoAllLabel" Text="จากทั้งหมด"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="NoAll" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="NoAllTextBoxMaxLengthValidator" ControlToValidate="NoAll" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;จากทั้งหมด&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="ScoreLabel" Text="ระดับคะแนน"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Score" Columns="5" MaxLength="5" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreTextBoxMaxLengthValidator" ControlToValidate="Score" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ระดับคะแนน&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CommandLabel" Text="คำสั้ง"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Command" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คำสั้ง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="fls"><asp:Literal runat="server" id="CommandDateLabel" Text="ลงวันที่"> </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="CommandDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="CommandDateCalendarExtender" TargetControlID="CommandDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ลงวันที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td></tr></table></asp:panel>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalEducationRecordControl>
<%= 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="&lt;%# GetResourceValue(&quot;Btn:Save&quot;, &quot;Persons&quot;) %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="CancelButton" button-causesvalidation="false" button-commandname="Redirect" button-text="&lt;%# GetResourceValue(&quot;Btn:Cancel&quot;, &quot;Persons&quot;) %>"></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>

View file

@ -0,0 +1,616 @@

' This file implements the code-behind class for EditPersonalEducation.aspx.
' App_Code\EditPersonalEducation.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 EditPersonalEducation
Inherits BaseApplicationPage
' Code-behind class for the EditPersonalEducation 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 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.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,"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("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 = GetResourceValue("Title:Edit") + " Personal Education"
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.PersonalEducationRecordControl.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.PersonalEducationRecordControl.LoadData()
Me.PersonalEducationRecordControl.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 = "PersonalEducationMenuItem"
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 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.PersonalEducationRecordControl Is Nothing AndAlso Not Me.PersonalEducationRecordControl.DataSource Is Nothing Then
id = Me.PersonalEducationRecordControl.DataSource.EducationId.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.PersonalEducationRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalEducationRecordControl.DataSource)
value = EvaluateFormula(DFKA, Me.PersonalEducationRecordControl.DataSource, Nothing,variables)
Else
value = Me.PersonalEducationRecordControl.DataSource.GetValue(Me.PersonalEducationRecordControl.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.PersonalEducationRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalEducationRecordControl.DataSource)
value = EvaluateFormula(formula, Me.PersonalEducationRecordControl.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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,187 @@
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonalEducationTable" %>
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonalEducationTable.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.EditPersonalEducationTable" %>
<%@ 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>
<Persons:PersonalEducationTableControl runat="server" id="PersonalEducationTableControl"> <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="PersonalEducationTableControlPanelExtender" runat="server" TargetControlid="PersonalEducationTableControlCollapsibleRegion" ExpandControlID="PersonalEducationTableControlIcon" CollapseControlID="PersonalEducationTableControlIcon" ImageControlID="PersonalEducationTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="PersonalEducationTableControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="PersonalEducationTitle" Text="&lt;%#String.Concat(&quot;Personal Education&quot;) %>"> </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="PersonalEducationTableControlCollapsibleRegion" 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("PersonalEducationSearchButton"))%>
<asp:TextBox runat="server" id="PersonalEducationSearch" columns="50" cssclass="Search_Input"> </asp:TextBox>
<asp:AutoCompleteExtender id="PersonalEducationSearchAutoCompleteExtender" runat="server" TargetControlID="PersonalEducationSearch" ServiceMethod="GetAutoCompletionList_PersonalEducationSearch" MinimumPrefixLength="2" CompletionInterval="700" CompletionSetCount="10" CompletionListCssClass="autotypeahead_completionListElement" CompletionListItemCssClass="autotypeahead_listItem " CompletionListHighlightedItemCssClass="autotypeahead_highlightedListItem">
</asp:AutoCompleteExtender>
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalEducationSearchButton"))%>
</td><td class="filbc"><Persons:ThemeButton runat="server" id="PersonalEducationSearchButton" button-causesvalidation="False" button-commandname="Search" button-text="&lt;%# GetResourceValue(&quot;Btn:SearchGoButtonText&quot;, &quot;Persons&quot;) %>"></Persons:ThemeButton></td></tr><tr><td class="fila"><asp:Literal runat="server" id="PersonalIdLabel" Text="ชื่อ นามสกุล"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalEducationFilterButton"))%>
<asp:DropDownList runat="server" id="PersonalIdFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalEducationFilterButton"))%>
</td><td class="filbc" rowspan="2"></td></tr><tr><td class="fila"><asp:Literal runat="server" id="LevelIdLabel" Text="ระดับการศึกษา"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalEducationFilterButton"))%>
<asp:DropDownList runat="server" id="LevelIdFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalEducationFilterButton"))%>
</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="PersonalEducationAddButton" causesvalidation="false" commandname="AddRecord" imageurl="../Images/ButtonBarNew.gif" onmouseout="this.src='../Images/ButtonBarNew.gif'" onmouseover="this.src='../Images/ButtonBarNewOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Add&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationEditButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/ButtonBarEdit.gif" onmouseout="this.src='../Images/ButtonBarEdit.gif'" onmouseover="this.src='../Images/ButtonBarEditOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Edit&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationDeleteButton" causesvalidation="false" commandargument="DeleteOnUpdate" commandname="DeleteRecord" imageurl="../Images/ButtonBarDelete.gif" onmouseout="this.src='../Images/ButtonBarDelete.gif'" onmouseover="this.src='../Images/ButtonBarDeleteOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Delete&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationSaveButton" causesvalidation="true" commandname="UpdateData" imageurl="../Images/ButtonBarSave.gif" onmouseout="this.src='../Images/ButtonBarSave.gif'" onmouseover="this.src='../Images/ButtonBarSaveOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Save&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationRefreshButton" causesvalidation="false" commandname="ResetData" imageurl="../Images/ButtonBarRefresh.gif" onmouseout="this.src='../Images/ButtonBarRefresh.gif'" onmouseover="this.src='../Images/ButtonBarRefreshOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Refresh&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationResetButton" causesvalidation="false" commandname="ResetFilters" imageurl="../Images/ButtonBarReset.gif" onmouseout="this.src='../Images/ButtonBarReset.gif'" onmouseover="this.src='../Images/ButtonBarResetOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Reset&quot;, &quot;Persons&quot;) %>">
</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="PersonalEducationPagination"></Persons:Pagination></td><td><img src="../Images/paginationRowEdgeR.gif" alt="" /></td><td width="100%">&nbsp;</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="PersonalEducationToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="PersonalIdLabel1" Text="ชื่อ นามสกุล" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="StartDateLabel" Text="ตั้งแต่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EndDateLabel" Text="ถึง" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseLabel" Text="หลักสูตร" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ(สาขา)" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="InstitueLabel" Text="สถาบันการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="FacultryLabel" Text="สาขาวิชา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EducationTypeLabel1" Text="รร.ทหาร/พลเรือน" CausesValidation="False"> </asp:LinkButton></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="LevelIdLabel1" Text="ระดับการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EdYearLabel" Text="ปีที่จบการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EducationPeriodLabel" Text="ก่อน/หลัง รับราชการ" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EducationTypeLabel" Text="รร.ทหาร/พลเรือน" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="COUNTRYLabel" Text="ประเทศ" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseNoLabel" Text="รุ่นที่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ScoreNoLabel" Text="ได้ลำดับที่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="NoAllLabel" Text="จากทั้งหมด" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ScoreLabel" Text="ระดับคะแนน" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CommandLabel" Text="คำสั้ง" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CommandDateLabel" Text="ลงวันที่" CausesValidation="False"> </asp:LinkButton>
</th></tr><asp:Repeater runat="server" id="PersonalEducationTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalEducationTableControlRow runat="server" id="PersonalEducationTableControlRow">
<tr><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowViewButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_view.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:ViewRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowEditButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_edit.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:EditRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowDeleteButton" causesvalidation="False" commandargument="DeleteOnUpdate" commandname="DeleteRecord" cssclass="button_link" imageurl="../Images/icon_delete.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:DeleteRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticwb"><asp:CheckBox runat="server" id="PersonalEducationRecordRowSelection" onclick="moveToThisTableRow(this);"> </asp:CheckBox></td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="PersonalId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="PersonalIdFvLlsHyperLink" ControlToUpdate="PersonalId" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="PersonalId" Field="PersonalId_.PersonalId" DisplayField="PersonalId_.PersonalName"></Selectors:FvLlsHyperLink>&nbsp;
<asp:RequiredFieldValidator runat="server" id="PersonalIdRequiredFieldValidator" ControlToValidate="PersonalId" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueIsRequired&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ชื่อ นามสกุล&quot;) %>" enabled="True" initialvalue="--PLEASE_SELECT--" text="*"></asp:RequiredFieldValidator></span>
<asp:ImageButton runat="server" id="PersonalIdAddRecordLink" causesvalidation="False" commandname="Redirect" imageurl="../Images/iconNewFlat.gif" tooltip="&lt;%# GetResourceValue(&quot;Btn:Add&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton> </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="StartDate" Columns="20" MaxLength="20" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="StartDateCalendarExtender" TargetControlID="StartDate" CssClass="MyCalendar" Format="d MMM yyyy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="StartDateTextBoxMaxLengthValidator" ControlToValidate="StartDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ตั้งแต่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</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="EndDate" Columns="20" MaxLength="20" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="EndDateCalendarExtender" TargetControlID="EndDate" CssClass="MyCalendar" Format="d MMM yyyy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ถึง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Course" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseTextBoxMaxLengthValidator" ControlToValidate="Course" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;หลักสูตร&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseAbbr" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseAbbrTextBoxMaxLengthValidator" ControlToValidate="CourseAbbr" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คุณวุฒิ(สาขา)&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Institue" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="InstitueTextBoxMaxLengthValidator" ControlToValidate="Institue" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สถาบันการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Facultry" Columns="50" MaxLength="60" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FacultryTextBoxMaxLengthValidator" ControlToValidate="Facultry" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สาขาวิชา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="EducationType1" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="LevelId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="LevelIdFvLlsHyperLink" ControlToUpdate="LevelId" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Education" Field="Education_.EducationId" DisplayField="Education_.Level"></Selectors:FvLlsHyperLink></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="EdYear" Columns="4" MaxLength="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EdYearTextBoxMaxLengthValidator" ControlToValidate="EdYear" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ปีที่จบการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</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="EducationPeriod" Columns="4" MaxLength="4" cssclass="field_input"></asp:TextBox></td>
<td>
&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EducationPeriodTextBoxMaxLengthValidator" ControlToValidate="EducationPeriod" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ก่อน/หลัง รับราชการ&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</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="EducationType" Columns="4" MaxLength="4" cssclass="field_input"></asp:TextBox></td>
<td>
&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EducationTypeTextBoxMaxLengthValidator" ControlToValidate="EducationType" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;รร.ทหาร/พลเรือน&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="COUNTRY" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="COUNTRYFvLlsHyperLink" ControlToUpdate="COUNTRY" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Country" Field="Country_.CountryId" DisplayField="Country_.Country"></Selectors:FvLlsHyperLink></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseNo" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseNoTextBoxMaxLengthValidator" ControlToValidate="CourseNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;รุ่นที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="ScoreNo" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreNoTextBoxMaxLengthValidator" ControlToValidate="ScoreNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ได้ลำดับที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="NoAll" Columns="3" MaxLength="3" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="NoAllTextBoxMaxLengthValidator" ControlToValidate="NoAll" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;จากทั้งหมด&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Score" Columns="5" MaxLength="5" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreTextBoxMaxLengthValidator" ControlToValidate="Score" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ระดับคะแนน&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Command" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คำสั้ง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</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="CommandDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="CommandDateCalendarExtender" TargetControlID="CommandDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ลงวันที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td></tr></Persons:PersonalEducationTableControlRow>
</ITEMTEMPLATE>
</asp:Repeater>
</table>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalEducationTableControl>
</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>

View file

@ -0,0 +1,499 @@

' This file implements the code-behind class for EditPersonalEducationTable.aspx.
' App_Code\EditPersonalEducationTable.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 EditPersonalEducationTable
Inherits BaseApplicationPage
' Code-behind class for the EditPersonalEducationTable 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_PersonalEducationSearch(ByVal prefixText As String, ByVal count As Integer) As String()
' GetPersonalEducationSearchCompletionList 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_PersonalEducationSearch()
' or replace the call to GetAutoCompletionList_PersonalEducationSearch().
Return GetAutoCompletionList_PersonalEducationSearch_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") + " Personal Education"
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.PersonalEducationTableControl.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_PersonalEducationSearch_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.EditPersonalEducationTable.PersonalEducationTableControl
control = new Persons.UI.Controls.EditPersonalEducationTable.PersonalEducationTableControl()
Return control.GetAutoCompletionList_PersonalEducationSearch(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.PersonalEducationTableControl.LoadData()
Me.PersonalEducationTableControl.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 = "PersonalEducationMenuItem"
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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,152 @@
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonalEducationTable2.aspx.vb" Culture="th-TH" MasterPageFile="..\Master Pages\HorPersonalmenu.master" Inherits="Persons.UI.EditPersonalEducationTable2" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonalEducationTable2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.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>
<Persons:PersonalEducationTableControl runat="server" id="PersonalEducationTableControl"> <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="PersonalEducationTableControlPanelExtender" runat="server" TargetControlid="PersonalEducationTableControlCollapsibleRegion" ExpandControlID="PersonalEducationTableControlIcon" CollapseControlID="PersonalEducationTableControlIcon" ImageControlID="PersonalEducationTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="PersonalEducationTableControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="PersonalEducationTitle" Text="&lt;%#String.Concat(&quot;Personal Education&quot;) %>"> </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="PersonalEducationTableControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><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="PersonalEducationAddButton" causesvalidation="false" commandname="AddRecord" imageurl="../Images/ButtonBarNew.gif" onmouseout="this.src='../Images/ButtonBarNew.gif'" onmouseover="this.src='../Images/ButtonBarNewOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Add&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationEditButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/ButtonBarEdit.gif" onmouseout="this.src='../Images/ButtonBarEdit.gif'" onmouseover="this.src='../Images/ButtonBarEditOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Edit&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationDeleteButton" causesvalidation="false" commandargument="DeleteOnUpdate" commandname="DeleteRecord" imageurl="../Images/ButtonBarDelete.gif" onmouseout="this.src='../Images/ButtonBarDelete.gif'" onmouseover="this.src='../Images/ButtonBarDeleteOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Delete&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationSaveButton" causesvalidation="true" commandname="UpdateData" imageurl="../Images/ButtonBarSave.gif" onmouseout="this.src='../Images/ButtonBarSave.gif'" onmouseover="this.src='../Images/ButtonBarSaveOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Save&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationRefreshButton" causesvalidation="false" commandname="ResetData" imageurl="../Images/ButtonBarRefresh.gif" onmouseout="this.src='../Images/ButtonBarRefresh.gif'" onmouseover="this.src='../Images/ButtonBarRefreshOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Refresh&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationResetButton" causesvalidation="false" commandname="ResetFilters" imageurl="../Images/ButtonBarReset.gif" onmouseout="this.src='../Images/ButtonBarReset.gif'" onmouseover="this.src='../Images/ButtonBarResetOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Reset&quot;, &quot;Persons&quot;) %>">
</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="PersonalEducationPagination"></Persons:Pagination></td><td><img src="../Images/paginationRowEdgeR.gif" alt="" /></td><td width="100%">&nbsp;</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="PersonalEducationToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="StartDateLabel" Text="ตั้งแต่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EndDateLabel" Text="ถึง" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseLabel" Text="หลักสูตร" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="InstitueLabel" Text="สถาบันการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="FacultryLabel" Text="สาขาวิชา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EducationTypeLabel" Text="รร.ทหาร/พลเรือน" CausesValidation="False"> </asp:LinkButton></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="LevelIdLabel1" Text="ระดับการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ(สาขา)" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EducationPeriodLabel" Text="ก่อน/หลัง รับราชการ" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="COUNTRYLabel" Text="ประเทศ" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EdYearLabel" Text="ปีที่จบการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseNoLabel" Text="รุ่นที่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ScoreNoLabel" Text="ได้ลำดับที่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="NoAllLabel" Text="จากทั้งหมด" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ScoreLabel" Text="ระดับคะแนน" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CommandLabel" Text="คำสั้ง" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CommandDateLabel" Text="ลงวันที่" CausesValidation="False"> </asp:LinkButton>
</th></tr><asp:Repeater runat="server" id="PersonalEducationTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalEducationTableControlRow runat="server" id="PersonalEducationTableControlRow">
<tr><td class="ticnb" scope="row"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="PersonalId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)" visible="False"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="PersonalIdFvLlsHyperLink" ControlToUpdate="PersonalId" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Visible="False" Table="PersonalId" Field="PersonalId_.PersonalId" DisplayField="PersonalId_.PersonalName"></Selectors:FvLlsHyperLink>&nbsp;
<asp:RequiredFieldValidator runat="server" id="PersonalIdRequiredFieldValidator" ControlToValidate="PersonalId" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueIsRequired&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ชื่อ นามสกุล&quot;) %>" enabled="True" initialvalue="--PLEASE_SELECT--" text="*"></asp:RequiredFieldValidator></span>
</td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowEditButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_edit.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:EditRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowDeleteButton" causesvalidation="False" commandargument="DeleteOnUpdate" commandname="DeleteRecord" cssclass="button_link" imageurl="../Images/icon_delete.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:DeleteRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticwb"><asp:CheckBox runat="server" id="PersonalEducationRecordRowSelection" 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="StartDate" MaxLength="20" columns="11" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="StartDateCalendarExtender" TargetControlID="StartDate" CssClass="MyCalendar" Format="d MMM yyyy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="StartDateTextBoxMaxLengthValidator" ControlToValidate="StartDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ตั้งแต่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</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="EndDate" MaxLength="20" columns="11" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="EndDateCalendarExtender" TargetControlID="EndDate" CssClass="MyCalendar" Format="d MMM yyyy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ถึง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Course" MaxLength="60" columns="30" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseTextBoxMaxLengthValidator" ControlToValidate="Course" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;หลักสูตร&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Institue" MaxLength="60" columns="20" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="InstitueTextBoxMaxLengthValidator" ControlToValidate="Institue" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สถาบันการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Facultry" MaxLength="60" columns="20" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FacultryTextBoxMaxLengthValidator" ControlToValidate="Facultry" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;สาขาวิชา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="EducationType" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="LevelId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="LevelIdFvLlsHyperLink" ControlToUpdate="LevelId" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Education" Field="Education_.EducationId" DisplayField="Education_.Level"></Selectors:FvLlsHyperLink></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseAbbr" MaxLength="50" columns="20" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseAbbrTextBoxMaxLengthValidator" ControlToValidate="CourseAbbr" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คุณวุฒิ(สาขา)&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="EducationPeriod" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="EducationPeriodFvLlsHyperLink" ControlToUpdate="EducationPeriod" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="EducationPeriod" Field="EducationPeriod_.PeriodId" DisplayField="EducationPeriod_.Period"></Selectors:FvLlsHyperLink></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:DropDownList runat="server" id="COUNTRY" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
<Selectors:FvLlsHyperLink runat="server" id="COUNTRYFvLlsHyperLink" ControlToUpdate="COUNTRY" Text="&lt;%# GetResourceValue(&quot;LLS:Text&quot;, &quot;Persons&quot;) %>" MinListItems="100" Table="Country" Field="Country_.CountryId" DisplayField="Country_.Country"></Selectors:FvLlsHyperLink></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="EdYear" MaxLength="4" columns="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EdYearTextBoxMaxLengthValidator" ControlToValidate="EdYear" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ปีที่จบการศึกษา&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="CourseNo" MaxLength="3" columns="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CourseNoTextBoxMaxLengthValidator" ControlToValidate="CourseNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;รุ่นที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="ScoreNo" MaxLength="3" columns="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreNoTextBoxMaxLengthValidator" ControlToValidate="ScoreNo" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ได้ลำดับที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="NoAll" MaxLength="3" columns="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="NoAllTextBoxMaxLengthValidator" ControlToValidate="NoAll" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;จากทั้งหมด&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Score" MaxLength="5" columns="4" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ScoreTextBoxMaxLengthValidator" ControlToValidate="Score" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ระดับคะแนน&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
<asp:TextBox runat="server" id="Command" MaxLength="50" columns="20" cssclass="field_input"></asp:TextBox>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;คำสั้ง&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></span>
</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="CommandDate" MaxLength="20" columns="11" cssclass="field_input"></asp:TextBox></td>
<td>
<Selectors:CalendarExtendarClass runat="server" ID="CommandDateCalendarExtender" TargetControlID="CommandDate" CssClass="MyCalendar" Format="d MMM yy">
</Selectors:CalendarExtendarClass>&nbsp;
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="&lt;%# GetResourceValue(&quot;Val:ValueTooLong&quot;, &quot;Persons&quot;).Replace(&quot;{FieldName}&quot;, &quot;ลงวันที่&quot;) %>"></BaseClasses:TextBoxMaxLengthValidator></td>
</tr>
</table>
</span>
</td></tr></Persons:PersonalEducationTableControlRow>
</ITEMTEMPLATE>
</asp:Repeater>
</table>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalEducationTableControl>
</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>

View file

@ -0,0 +1,488 @@

' This file implements the code-behind class for EditPersonalEducationTable2.aspx.
' App_Code\EditPersonalEducationTable2.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 EditPersonalEducationTable2
Inherits BaseApplicationPage
' Code-behind class for the EditPersonalEducationTable2 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_PersonalEducationSearch(ByVal prefixText As String, ByVal count As Integer) As String()
' ' GetPersonalEducationSearchCompletionList 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_PersonalEducationSearch()
' ' or replace the call to GetAutoCompletionList_PersonalEducationSearch().
' Return GetAutoCompletionList_PersonalEducationSearch_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") + " Personal Education"
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.PersonalEducationTableControl.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.PersonalEducationTableControl.LoadData()
Me.PersonalEducationTableControl.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 = "การศ_กษาMenuItem"
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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,27 @@
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="MyPage.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.MyPage" %>
<%@ 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></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>

View file

@ -0,0 +1,464 @@

' This file implements the code-behind class for MyPage.aspx.
' App_Code\MyPage.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 MyPage
Inherits BaseApplicationPage
' Code-behind class for the MyPage 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("")
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 = "Blank page"
End Sub
Public Shared Function GetRecordFieldValue_Base(ByVal tableName As String, _
ByVal recordID As String, _
ByVal columnName As String, _
ByVal fieldName As String, _
ByVal title As String, _
ByVal persist As Boolean, _
ByVal popupWindowHeight As Integer, _
ByVal popupWindowWidth As Integer, _
ByVal popupWindowScrollBar As Boolean _
) As Object()
If Not IsNothing(recordID) Then
recordID = System.Web.HttpUtility.UrlDecode(recordID)
End If
Dim content as String = BaseClasses.Utils.MiscUtils.GetFieldData(tableName, recordID, columnName)
content = NetUtils.EncodeStringForHtmlDisplay(content)
'returnValue is an array of string values.
'returnValue(0) represents title of the pop up window
'returnValue(1) represents content of the pop up window
' retrunValue(2) represents whether pop up window should be made persistant
' or it should closes as soon as mouse moved out.
' returnValue(5) represents whether pop up window should contain scroll bar.
' returnValue(3), (4) represents pop up window height and width respectivly
' (0),(2),(3),(4) and (5) is initially set as pass through attribute.
' They can be modified by going to Attribute tab of the properties window of the control in aspx page.
Dim returnValue(6) As Object
returnValue(0) = title
returnValue(1) = content
returnValue(2) = persist
returnValue(3) = popupWindowWidth
returnValue(4) = popupWindowHeight
returnValue(5) = popupWindowScrollBar
Return returnValue
End Function
Public Shared Function GetImage_Base(ByVal tableName As String, _
ByVal recordID As String, _
ByVal columnName As String, _
ByVal title As String, _
ByVal persist As Boolean, _
ByVal popupWindowHeight As Integer, _
ByVal popupWindowWidth As Integer, _
ByVal popupWindowScrollBar As Boolean _
) As Object()
Dim content As String = "<IMG alt =""" & title & """ src =" & """../Shared/ExportFieldValue.aspx?Table=" & tableName & "&Field=" & columnName & "&Record=" & recordID & """/>"
'returnValue is an array of string values.
'returnValue(0) represents title of the pop up window.
'returnValue(1) represents content ie, image url.
' retrunValue(2) represents whether pop up window should be made persistant
' or it should closes as soon as mouse moved out.
' returnValue(3), (4) represents pop up window height and width respectivly
' returnValue(5) represents whether pop up window should contain scroll bar.
' (0),(2),(3),(4) and (5) is initially set as pass through attribute.
' They can be modified by going to Attribute tab of the properties window of the control in aspx page.
Dim returnValue(6) As Object
returnValue(0) = title
returnValue(1) = content
returnValue(2) = persist
returnValue(3) = popupWindowWidth
returnValue(4) = popupWindowHeight
returnValue(5) = popupWindowScrollBar
Return returnValue
End Function
Public Sub SetChartControl_Base(ByVal chartCtrlName As String)
' Load data for each record and table UI control.
End Sub
Public Sub SaveData_Base()
End Sub
Protected Sub SaveControlsToSession_Base()
MyBase.SaveControlsToSession()
End Sub
Protected Sub ClearControlsFromSession_Base()
MyBase.ClearControlsFromSession()
End Sub
Protected Sub LoadViewState_Base(ByVal savedState As Object)
MyBase.LoadViewState(savedState)
End Sub
Protected Function SaveViewState_Base() As Object
Return MyBase.SaveViewState()
End Function
Public Sub PreInit_Base()
'If it is SharePoint application this function performs dynamic Master Page assignment.
End Sub
Public Sub Page_PreRender_Base(ByVal sender As Object, ByVal e As System.EventArgs)
' Load data for each record and table UI control.
' Data bind for each chart UI control.
End Sub
' Load data from database into UI controls.
' Modify LoadData in Section 1 above to customize. Or override DataBind() in
' the individual table and record controls to customize.
Public Sub LoadData_Base()
Try
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
' Must start a transaction before performing database operations
DbUtils.StartTransaction()
End If
Me.DataBind()
' Load and bind data for each record and table UI control.
' Load data for chart.
' initialize aspx controls
Catch ex As Exception
' An error has occured so display an error message.
Utils.RegisterJScriptAlert(Me, "Page_Load_Error_Message", ex.Message)
Finally
If (Not Me.IsPostBack OrElse Me.Request("__EVENTTARGET") = "ChildWindowPostBack") Then
' End database transaction
DbUtils.EndTransaction()
End If
End Try
End Sub
Public EvaluateFormulaDelegate As BaseClasses.Data.DataSource.EvaluateFormulaDelegate = New BaseClasses.Data.DataSource.EvaluateFormulaDelegate(AddressOf Me.EvaluateFormula)
Public Overridable Function EvaluateFormula_Base(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object), ByVal includeDS As Boolean) As String
Dim e As FormulaEvaluator = New FormulaEvaluator()
' add variables for formula evaluation
If variables IsNot Nothing Then
Dim enumerator As System.Collections.Generic.IEnumerator(Of System.Collections.Generic.KeyValuePair(Of String, Object)) = variables.GetEnumerator()
While enumerator.MoveNext()
e.Variables.Add(enumerator.Current.Key, enumerator.Current.Value)
End While
End If
If includeDS
End If
e.CallingControl = Me
e.DataSource = dataSourceForEvaluate
Dim resultObj As Object = e.Evaluate(formula)
If resultObj Is Nothing Then
Return ""
End If
If Not String.IsNullOrEmpty(format) AndAlso (String.IsNullOrEmpty(formula) OrElse formula.IndexOf("Format(") < 0) Then
Return FormulaUtils.Format(resultObj, format)
Else
Return resultObj.ToString()
End If
End Function
Public Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord, ByVal format As String, ByVal variables As System.Collections.Generic.IDictionary(Of String, Object)) As String
Return EvaluateFormula(formula, dataSourceForEvaluate, format, variables, True)
End Function
Private Function EvaluateFormula(ByVal formula As String, ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord) As String
Return EvaluateFormula(formula, dataSourceForEvaluate, Nothing, Nothing, True)
End Function
Public Function EvaluateFormula(ByVal formula As String, ByVal includeDS As Boolean) As String
Return EvaluateFormula(formula, Nothing, Nothing, Nothing, includeDS)
End Function
Public Function EvaluateFormula(ByVal formula As String) As String
Return EvaluateFormula(formula, Nothing, Nothing, Nothing, True)
End Function
' Write out the Set methods
' Write out the DataSource properties and methods
' Write out event methods for the page events
#End Region
End Class
End Namespace

View file

@ -0,0 +1,74 @@
<?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>MyPage</Name>
<Type>Page</Type>
<SubType>DotNet</SubType>
<MasterLayout>~/Master Pages/HorizontalMenu.master</MasterLayout>
<GenerateDirectory>PersonalEducation</GenerateDirectory>
<Layout>PersonalEducation\MyPage.xml</Layout>
<DisplayName>MyPage</DisplayName>
<Description>This is a blank page.</Description>
<CheckSum>-1849504118-1159</CheckSum>
</Self>
<ComposedOf>
<ContainedComponent>
<Name>PageTitle</Name>
<Type>Literal</Type>
<PassthroughAttributes>
<Attribute>
<Name>Text</Name>
<Value>Blank page</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
<ContainedComponent>
<Name>UpdatePanel1</Name>
<Type>UpdatePanel</Type>
<PassthroughAttributes>
<Attribute>
<Name>SmoothPanelUpdate</Name>
<Value>True</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
</ComposedOf>
<LayoutDefinition>&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;LayoutDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;Layout Name="Page" Type="RootLayout"&gt;
&lt;Prolog&gt;
&lt;Value&gt;&amp;lt;asp:Content id="PageSection" ContentPlaceHolderID="PageContent" Runat="server"&amp;gt;
&amp;lt;a id="StartOfPageContent"&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;GEN:UPDATEPANEL NAME="UpdatePanel1"&amp;gt;
&lt;/Value&gt;
&lt;/Prolog&gt;
&lt;Row&gt;
&lt;Cell /&gt;
&lt;/Row&gt;
&lt;Epilog&gt;
&lt;Value&gt;
&amp;lt;/GEN:UPDATEPANEL&amp;gt;
&amp;lt;div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"&amp;gt;&amp;lt;/asp:ValidationSummary&amp;gt;
&amp;lt;/asp:Content&amp;gt;
&lt;/Value&gt;
&lt;/Epilog&gt;
&lt;TableAttributes&gt;
&lt;Attribute&gt;
&lt;Name&gt;cellpadding&lt;/Name&gt;
&lt;AttributeValue&gt;0&lt;/AttributeValue&gt;
&lt;/Attribute&gt;
&lt;Attribute&gt;
&lt;Name&gt;cellspacing&lt;/Name&gt;
&lt;AttributeValue&gt;0&lt;/AttributeValue&gt;
&lt;/Attribute&gt;
&lt;Attribute&gt;
&lt;Name&gt;border&lt;/Name&gt;
&lt;AttributeValue&gt;0&lt;/AttributeValue&gt;
&lt;/Attribute&gt;
&lt;/TableAttributes&gt;
&lt;/Layout&gt;
&lt;/LayoutDefinition&gt;</LayoutDefinition>
</ComponentDefinition>

View file

@ -0,0 +1,60 @@
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="ShowPersonalEducation.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.ShowPersonalEducation" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.ShowPersonalEducation" %>
<%@ 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:PersonalEducationRecordControl runat="server" id="PersonalEducationRecordControl"> <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="PersonalEducationRecordControlPanelExtender" runat="server" TargetControlid="PersonalEducationRecordControlCollapsibleRegion" ExpandControlID="PersonalEducationRecordControlIcon" CollapseControlID="PersonalEducationRecordControlIcon" ImageControlID="PersonalEducationRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="PersonalEducationRecordControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="PersonalEducationTitle" Text="&lt;%#String.Concat(&quot;Personal Education&quot;) %>"> </asp:Literal></td><td class="dhir"><asp:ImageButton runat="server" id="PersonalEducationDialogEditButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/iconEdit.gif" tooltip="&lt;%# GetResourceValue(&quot;Btn:Edit&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td></tr></table>
</td><td class="dher"><img src="../Images/space.gif" alt="" /></td></tr></table>
</td></tr><tr><td><asp:panel id="PersonalEducationRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="PersonalEducationRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="PersonalIdLabel" Text="ชื่อ นามสกุล"> </asp:Literal></td><td class="dfv"><asp:LinkButton runat="server" id="PersonalId" causesvalidation="False" commandname="Redirect"></asp:LinkButton> </td><td class="fls"><asp:Literal runat="server" id="StartDateLabel" Text="ตั้งแต่"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="StartDate"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="EndDateLabel" Text="ถึง"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="EndDate"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="CourseLabel" Text="หลักสูตร"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="Course"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ(สาขา)"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="CourseAbbr"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="InstitueLabel" Text="สถาบันการศึกษา"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="Institue"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="FacultryLabel" Text="สาขาวิชา"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="Facultry"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="LevelIdLabel" Text="ระดับการศึกษา"> </asp:Literal></td><td class="dfv"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="LevelId"></asp:Literal></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="EdYearLabel" Text="ปีที่จบการศึกษา"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="EdYear"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="EducationPeriodLabel" Text="ก่อน/หลัง รับราชการ"> </asp:Literal></td><td class="dfv"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="EducationPeriod"></asp:Literal></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="EducationTypeLabel" Text="รร.ทหาร/พลเรือน"> </asp:Literal></td><td class="dfv"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="EducationType"></asp:Literal></span>
</td><td class="fls"><asp:Literal runat="server" id="COUNTRYLabel" Text="ประเทศ"> </asp:Literal></td><td class="dfv"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="COUNTRY"></asp:Literal></span>
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CourseNoLabel" Text="รุ่นที่"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="CourseNo"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="ScoreNoLabel" Text="ได้ลำดับที่"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="ScoreNo"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="NoAllLabel" Text="จากทั้งหมด"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="NoAll"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="ScoreLabel" Text="ระดับคะแนน"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="Score"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="CommandLabel" Text="คำสั้ง"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="Command"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="CommandDateLabel" Text="ลงวันที่"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="CommandDate"></asp:Literal> </td></tr></table></asp:panel>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalEducationRecordControl>
<%= 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="OKButton" button-causesvalidation="false" button-commandname="Redirect" button-text="&lt;%# GetResourceValue(&quot;Btn:OK&quot;, &quot;Persons&quot;) %>"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="EditButton" button-causesvalidation="false" button-commandname="Redirect" button-text="&lt;%# GetResourceValue(&quot;Btn:Edit&quot;, &quot;Persons&quot;) %>"></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>

View file

@ -0,0 +1,583 @@

' This file implements the code-behind class for ShowPersonalEducation.aspx.
' App_Code\ShowPersonalEducation.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 ShowPersonalEducation
Inherits BaseApplicationPage
' Code-behind class for the ShowPersonalEducation 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 EditButton_Click(ByVal sender As Object, ByVal args As EventArgs)
' Click handler for EditButton.
' Customize by adding code before the call or replace the call to the Base function with your own code.
EditButton_Click_Base(sender, args)
' NOTE: If the Base function redirects to another page, any code here will not be executed.
End Sub
Public Sub OKButton_Click(ByVal sender As Object, ByVal args As EventArgs)
' Click handler for OKButton.
' Customize by adding code before the call or replace the call to the Base function with your own code.
OKButton_Click_Base(sender, args)
' NOTE: If the Base function redirects to another page, any code here will not be executed.
End Sub
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.EditButton.Button.Click, AddressOf EditButton_Click
AddHandler Me.OKButton.Button.Click, AddressOf OKButton_Click
Me.ClearControlsFromSession()
End Sub
Private Sub Base_RegisterPostback()
End Sub
' Handles MyBase.Load. Read database data and put into the UI controls.
' If you need to, you can add additional Load handlers in Section 1.
Protected Overridable Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.SetPageFocus()
' 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 = "Personal Education"
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.PersonalEducationRecordControl.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.PersonalEducationRecordControl.LoadData()
Me.PersonalEducationRecordControl.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 = "PersonalEducationMenuItem"
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 EditButton_Click_Base(ByVal sender As Object, ByVal args As EventArgs)
' The redirect URL is set on the Properties, Custom Properties or Actions.
' The ModifyRedirectURL call resolves the parameters before the
' Response.Redirect redirects the page to the URL.
' Any code after the Response.Redirect call will not be executed, since the page is
' redirected to the URL.
Dim url As String = "../PersonalEducation/EditPersonalEducation.aspx?PersonalEducation={PK}"
Dim shouldRedirect As Boolean = True
Dim TargetKey As String = Nothing
Dim DFKA As String = TargetKey
Dim id As String = DFKA
Dim value As String = id
Try
' Enclose all database retrieval/update code within a Transaction boundary
DbUtils.StartTransaction
url = Me.ModifyRedirectUrl(url, "",False)
Catch ex As Exception
' Upon error, rollback the transaction
Me.RollBackTransaction(sender)
shouldRedirect = False
Me.ErrorOnPage = True
' Report the error message to the end user
Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", ex.Message)
Finally
DbUtils.EndTransaction
End Try
If shouldRedirect Then
Me.ShouldSaveControlsToSession = True
Me.Response.Redirect(url)
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 OKButton_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
#End Region
End Class
End Namespace

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,657 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
This file contains the button specific settings for the PDF report.
Any settings not defined here will be inherited from the language specific
report file. Any settings not defined in the language specific report file
are inherited from the report defaults file located in the Reports folder.
So the order is as follows:
1. PDF.ButtonSpecific.report (this file)
2. PDF.en-US.report (language & culture)
3. PDF.en.report (language only)
4. PDF.report (default settings)
If you change file #4 (PDF.report), changes will be applied to ALL reports,
unless overridden by the language, culture or button specific files. If you
change the button specific file, the changes only apply to the button.
Note that the language & culture settings are derived from the browser. So
if you have a multi-lingual application, the en-US (English, US) user will get
the report on a 8.5 by 11 inch paper while the en-UK (English, UK) or gr (German)
user will get it on an A4 page.
Many of the settings in this file are commented out because they are defined in
the PDF.report file. They can be uncommented out and modified to change the
settings for the PDF report generated by this button.
Refer to the online help at http://www.ironspeed.com/help to see a detailed
description of the settings in this file.
-->
<!--
Top Margin for page header is the distance between the top of the page and the beginning of the header.
Bottom Margin is from the bottom of the page footer to the end of the page.
BorderWidth and FontSize must be specified by a decimal number followed by 'pt' or 'cm' (centimeters).
Color must be specifed ay a 6 digits hex number. 000000 is black, FFFFFF is white.
-->
<Report>
<!-- Page size specification. Specify a decimal number followed by 'in', 'mm', or 'cm' -->
<!--
<PageWidth>CulturalDefault</PageWidth>
<PageHeight>CulturalDefault</PageHeight>
-->
<!--If mirroring is true, the first column will be displayed on the right side, the last column will be displayed on the left side
right alignment will become left alignment, and left alignment will become right alignment.-->
<!--
<Mirroring>CulturalDefault</Mirroring>
-->
<!-- Page margin specification. Specify a decimal number followed by 'in', 'mm', or 'cm' -->
<!--
<TopMargin>0.5in</TopMargin>
<BottomMargin>0.5in</BottomMargin>
<LeftMargin>0.5in</LeftMargin>
<RightMargin>0.5in</RightMargin>
-->
<!-- Page header specification -->
<PageHeader>
<!--
<Top>0.2in</Top>
-->
<!-- Left column of the page header -->
<!--
<LeftHeader>
<Value></Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Left</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</LeftHeader>
-->
<!-- Center column of the page header -->
<!--
<CenterHeader>
<Value>${ReportTitle}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>222222</Color>
<Size>10pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Center</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</CenterHeader>
-->
<!-- Right column of the page header -->
<!--
<RightHeader>
<Value></Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Right</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</RightHeader>
-->
</PageHeader>
<!-- Page Footer specification -->
<PageFooter>
<!--
<Bottom>0.3in</Bottom>
-->
<!-- Left column of the page footer -->
<!--
<LeftFooter>
<Value>${Date:d}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Bottom</VerticalAlign>
<HorizontalAlign>Left</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</LeftFooter>
-->
<!-- Center column of the page footer -->
<!--
<CenterFooter>
<Value></Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Bottom</VerticalAlign>
<HorizontalAlign>Center</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</CenterFooter>
-->
<!-- Right column of the page footer -->
<!--
<RightFooter>
<Value>${PageNum}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Bottom</VerticalAlign>
<HorizontalAlign>Right</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</RightFooter>
-->
</PageFooter>
<!-- Table (grid) specification -->
<Table>
<!--
<Columns>
<Column>
<Width>100</Width>
<Header>
<Value>Company Name</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.CompanyName}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
<Column>
<Width>100</Width>
<Header>
<Value>Contact Name</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.ContactName}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
<Column>
<Width>100</Width>
<Header>
<Value>Contact Title</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.ContactTitle}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
<Column>
<Width>100</Width>
<Header>
<Value>Phone</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.Phone}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
</Columns>
-->
</Table>
</Report>

View file

@ -0,0 +1,657 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
This file contains the button specific settings for the Word report.
Any settings not defined here will be inherited from the language specific
report file. Any settings not defined in the language specific report file
are inherited from the report defaults file located in the Reports folder.
So the order is as follows:
1. WordReport.ButtonSpecific.word (this file)
2. WordReport.en-US.word (language & culture)
3. WordReport.en.word (language only)
4. WordReport.word (default settings)
If you change file #4 (WordReport.word), changes will be applied to ALL reports,
unless overridden by the language, culture or button specific files. If you
change the button specific file, the changes only apply to the button.
Note that the language & culture settings are derived from the browser. So
if you have a multi-lingual application, the en-US (English, US) user will get
the report on a 8.5 by 11 inch paper while the en-UK (English, UK) or gr (German)
user will get it on an A4 page.
Many of the settings in this file are commented out because they are defined in
the WordReport.word file. They can be uncommented out and modified to change the
settings for the Word report generated by this button.
Refer to the online help at http://www.ironspeed.com/help to see a detailed
description of the settings in this file.
-->
<!--
Top Margin for page header is the distance between the top of the page and the beginning of the header.
Bottom Margin is from the bottom of the page footer to the end of the page.
BorderWidth and FontSize must be specified by a decimal number followed by 'pt' or 'cm' (centimeters).
Color must be specifed ay a 6 digits hex number. 000000 is black, FFFFFF is white.
-->
<Report>
<!-- Page size specification. Specify a decimal number followed by 'in', 'mm', or 'cm' -->
<!--
<PageWidth>CulturalDefault</PageWidth>
<PageHeight>CulturalDefault</PageHeight>
-->
<!--If mirroring is true, the first column will be displayed on the right side, the last column will be displayed on the left side
right alignment will become left alignment, and left alignment will become right alignment.-->
<!--
<Mirroring>CulturalDefault</Mirroring>
-->
<!-- Page margin specification. Specify a decimal number followed by 'in', 'mm', or 'cm' -->
<!--
<TopMargin>0.5in</TopMargin>
<BottomMargin>0.5in</BottomMargin>
<LeftMargin>0.5in</LeftMargin>
<RightMargin>0.5in</RightMargin>
-->
<!-- Page header specification -->
<PageHeader>
<!--
<Top>0.2in</Top>
-->
<!-- Left column of the page header -->
<!--
<LeftHeader>
<Value></Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Left</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</LeftHeader>
-->
<!-- Center column of the page header -->
<!--
<CenterHeader>
<Value>${ReportTitle}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>222222</Color>
<Size>10pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Center</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</CenterHeader>
-->
<!-- Right column of the page header -->
<!--
<RightHeader>
<Value></Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Right</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</RightHeader>
-->
</PageHeader>
<!-- Page Footer specification -->
<PageFooter>
<!--
<Bottom>0.3in</Bottom>
-->
<!-- Left column of the page footer -->
<!--
<LeftFooter>
<Value>${Date:d}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Bottom</VerticalAlign>
<HorizontalAlign>Left</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</LeftFooter>
-->
<!-- Center column of the page footer -->
<!--
<CenterFooter>
<Value></Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Bottom</VerticalAlign>
<HorizontalAlign>Center</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</CenterFooter>
-->
<!-- Right column of the page footer -->
<!--
<RightFooter>
<Value>${PageNum}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>0pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>000000</Bottom>
</BorderColor>
<Font>
<Color>444444</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Bottom</VerticalAlign>
<HorizontalAlign>Right</HorizontalAlign>
<Padding>
<Left>2pt</Left>
<Right>2pt</Right>
<Top>2pt</Top>
<Bottom>2pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
</RightFooter>
-->
</PageFooter>
<!-- Table (grid) specification -->
<Table>
<!--
<Columns>
<Column>
<Width>100</Width>
<Header>
<Value>Company Name</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.CompanyName}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
<Column>
<Width>100</Width>
<Header>
<Value>Contact Name</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.ContactName}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
<Column>
<Width>100</Width>
<Header>
<Value>Contact Title</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.ContactTitle}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
<Column>
<Width>100</Width>
<Header>
<Value>Phone</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>2pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>dcbb4a</Bottom>
</BorderColor>
<Font>
<Color>333333</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>True</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Center</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>dcbb4a</BackgroundColor>
</Style>
</Header>
<Detail>
<Value>${Customers.Phone}</Value>
<Style>
<BorderWidth>
<Left>0pt</Left>
<Right>0pt</Right>
<Top>0pt</Top>
<Bottom>1pt</Bottom>
</BorderWidth>
<BorderColor>
<Left>000000</Left>
<Right>000000</Right>
<Top>000000</Top>
<Bottom>cccccc</Bottom>
</BorderColor>
<Font>
<Color>666666</Color>
<Size>7pt</Size>
<FileName>Arial.ttf</FileName>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<RightToLeft>CulturalDefault</RightToLeft>
<Encoding>CulturalDefault</Encoding>
</Font>
<VerticalAlign>Top</VerticalAlign>
<HorizontalAlign>Default</HorizontalAlign>
<Padding>
<Left>5pt</Left>
<Right>5pt</Right>
<Top>5pt</Top>
<Bottom>5pt</Bottom>
</Padding>
<BackgroundColor>ffffff</BackgroundColor>
</Style>
<AltStyle>
<FontColor>666666</FontColor>
<BackgroundColor>d9e3eb</BackgroundColor>
</AltStyle>
</Detail>
</Column>
</Columns>
-->
</Table>
</Report>

View file

@ -0,0 +1,95 @@
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="ShowPersonalEducationTable.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.ShowPersonalEducationTable" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.ShowPersonalEducationTable" %>
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
<%@ 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>
<Persons:PersonalEducationTableControl runat="server" id="PersonalEducationTableControl"> <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="PersonalEducationTableControlPanelExtender" runat="server" TargetControlid="PersonalEducationTableControlCollapsibleRegion" ExpandControlID="PersonalEducationTableControlIcon" CollapseControlID="PersonalEducationTableControlIcon" ImageControlID="PersonalEducationTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="PersonalEducationTableControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="PersonalEducationTitle" Text="&lt;%#String.Concat(&quot;Personal Education&quot;) %>"> </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="PersonalEducationTableControlCollapsibleRegion" 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("PersonalEducationSearchButton"))%>
<asp:TextBox runat="server" id="PersonalEducationSearch" columns="50" cssclass="Search_Input"> </asp:TextBox>
<asp:AutoCompleteExtender id="PersonalEducationSearchAutoCompleteExtender" runat="server" TargetControlID="PersonalEducationSearch" ServiceMethod="GetAutoCompletionList_PersonalEducationSearch" MinimumPrefixLength="2" CompletionInterval="700" CompletionSetCount="10" CompletionListCssClass="autotypeahead_completionListElement" CompletionListItemCssClass="autotypeahead_listItem " CompletionListHighlightedItemCssClass="autotypeahead_highlightedListItem">
</asp:AutoCompleteExtender>
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalEducationSearchButton"))%>
</td><td class="filbc"><Persons:ThemeButton runat="server" id="PersonalEducationSearchButton" button-causesvalidation="False" button-commandname="Search" button-text="&lt;%# GetResourceValue(&quot;Btn:SearchGoButtonText&quot;, &quot;Persons&quot;) %>"></Persons:ThemeButton></td></tr><tr><td class="fila"><asp:Literal runat="server" id="PersonalIdLabel" Text="ชื่อ นามสกุล"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalEducationFilterButton"))%>
<asp:DropDownList runat="server" id="PersonalIdFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalEducationFilterButton"))%>
</td><td class="filbc" rowspan="2"></td></tr><tr><td class="fila"><asp:Literal runat="server" id="LevelIdLabel" Text="ระดับการศึกษา"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalEducationFilterButton"))%>
<asp:DropDownList runat="server" id="LevelIdFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalEducationFilterButton"))%>
</td></tr><tr><td class="fila"><asp:Literal runat="server" id="COUNTRYLabel1" Text="ศึกษานอกประเทศ"> </asp:Literal></td><td><asp:DropDownList runat="server" id="COUNTRYFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList> </td><td class="filbc"></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="PersonalEducationNewButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/ButtonBarNew.gif" onmouseout="this.src='../Images/ButtonBarNew.gif'" onmouseover="this.src='../Images/ButtonBarNewOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Add&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationPDFButton" causesvalidation="false" commandname="ReportData" imageurl="../Images/ButtonBarPDFExport.gif" onmouseout="this.src='../Images/ButtonBarPDFExport.gif'" onmouseover="this.src='../Images/ButtonBarPDFExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:PDF&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationWordButton" causesvalidation="false" commandname="ExportToWord" imageurl="../Images/ButtonBarWordExport.gif" onmouseout="this.src='../Images/ButtonBarWordExport.gif'" onmouseover="this.src='../Images/ButtonBarWordExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Word&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationExportExcelButton" causesvalidation="false" commandname="ExportDataExcel" imageurl="../Images/ButtonBarExcelExport.gif" onmouseout="this.src='../Images/ButtonBarExcelExport.gif'" onmouseover="this.src='../Images/ButtonBarExcelExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:ExportExcel&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationExportCSVButton" causesvalidation="false" commandname="ExportData" imageurl="../Images/ButtonBarCSVExport.gif" onmouseout="this.src='../Images/ButtonBarCSVExport.gif'" onmouseover="this.src='../Images/ButtonBarCSVExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Export&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationRefreshButton" causesvalidation="false" commandname="ResetData" imageurl="../Images/ButtonBarRefresh.gif" onmouseout="this.src='../Images/ButtonBarRefresh.gif'" onmouseover="this.src='../Images/ButtonBarRefreshOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Refresh&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalEducationResetButton" causesvalidation="false" commandname="ResetFilters" imageurl="../Images/ButtonBarReset.gif" onmouseout="this.src='../Images/ButtonBarReset.gif'" onmouseover="this.src='../Images/ButtonBarResetOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Reset&quot;, &quot;Persons&quot;) %>">
</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="PersonalEducationPagination"></Persons:Pagination></td><td><img src="../Images/paginationRowEdgeR.gif" alt="" /></td><td width="100%">&nbsp;</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="4"><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="PersonalEducationToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="PersonalIdLabel1" Text="ชื่อ นามสกุล" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="StartDateLabel" Text="ตั้งแต่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EndDateLabel" Text="ถึง" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseLabel" Text="หลักสูตร" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ(สาขา)" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="InstitueLabel" Text="สถาบันการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="FacultryLabel" Text="สาขาวิชา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="LevelIdLabel1" Text="ระดับการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EdYearLabel" Text="ปีที่จบการศึกษา" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EducationPeriodLabel" Text="ก่อน/หลัง รับราชการ" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="EducationTypeLabel" Text="รร.ทหาร/พลเรือน" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="COUNTRYLabel" Text="ประเทศ" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CourseNoLabel" Text="รุ่นที่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ScoreNoLabel" Text="ได้ลำดับที่" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="NoAllLabel" Text="จากทั้งหมด" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ScoreLabel" Text="ระดับคะแนน" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CommandLabel" Text="คำสั้ง" CausesValidation="False"> </asp:LinkButton>
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="CommandDateLabel" Text="ลงวันที่" CausesValidation="False"> </asp:LinkButton>
</th></tr><asp:Repeater runat="server" id="PersonalEducationTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalEducationTableControlRow runat="server" id="PersonalEducationTableControlRow">
<tr><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowViewButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_view.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:ViewRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowEditButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_edit.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:EditRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowCopyButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_copy.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:CopyRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalEducationRowDeleteButton" causesvalidation="False" commandname="DeleteRecord" cssclass="button_link" imageurl="../Images/icon_delete.gif" tooltip="&lt;%# GetResourceValue(&quot;Txt:DeleteRecord&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="ticwb"><asp:CheckBox runat="server" id="PersonalEducationRecordRowSelection" onclick="moveToThisTableRow(this);"> </asp:CheckBox></td><td class="ttc"><asp:LinkButton runat="server" id="PersonalId" causesvalidation="False" commandname="Redirect"></asp:LinkButton> </td><td class="ttc"><asp:Literal runat="server" id="StartDate"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="EndDate"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Course"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="CourseAbbr"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Institue"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Facultry"></asp:Literal> </td><td class="ttc"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="LevelId"></asp:Literal></span>
</td><td class="ttc"><asp:Literal runat="server" id="EdYear"></asp:Literal> </td><td class="ttc" style="text-align: right;"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="EducationPeriod"></asp:Literal></span>
</td><td class="ttc" style="text-align: right;"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="EducationType"></asp:Literal></span>
</td><td class="ttc"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="COUNTRY"></asp:Literal></span>
</td><td class="ttc"><asp:Literal runat="server" id="CourseNo"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="ScoreNo"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="NoAll"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Score"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Command"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="CommandDate"></asp:Literal> </td></tr></Persons:PersonalEducationTableControlRow>
</ITEMTEMPLATE>
</asp:Repeater>
</table>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalEducationTableControl>
</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>

View file

@ -0,0 +1,499 @@

' This file implements the code-behind class for ShowPersonalEducationTable.aspx.
' App_Code\ShowPersonalEducationTable.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 ShowPersonalEducationTable
Inherits BaseApplicationPage
' Code-behind class for the ShowPersonalEducationTable 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_PersonalEducationSearch(ByVal prefixText As String, ByVal count As Integer) As String()
' GetPersonalEducationSearchCompletionList 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_PersonalEducationSearch()
' or replace the call to GetAutoCompletionList_PersonalEducationSearch().
Return GetAutoCompletionList_PersonalEducationSearch_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("")
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 = "Personal Education"
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.PersonalEducationTableControl.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_PersonalEducationSearch_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.ShowPersonalEducationTable.PersonalEducationTableControl
control = new Persons.UI.Controls.ShowPersonalEducationTable.PersonalEducationTableControl()
Return control.GetAutoCompletionList_PersonalEducationSearch(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.PersonalEducationTableControl.LoadData()
Me.PersonalEducationTableControl.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 = "PersonalEducationMenuItem"
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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,80 @@
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="ShowPersonalEducationTable1.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.ShowPersonalEducationTable1" %>
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.ShowPersonalEducationTable1" %>
<%@ 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:PersonalIdTableControl runat="server" id="PersonalIdTableControl"> <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="PersonalIdTableControlPanelExtender" runat="server" TargetControlid="PersonalIdTableControlCollapsibleRegion" ExpandControlID="PersonalIdTableControlIcon" CollapseControlID="PersonalIdTableControlIcon" ImageControlID="PersonalIdTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="PersonalIdTableControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="PersonalIdTitle" Text="ประวัติการศึกษา"> </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="PersonalIdTableControlCollapsibleRegion" 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("PersonalIdSearchButton1"))%>
<asp:TextBox runat="server" id="PersonalIdSearch1" columns="50" cssclass="Search_Input"> </asp:TextBox>
<asp:AutoCompleteExtender id="PersonalIdSearch1AutoCompleteExtender" runat="server" TargetControlID="PersonalIdSearch1" ServiceMethod="GetAutoCompletionList_PersonalIdSearch1" MinimumPrefixLength="2" CompletionInterval="700" CompletionSetCount="10" CompletionListCssClass="autotypeahead_completionListElement" CompletionListItemCssClass="autotypeahead_listItem " CompletionListHighlightedItemCssClass="autotypeahead_highlightedListItem">
</asp:AutoCompleteExtender>
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalIdSearchButton1"))%>
</td><td class="filbc"><Persons:ThemeButton runat="server" id="PersonalIdSearchButton1" button-causesvalidation="False" button-commandname="Search" button-text="&lt;%# GetResourceValue(&quot;Btn:SearchGoButtonText&quot;, &quot;Persons&quot;) %>"></Persons:ThemeButton></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="pra"><Persons:Pagination runat="server" id="PersonalIdPagination"></Persons:Pagination></td><td><img src="../Images/paginationRowEdgeR.gif" alt="" /></td><td width="100%">&nbsp;</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="thc" scope="col"><asp:Literal runat="server" id="PersonalIdLabel" Text="เลขประจำตัวประชาชน"> </asp:Literal>
</th><th class="thc" scope="col"></th></tr><asp:Repeater runat="server" id="PersonalIdTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalIdTableControlRow runat="server" id="PersonalIdTableControlRow">
<tr><td class="ttc"><asp:Literal runat="server" id="PersonalId"></asp:Literal> </td><td class="ttc"><Persons:PersonalEducationTableControl runat="server" id="PersonalEducationTableControl"> <table class="dv" cellpadding="0" cellspacing="0" border="0"><tr><td><asp:panel id="PersonalEducationTableControlCollapsibleRegion" 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="StartDateLabel" Text="ตั้งแต่"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="EndDateLabel" Text="ถึง"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="CourseLabel" Text="หลักสูตร"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="InstitueLabel" Text="สถาบันการศึกษา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="FacultryLabel" Text="สาขาวิชา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ(สาขา)"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="LevelIdLabel1" Text="ระดับการศึกษา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="EdYearLabel" Text="ปีที่จบการศึกษา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="EducationTypeLabel" Text="รร.ทหาร/พลเรือน"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="COUNTRYLabel" Text="ประเทศ"> </asp:Literal>
</th></tr><asp:Repeater runat="server" id="PersonalEducationTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalEducationTableControlRow runat="server" id="PersonalEducationTableControlRow">
<tr><td class="ttc"><asp:Literal runat="server" id="StartDate"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="EndDate"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Course"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Institue"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Facultry"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="CourseAbbr"></asp:Literal> </td><td class="ttc"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="LevelId"></asp:Literal></span>
</td><td class="ttc"><asp:Literal runat="server" id="EdYear"></asp:Literal> </td><td class="ttc" style="text-align: right;"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="EducationType"></asp:Literal></span>
</td><td class="ttc"><span style="white-space:nowrap;">
<asp:Literal runat="server" id="COUNTRY"></asp:Literal></span>
</td></tr></Persons:PersonalEducationTableControlRow>
</ITEMTEMPLATE>
</asp:Repeater>
</table>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalEducationTableControl>
</td></tr></Persons:PersonalIdTableControlRow>
</ITEMTEMPLATE>
</asp:Repeater>
</table>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:PersonalIdTableControl>
</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>

View file

@ -0,0 +1,508 @@

' This file implements the code-behind class for ShowPersonalEducationTable1.aspx.
' App_Code\ShowPersonalEducationTable1.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 ShowPersonalEducationTable1
Inherits BaseApplicationPage
' Code-behind class for the ShowPersonalEducationTable1 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_PersonalEducationSearch(ByVal prefixText As String, ByVal count As Integer) As String()
' ' GetPersonalEducationSearchCompletionList 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_PersonalEducationSearch()
' ' or replace the call to GetAutoCompletionList_PersonalEducationSearch().
' Return GetAutoCompletionList_PersonalEducationSearch_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
<Services.WebMethod()> _
Public Shared Function GetAutoCompletionList_PersonalIdSearch1(ByVal prefixText As String, ByVal count As Integer) As String()
' GetPersonalIdSearch1CompletionList 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_PersonalIdSearch1()
' or replace the call to GetAutoCompletionList_PersonalIdSearch1().
Return GetAutoCompletionList_PersonalIdSearch1_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
<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("")
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 = "ประวัติการศึกษา"
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.PersonalIdTableControl.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_PersonalIdSearch1_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.ShowPersonalEducationTable1.PersonalIdTableControl
control = new Persons.UI.Controls.ShowPersonalEducationTable1.PersonalIdTableControl()
Return control.GetAutoCompletionList_PersonalIdSearch1(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.PersonalIdTableControl.LoadData()
Me.PersonalIdTableControl.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 = "PersonalEducationMenuItem"
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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,70 @@
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="ShowViewMaxPersonalEducation.aspx.vb" Culture="th-TH" MasterPageFile="..\Master Pages\HorizontalMenu.master" Inherits="Persons.UI.ShowViewMaxPersonalEducation" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.ShowViewMaxPersonalEducation" %>
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
<%@ 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><Persons:View_MaxPersonalEducationTableControl runat="server" id="View_MaxPersonalEducationTableControl"> <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="View_MaxPersonalEducationTableControlPanelExtender" runat="server" TargetControlid="View_MaxPersonalEducationTableControlCollapsibleRegion" ExpandControlID="View_MaxPersonalEducationTableControlIcon" CollapseControlID="View_MaxPersonalEducationTableControlIcon" ImageControlID="View_MaxPersonalEducationTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
<asp:ImageButton id="View_MaxPersonalEducationTableControlIcon" runat="server" ToolTip="&lt;%# GetResourceValue(&quot;Btn:ExpandCollapse&quot;) %&gt;" 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="View_MaxPersonalEducationTitle" Text="การศึกษาสูงสุด"> </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="View_MaxPersonalEducationTableControlCollapsibleRegion" 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("View_MaxPersonalEducationSearchButton1"))%>
<asp:TextBox runat="server" id="View_MaxPersonalEducationSearch1" columns="50" cssclass="Search_Input"> </asp:TextBox>
<asp:AutoCompleteExtender id="View_MaxPersonalEducationSearch1AutoCompleteExtender" runat="server" TargetControlID="View_MaxPersonalEducationSearch1" ServiceMethod="GetAutoCompletionList_View_MaxPersonalEducationSearch1" MinimumPrefixLength="2" CompletionInterval="700" CompletionSetCount="10" CompletionListCssClass="autotypeahead_completionListElement" CompletionListItemCssClass="autotypeahead_listItem " CompletionListHighlightedItemCssClass="autotypeahead_highlightedListItem">
</asp:AutoCompleteExtender>
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("View_MaxPersonalEducationSearchButton1"))%>
</td><td class="filbc"><Persons:ThemeButton runat="server" id="View_MaxPersonalEducationSearchButton1" button-causesvalidation="False" button-commandname="Search" button-text="&lt;%# GetResourceValue(&quot;Btn:SearchGoButtonText&quot;, &quot;Persons&quot;) %>"></Persons:ThemeButton></td></tr><tr><td class="fila"><asp:Literal runat="server" id="SectionAbbvrNameLabel1" Text="หน่วย"> </asp:Literal></td><td><asp:DropDownList runat="server" id="SectionAbbvrNameFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList></td><td class="filbc"></td></tr><tr><td class="fila"><asp:Literal runat="server" id="RankLevelLabel" Text="ระดับยศ"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("View_MaxPersonalEducationFilterButton"))%>
<asp:DropDownList runat="server" id="RankLevelFromFilter" autopostback="True" cssclass="Filter_Input" onlydisplaymatchablevalues="True"> </asp:DropDownList> <span class="rft"></span> <%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("View_MaxPersonalEducationFilterButton"))%>
</td><td class="filbc" rowspan="7"></td></tr><tr><td class="fila"><asp:Literal runat="server" id="LevelLabel1" Text="ระดับการศึกษา"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("View_MaxPersonalEducationFilterButton"))%>
<asp:DropDownList runat="server" id="LevelFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)" onlydisplaymatchablevalues="True"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("View_MaxPersonalEducationFilterButton"))%>
</td></tr><tr><td class="fila"><asp:Literal runat="server" id="FacultryLabel1" Text="สาขาวิชา"> </asp:Literal></td><td><asp:DropDownList runat="server" id="FacultryFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)" onlydisplaymatchablevalues="True"> </asp:DropDownList> </td></tr><tr><td class="fila"><asp:Literal runat="server" id="CourseAbbrLabel1" Text="คุณวุฒิ"> </asp:Literal></td><td><asp:DropDownList runat="server" id="CourseAbbrFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)" onlydisplaymatchablevalues="True"> </asp:DropDownList> </td></tr><tr><td class="fila"></td><td></td></tr><tr><td class="fila"></td><td></td></tr><tr><td class="fila"></td><td></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="View_MaxPersonalEducationPDFButton" causesvalidation="false" commandname="ReportData" imageurl="../Images/ButtonBarPDFExport.gif" onmouseout="this.src='../Images/ButtonBarPDFExport.gif'" onmouseover="this.src='../Images/ButtonBarPDFExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:PDF&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="View_MaxPersonalEducationWordButton" causesvalidation="false" commandname="ExportToWord" imageurl="../Images/ButtonBarWordExport.gif" onmouseout="this.src='../Images/ButtonBarWordExport.gif'" onmouseover="this.src='../Images/ButtonBarWordExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Word&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="View_MaxPersonalEducationExportExcelButton" causesvalidation="false" commandname="ExportDataExcel" imageurl="../Images/ButtonBarExcelExport.gif" onmouseout="this.src='../Images/ButtonBarExcelExport.gif'" onmouseover="this.src='../Images/ButtonBarExcelExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:ExportExcel&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="View_MaxPersonalEducationExportCSVButton" causesvalidation="false" commandname="ExportData" imageurl="../Images/ButtonBarCSVExport.gif" onmouseout="this.src='../Images/ButtonBarCSVExport.gif'" onmouseover="this.src='../Images/ButtonBarCSVExportOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Export&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="View_MaxPersonalEducationRefreshButton" causesvalidation="false" commandname="ResetData" imageurl="../Images/ButtonBarRefresh.gif" onmouseout="this.src='../Images/ButtonBarRefresh.gif'" onmouseover="this.src='../Images/ButtonBarRefreshOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Refresh&quot;, &quot;Persons&quot;) %>">
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="View_MaxPersonalEducationResetButton" causesvalidation="false" commandname="ResetFilters" imageurl="../Images/ButtonBarReset.gif" onmouseout="this.src='../Images/ButtonBarReset.gif'" onmouseover="this.src='../Images/ButtonBarResetOver.gif'" tooltip="&lt;%# GetResourceValue(&quot;Btn:Reset&quot;, &quot;Persons&quot;) %>">
</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="View_MaxPersonalEducationPagination"></Persons:Pagination></td><td><img src="../Images/paginationRowEdgeR.gif" alt="" /></td><td width="100%">&nbsp;</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="thc" scope="col"><asp:LinkButton runat="server" id="SectionAbbvrNameLabel" Text="หน่วย" CausesValidation="False"> </asp:LinkButton></th><th class="thc" scope="col"><asp:Literal runat="server" id="PersonalNameLabel" Text="Personal Name"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="LevelLabel" Text="ระดับการศึกษา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="CourseLabel" Text="หลักสูตร"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="CourseAbbrLabel" Text="คุณวุฒิ"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="InstitueLabel" Text="สถาบันการศึกษา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="FacultryLabel" Text="สาขาวิชา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="EdYearLabel" Text="ปีการศึกษา"> </asp:Literal>
</th><th class="thc" scope="col"><asp:Literal runat="server" id="CountryLabel" Text="Country"> </asp:Literal>
</th></tr><asp:Repeater runat="server" id="View_MaxPersonalEducationTableControlRepeater"> <ITEMTEMPLATE> <Persons:View_MaxPersonalEducationTableControlRow runat="server" id="View_MaxPersonalEducationTableControlRow">
<tr><td class="ttc"><asp:Literal runat="server" id="SectionAbbvrName"></asp:Literal></td><td class="ttc"><asp:Literal runat="server" id="RankAndName"></asp:Literal></td><td class="ttc"><asp:Literal runat="server" id="Level"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Course"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="CourseAbbr"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Institue"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Facultry"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="EdYear"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Country"></asp:Literal> </td></tr></Persons:View_MaxPersonalEducationTableControlRow>
</ITEMTEMPLATE>
</asp:Repeater>
</table>
</td></tr></table>
</asp:panel></td></tr></table>
</Persons:View_MaxPersonalEducationTableControl>
</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>

View file

@ -0,0 +1,499 @@

' This file implements the code-behind class for ShowViewMaxPersonalEducation.aspx.
' App_Code\ShowViewMaxPersonalEducation.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 ShowViewMaxPersonalEducation
Inherits BaseApplicationPage
' Code-behind class for the ShowViewMaxPersonalEducation 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_View_MaxPersonalEducationSearch1(ByVal prefixText As String, ByVal count As Integer) As String()
' GetView_MaxPersonalEducationSearch1CompletionList 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_View_MaxPersonalEducationSearch1()
' or replace the call to GetAutoCompletionList_View_MaxPersonalEducationSearch1().
Return GetAutoCompletionList_View_MaxPersonalEducationSearch1_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("")
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 = "การศึกษาสูงสุด"
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.View_MaxPersonalEducationTableControl.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_View_MaxPersonalEducationSearch1_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.ShowViewMaxPersonalEducation.View_MaxPersonalEducationTableControl
control = new Persons.UI.Controls.ShowViewMaxPersonalEducation.View_MaxPersonalEducationTableControl()
Return control.GetAutoCompletionList_View_MaxPersonalEducationSearch1(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.View_MaxPersonalEducationTableControl.LoadData()
Me.View_MaxPersonalEducationTableControl.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 = "การศ_กษาส_งส_ดMenuItem"
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

File diff suppressed because it is too large Load diff