initial commit
This commit is contained in:
commit
252dac3143
1516 changed files with 694271 additions and 0 deletions
147
PersonRelative/EditPersonRelative.aspx
Normal file
147
PersonRelative/EditPersonRelative.aspx
Normal file
|
@ -0,0 +1,147 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonRelative.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.EditPersonRelative" %>
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonRelative" %>
|
||||
|
||||
<%@ 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:PersonRelativeRecordControl runat="server" id="PersonRelativeRecordControl"> <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="PersonRelativeRecordControlPanelExtender" runat="server" TargetControlid="PersonRelativeRecordControlCollapsibleRegion" ExpandControlID="PersonRelativeRecordControlIcon" CollapseControlID="PersonRelativeRecordControlIcon" ImageControlID="PersonRelativeRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonRelativeRecordControlIcon" runat="server" ToolTip="<%# GetResourceValue("Btn:ExpandCollapse") %>" causesvalidation="False" imageurl="~/images/icon_panelcollapse.gif" /></td><td class="dhb"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="dhtr" valign="middle"><asp:Literal runat="server" id="PersonRelativeTitle" Text="<%#String.Concat(GetResourceValue("Title:Edit")," Person Relative") %>"> </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="PersonRelativeRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="PersonRelativeRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="RelationIdLabel" Text="เป็น"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:DropDownList runat="server" id="RelationId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
|
||||
<Selectors:FvLlsHyperLink runat="server" id="RelationIdFvLlsHyperLink" ControlToUpdate="RelationId" Text="<%# GetResourceValue("LLS:Text", "Persons") %>" MinListItems="100" Table="relation" Field="Relation_.RelationId" DisplayField="Relation_.Relation"></Selectors:FvLlsHyperLink></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="RPreNameLabel" Text="คำนำหน้า"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RPreName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RPreNameTextBoxMaxLengthValidator" ControlToValidate="RPreName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "คำนำหน้า") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="RFirstNameLabel" Text="ชื่อ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RFirstName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RFirstNameTextBoxMaxLengthValidator" ControlToValidate="RFirstName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ชื่อ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="RLastNameLabel" Text="นามสกุล"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RLastName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RLastNameTextBoxMaxLengthValidator" ControlToValidate="RLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุล") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"></td><td class="dfv" style="white-space:nowrap;"></td><td class="fls"><asp:Literal runat="server" id="ROrLastNameLabel" Text="นามสกุลเดิม"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="ROrLastName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ROrLastNameTextBoxMaxLengthValidator" ControlToValidate="ROrLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุลเดิม") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="FNameLabel" Text="ชื่อบิดา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="FName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FNameTextBoxMaxLengthValidator" ControlToValidate="FName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ชื่อบิดา") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="FLastNameLabel" Text="นามสกุล"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="FLastName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FLastNameTextBoxMaxLengthValidator" ControlToValidate="FLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุล") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="MNameLabel" Text="ชื่อมารดา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="MName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="MNameTextBoxMaxLengthValidator" ControlToValidate="MName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ชื่อมารดา") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="MLastNameLabel" Text="นามสกุล"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="MLastName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="MLastNameTextBoxMaxLengthValidator" ControlToValidate="MLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุล") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"></td><td class="dfv" style="white-space:nowrap;"></td><td class="fls"><asp:Literal runat="server" id="MOrLastNameLabel" Text="นามสกุลเดิม"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="MOrLastName" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="MOrLastNameTextBoxMaxLengthValidator" ControlToValidate="MOrLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุลเดิม") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="ROriginLabel" Text="เชื่อชาติ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="ROrigin" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ROriginTextBoxMaxLengthValidator" ControlToValidate="ROrigin" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "เชื่อชาติ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="RNationalityLabel" Text="สัญชาติ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RNationality" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RNationalityTextBoxMaxLengthValidator" ControlToValidate="RNationality" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "สัญชาติ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="RReligionLabel" Text="ศาสนา"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RReligion" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RReligionTextBoxMaxLengthValidator" ControlToValidate="RReligion" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ศาสนา") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="RAddressLabel" Text="ที่อยู่"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RAddress" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RAddressTextBoxMaxLengthValidator" ControlToValidate="RAddress" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ที่อยู่") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="RAmphurLabel" Text="อำเภอ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RAmphur" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RAmphurTextBoxMaxLengthValidator" ControlToValidate="RAmphur" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "อำเภอ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="RProvinceLabel" Text="จังหวัด"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RProvince" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RProvinceTextBoxMaxLengthValidator" ControlToValidate="RProvince" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "จังหวัด") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="RBirthDateLabel" 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="RBirthDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="RBirthDateCalendarExtender" TargetControlID="RBirthDate" CssClass="MyCalendar" Format="d MMM yy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RBirthDateTextBoxMaxLengthValidator" ControlToValidate="RBirthDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "วันเกิด") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td><td class="fls"></td><td class="dfv" style="white-space:nowrap;"></td></tr><tr><td class="fls"><asp:Literal runat="server" id="RefDateLabel" 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="RefDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="RefDateCalendarExtender" TargetControlID="RefDate" CssClass="MyCalendar" Format="d MMM yy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RefDateTextBoxMaxLengthValidator" ControlToValidate="RefDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="RefLabel" Text="หลักฐาน"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Ref1" MaxLength="100" columns="60" cssclass="field_input" rows="2" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="Ref1TextBoxMaxLengthValidator" ControlToValidate="Ref1" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "หลักฐาน") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="RStatusLabel" Text="สถานภาพ"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:DropDownList runat="server" id="RStatus" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
|
||||
<Selectors:FvLlsHyperLink runat="server" id="RStatusFvLlsHyperLink" ControlToUpdate="RStatus" Text="<%# GetResourceValue("LLS:Text", "Persons") %>" MinListItems="100" Table="RStatus" Field="RStatus_.RStatusId" DisplayField="RStatus_.RStatus"></Selectors:FvLlsHyperLink></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="RStatusDateLabel" 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="RStatusDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="RStatusDateCalendarExtender" TargetControlID="RStatusDate" CssClass="MyCalendar" Format="d MMM yy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RStatusDateTextBoxMaxLengthValidator" ControlToValidate="RStatusDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td></tr><tr><td class="fls"></td><td class="dfv" style="white-space:nowrap;"></td><td class="fls"><asp:Literal runat="server" id="RStatusRefLabel" Text="หลักฐาน"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RStatusRef" MaxLength="100" columns="60" cssclass="field_input" rows="2" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RStatusRefTextBoxMaxLengthValidator" ControlToValidate="RStatusRef" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "หลักฐาน") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="RRemarkLabel" Text="หมายเหตุ"> </asp:Literal></td><td class="dfv" colspan="3" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RRemark" Columns="50" MaxLength="50" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RRemarkTextBoxMaxLengthValidator" ControlToValidate="RRemark" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "หมายเหตุ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr></table></asp:panel>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonRelativeRecordControl>
|
||||
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SaveButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SaveAndNewButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("OKButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("EditButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("CancelButton"))%>
|
||||
</td></tr><tr><td class="recordPanelButtonsAlignment"><table cellpadding="0" cellspacing="0" border="0"><tr><td><Persons:ThemeButton runat="server" id="SaveButton" button-causesvalidation="true" button-commandname="UpdateData" button-text="<%# GetResourceValue("Btn:Save", "Persons") %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="CancelButton" button-causesvalidation="false" button-commandname="Redirect" button-text="<%# GetResourceValue("Btn:Cancel", "Persons") %>"></Persons:ThemeButton></td></tr></table>
|
||||
</td></tr></table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"></div>
|
||||
<asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"></asp:ValidationSummary>
|
||||
</asp:Content>
|
||||
|
616
PersonRelative/EditPersonRelative.aspx.vb
Normal file
616
PersonRelative/EditPersonRelative.aspx.vb
Normal file
|
@ -0,0 +1,616 @@
|
|||
|
||||
' This file implements the code-behind class for EditPersonRelative.aspx.
|
||||
' App_Code\EditPersonRelative.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 EditPersonRelative
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the EditPersonRelative 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("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") + " Person Relative"
|
||||
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.PersonRelativeRecordControl.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.PersonRelativeRecordControl.LoadData()
|
||||
Me.PersonRelativeRecordControl.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 = "PersonRelativeMenuItem"
|
||||
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.PersonRelativeRecordControl Is Nothing AndAlso Not Me.PersonRelativeRecordControl.DataSource Is Nothing Then
|
||||
|
||||
id = Me.PersonRelativeRecordControl.DataSource.RelativeId.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.PersonRelativeRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonRelativeRecordControl.DataSource)
|
||||
value = EvaluateFormula(DFKA, Me.PersonRelativeRecordControl.DataSource, Nothing,variables)
|
||||
Else
|
||||
value = Me.PersonRelativeRecordControl.DataSource.GetValue(Me.PersonRelativeRecordControl.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.PersonRelativeRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonRelativeRecordControl.DataSource)
|
||||
value = EvaluateFormula(formula, Me.PersonRelativeRecordControl.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
|
||||
|
2254
PersonRelative/EditPersonRelative.xml
Normal file
2254
PersonRelative/EditPersonRelative.xml
Normal file
File diff suppressed because it is too large
Load diff
178
PersonRelative/EditPersonRelativeTable.aspx
Normal file
178
PersonRelative/EditPersonRelativeTable.aspx
Normal file
|
@ -0,0 +1,178 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonRelativeTable" %>
|
||||
|
||||
<%@ Register Tagprefix="BaseClasses" Namespace="BaseClasses.Web.UI.WebControls" Assembly="BaseClasses" %>
|
||||
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonRelativeTable.aspx.vb" Culture="th-TH" MasterPageFile="..\Master Pages\HorPersonalmenu.master" Inherits="Persons.UI.EditPersonRelativeTable" %><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:PersonRelativeTableControl runat="server" id="PersonRelativeTableControl"> <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="PersonRelativeTableControlPanelExtender" runat="server" TargetControlid="PersonRelativeTableControlCollapsibleRegion" ExpandControlID="PersonRelativeTableControlIcon" CollapseControlID="PersonRelativeTableControlIcon" ImageControlID="PersonRelativeTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonRelativeTableControlIcon" runat="server" ToolTip="<%# GetResourceValue("Btn:ExpandCollapse") %>" causesvalidation="False" imageurl="~/images/icon_panelcollapse.gif" /></td><td class="dhb"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="dhtr" valign="middle"><asp:Literal runat="server" id="PersonRelativeTitle" Text="<%#String.Concat("Person Relative") %>"> </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="PersonRelativeTableControlCollapsibleRegion" 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="PersonRelativeAddButton" causesvalidation="false" commandname="AddRecord" imageurl="../Images/ButtonBarNew.gif" onmouseout="this.src='../Images/ButtonBarNew.gif'" onmouseover="this.src='../Images/ButtonBarNewOver.gif'" tooltip="<%# GetResourceValue("Btn:Add", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonRelativeEditButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/ButtonBarEdit.gif" onmouseout="this.src='../Images/ButtonBarEdit.gif'" onmouseover="this.src='../Images/ButtonBarEditOver.gif'" tooltip="<%# GetResourceValue("Btn:Edit", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonRelativeDeleteButton" causesvalidation="false" commandargument="DeleteOnUpdate" commandname="DeleteRecord" imageurl="../Images/ButtonBarDelete.gif" onmouseout="this.src='../Images/ButtonBarDelete.gif'" onmouseover="this.src='../Images/ButtonBarDeleteOver.gif'" tooltip="<%# GetResourceValue("Btn:Delete", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonRelativeSaveButton" causesvalidation="true" commandname="UpdateData" imageurl="../Images/ButtonBarSave.gif" onmouseout="this.src='../Images/ButtonBarSave.gif'" onmouseover="this.src='../Images/ButtonBarSaveOver.gif'" tooltip="<%# GetResourceValue("Btn:Save", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonRelativeRefreshButton" causesvalidation="false" commandname="ResetData" imageurl="../Images/ButtonBarRefresh.gif" onmouseout="this.src='../Images/ButtonBarRefresh.gif'" onmouseover="this.src='../Images/ButtonBarRefreshOver.gif'" tooltip="<%# GetResourceValue("Btn:Refresh", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonRelativeResetButton" causesvalidation="false" commandname="ResetFilters" imageurl="../Images/ButtonBarReset.gif" onmouseout="this.src='../Images/ButtonBarReset.gif'" onmouseover="this.src='../Images/ButtonBarResetOver.gif'" tooltip="<%# GetResourceValue("Btn:Reset", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><img src="../Images/ButtonBarDividerR.gif" alt="" /></td><td class="prbbc"><img src="../Images/ButtonBarEdgeR.gif" alt="" /></td><td class="pra"><Persons:Pagination runat="server" id="PersonRelativePagination"></Persons:Pagination></td><td><img src="../Images/paginationRowEdgeR.gif" alt="" /></td><td width="100%"> </td></tr></table>
|
||||
</td></tr><tr><td class="tre"><table cellpadding="0" cellspacing="0" border="0" width="100%" onkeydown="captureUpDownKey(this, event)"><tr class="tch"><th class="thcnb" colspan="3"><img src="../Images/space.gif" height="1" width="1" alt="" /></th><th class="thcwb" style="padding:0px;vertical-align:middle;"><asp:CheckBox runat="server" id="PersonRelativeToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RelationIdLabel1" Text="เป็น" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RPreNameLabel" Text="คำนำหน้า" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RFirstNameLabel" Text="ชื่อ" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RLastNameLabel" Text="นามสกุล" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ROrLastNameLabel" Text="นามสกุลเดิม" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="FNameLabel" Text="ชื่อบิดา" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="FLastNameLabel" Text="นามสกุล" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="MNameLabel" Text="ชื่อมารดา" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="MLastNameLabel" Text="นามสกุล" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="MOrLastNameLabel" Text="นามสกุลเดิม" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ROriginLabel" Text="เชื่อชาติ" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RNationalityLabel" Text="สัญชาติ" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RReligionLabel" Text="ศาสนา" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RAddressLabel" Text="ที่อยู่" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RAmphurLabel" Text="อำเภอ" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RProvinceLabel" Text="จังหวัด" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RBirthDateLabel" Text="วันเกิด" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RefLabel" Text="หลักฐาน" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RefDateLabel" Text="ลงวันที่" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RStatusLabel" Text="สถานภาพ" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RStatusRefLabel" Text="หลักฐาน" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RStatusDateLabel" Text="ลงวันที่" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="RRemarkLabel" Text="หมายเหตุ" CausesValidation="False"> </asp:LinkButton>
|
||||
</th></tr><asp:Repeater runat="server" id="PersonRelativeTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonRelativeTableControlRow runat="server" id="PersonRelativeTableControlRow">
|
||||
<tr><td class="ticnb" scope="row"></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonRelativeRowEditButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_edit.gif" tooltip="<%# GetResourceValue("Txt:EditRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonRelativeRowDeleteButton" causesvalidation="False" commandargument="DeleteOnUpdate" commandname="DeleteRecord" cssclass="button_link" imageurl="../Images/icon_delete.gif" tooltip="<%# GetResourceValue("Txt:DeleteRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticwb"><asp:CheckBox runat="server" id="PersonRelativeRecordRowSelection" onclick="moveToThisTableRow(this);"> </asp:CheckBox></td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:DropDownList runat="server" id="RelationId" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
|
||||
<Selectors:FvLlsHyperLink runat="server" id="RelationIdFvLlsHyperLink" ControlToUpdate="RelationId" Text="<%# GetResourceValue("LLS:Text", "Persons") %>" MinListItems="100" Table="relation" Field="Relation_.RelationId" DisplayField="Relation_.Relation"></Selectors:FvLlsHyperLink></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RPreName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RPreNameTextBoxMaxLengthValidator" ControlToValidate="RPreName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "คำนำหน้า") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
|
||||
<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="<%# GetResourceValue("LLS:Text", "Persons") %>" MinListItems="100" Visible="False" Table="PersonalId" Field="PersonalId_.PersonalId" DisplayField="PersonalId_.PersonalName"></Selectors:FvLlsHyperLink>
|
||||
<asp:RequiredFieldValidator runat="server" id="PersonalIdRequiredFieldValidator" ControlToValidate="PersonalId" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Personal") %>" enabled="True" initialvalue="--PLEASE_SELECT--" text="*"></asp:RequiredFieldValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RFirstName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RFirstNameTextBoxMaxLengthValidator" ControlToValidate="RFirstName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ชื่อ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RLastName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RLastNameTextBoxMaxLengthValidator" ControlToValidate="RLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุล") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="ROrLastName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ROrLastNameTextBoxMaxLengthValidator" ControlToValidate="ROrLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุลเดิม") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="FName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FNameTextBoxMaxLengthValidator" ControlToValidate="FName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ชื่อบิดา") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="FLastName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="FLastNameTextBoxMaxLengthValidator" ControlToValidate="FLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุล") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="MName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="MNameTextBoxMaxLengthValidator" ControlToValidate="MName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ชื่อมารดา") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="MLastName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="MLastNameTextBoxMaxLengthValidator" ControlToValidate="MLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุล") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="MOrLastName" MaxLength="50" columns="11" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="MOrLastNameTextBoxMaxLengthValidator" ControlToValidate="MOrLastName" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "นามสกุลเดิม") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="ROrigin" MaxLength="50" columns="4" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="ROriginTextBoxMaxLengthValidator" ControlToValidate="ROrigin" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "เชื่อชาติ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RNationality" MaxLength="50" columns="4" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RNationalityTextBoxMaxLengthValidator" ControlToValidate="RNationality" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "สัญชาติ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RReligion" MaxLength="50" columns="4" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RReligionTextBoxMaxLengthValidator" ControlToValidate="RReligion" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ศาสนา") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RAddress" MaxLength="50" columns="20" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RAddressTextBoxMaxLengthValidator" ControlToValidate="RAddress" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ที่อยู่") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RAmphur" MaxLength="50" columns="10" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RAmphurTextBoxMaxLengthValidator" ControlToValidate="RAmphur" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "อำเภอ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RProvince" MaxLength="50" columns="10" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RProvinceTextBoxMaxLengthValidator" ControlToValidate="RProvince" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "จังหวัด") %>"></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="RBirthDate" MaxLength="20" columns="11" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="RBirthDateCalendarExtender" TargetControlID="RBirthDate" CssClass="MyCalendar" Format="d MMM yyyy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RBirthDateTextBoxMaxLengthValidator" ControlToValidate="RBirthDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "วันเกิด") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Ref1" MaxLength="100" columns="20" cssclass="field_input" rows="2"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="Ref1TextBoxMaxLengthValidator" ControlToValidate="Ref1" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "หลักฐาน") %>"></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="RefDate" MaxLength="20" columns="11" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="RefDateCalendarExtender" TargetControlID="RefDate" CssClass="MyCalendar" Format="d MMM yyyy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RefDateTextBoxMaxLengthValidator" ControlToValidate="RefDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:DropDownList runat="server" id="RStatus" cssclass="field_input" onkeypress="dropDownListTypeAhead(this,false)"></asp:DropDownList>
|
||||
<Selectors:FvLlsHyperLink runat="server" id="RStatusFvLlsHyperLink" ControlToUpdate="RStatus" Text="<%# GetResourceValue("LLS:Text", "Persons") %>" MinListItems="100" Table="RStatus" Field="RStatus_.RStatusId" DisplayField="RStatus_.RStatus"></Selectors:FvLlsHyperLink></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RStatusRef" MaxLength="100" columns="20" cssclass="field_input" rows="2"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RStatusRefTextBoxMaxLengthValidator" ControlToValidate="RStatusRef" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "หลักฐาน") %>"></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="RStatusDate" MaxLength="20" columns="11" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="RStatusDateCalendarExtender" TargetControlID="RStatusDate" CssClass="MyCalendar" Format="d MMM yyyy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RStatusDateTextBoxMaxLengthValidator" ControlToValidate="RStatusDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="RRemark" MaxLength="50" columns="20" cssclass="field_input"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="RRemarkTextBoxMaxLengthValidator" ControlToValidate="RRemark" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "หมายเหตุ") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr></Persons:PersonRelativeTableControlRow>
|
||||
</ITEMTEMPLATE>
|
||||
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonRelativeTableControl>
|
||||
|
||||
</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>
|
||||
|
488
PersonRelative/EditPersonRelativeTable.aspx.vb
Normal file
488
PersonRelative/EditPersonRelativeTable.aspx.vb
Normal file
|
@ -0,0 +1,488 @@
|
|||
|
||||
' This file implements the code-behind class for EditPersonRelativeTable.aspx.
|
||||
' App_Code\EditPersonRelativeTable.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 EditPersonRelativeTable
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the EditPersonRelativeTable 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_PersonRelativeSearch(ByVal prefixText As String, ByVal count As Integer) As String()
|
||||
' ' GetPersonRelativeSearchCompletionList 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_PersonRelativeSearch()
|
||||
' ' or replace the call to GetAutoCompletionList_PersonRelativeSearch().
|
||||
' Return GetAutoCompletionList_PersonRelativeSearch_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") + " Person Relative"
|
||||
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.PersonRelativeTableControl.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.PersonRelativeTableControl.LoadData()
|
||||
Me.PersonRelativeTableControl.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
|
||||
|
2975
PersonRelative/EditPersonRelativeTable.xml
Normal file
2975
PersonRelative/EditPersonRelativeTable.xml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue