initial commit
This commit is contained in:
commit
252dac3143
1516 changed files with 694271 additions and 0 deletions
100
PersonalExtWork/AddPersonalExtWork.aspx
Normal file
100
PersonalExtWork/AddPersonalExtWork.aspx
Normal file
|
@ -0,0 +1,100 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.AddPersonalExtWork" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="AddPersonalExtWork.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.AddPersonalExtWork" %>
|
||||
<%@ 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:PersonalExtWorkRecordControl runat="server" id="PersonalExtWorkRecordControl"> <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="PersonalExtWorkRecordControlPanelExtender" runat="server" TargetControlid="PersonalExtWorkRecordControlCollapsibleRegion" ExpandControlID="PersonalExtWorkRecordControlIcon" CollapseControlID="PersonalExtWorkRecordControlIcon" ImageControlID="PersonalExtWorkRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonalExtWorkRecordControlIcon" 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="PersonalExtWorkTitle" Text="<%#String.Concat(GetResourceValue("Title:Add")," Personal Ext Work") %>"> </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="PersonalExtWorkRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="PersonalExtWorkRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="PersonalIdLabel" Text="Personal"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="PersonalId" Columns="13" MaxLength="13" cssclass="field_input"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" id="PersonalIdRequiredFieldValidator" ControlToValidate="PersonalId" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Personal") %>" enabled="True" text="*"></asp:RequiredFieldValidator>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="PersonalIdTextBoxMaxLengthValidator" ControlToValidate="PersonalId" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "Personal") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="BeginDateLabel" 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="BeginDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="BeginDateCalendarExtender" TargetControlID="BeginDate" CssClass="MyCalendar" Format="d MMM yy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="BeginDateTextBoxMaxLengthValidator" ControlToValidate="BeginDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ตั้งแต่วันที่") %>"></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>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ถึงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</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>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="DescriptionLabel" Text="รายการปฏิบัติงาน"> </asp:Literal></td><td class="dfv" colspan="3" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Description" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="DescriptionTextBoxMaxLengthValidator" ControlToValidate="Description" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "รายการปฏิบัติงาน") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="PlaceLabel" Text="ที่"> </asp:Literal></td><td class="dfv" colspan="3" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Place" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="PlaceTextBoxMaxLengthValidator" ControlToValidate="Place" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ที่") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CommandLabel" Text="คำสั่ง"> </asp:Literal></td><td class="dfv" colspan="3" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Command" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "คำสั่ง") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr></table></asp:panel>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonalExtWorkRecordControl>
|
||||
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SaveButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("SaveAndNewButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("OKButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("EditButton"))%>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("CancelButton"))%>
|
||||
</td></tr><tr><td class="recordPanelButtonsAlignment"><table cellpadding="0" cellspacing="0" border="0"><tr><td><Persons:ThemeButton runat="server" id="SaveButton" button-causesvalidation="true" button-commandname="UpdateData" button-text="<%# GetResourceValue("Btn:Save", "Persons") %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="SaveAndNewButton" button-causesvalidation="true" button-commandname="UpdateData" button-text="<%# GetResourceValue("Btn:SaveNNew", "Persons") %>" postback="True"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="CancelButton" button-causesvalidation="false" button-commandname="Redirect" button-text="<%# GetResourceValue("Btn:Cancel", "Persons") %>"></Persons:ThemeButton></td></tr></table>
|
||||
</td></tr></table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"></div>
|
||||
<asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"></asp:ValidationSummary>
|
||||
</asp:Content>
|
||||
|
657
PersonalExtWork/AddPersonalExtWork.aspx.vb
Normal file
657
PersonalExtWork/AddPersonalExtWork.aspx.vb
Normal file
|
@ -0,0 +1,657 @@
|
|||
|
||||
' This file implements the code-behind class for AddPersonalExtWork.aspx.
|
||||
' App_Code\AddPersonalExtWork.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 AddPersonalExtWork
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the AddPersonalExtWork 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 Ext Work"
|
||||
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.PersonalExtWorkRecordControl.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.PersonalExtWorkRecordControl.LoadData()
|
||||
Me.PersonalExtWorkRecordControl.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 = "PersonalExtWorkMenuItem"
|
||||
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.PersonalExtWorkRecordControl Is Nothing AndAlso Not Me.PersonalExtWorkRecordControl.DataSource Is Nothing Then
|
||||
|
||||
id = Me.PersonalExtWorkRecordControl.DataSource.id0.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.PersonalExtWorkRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalExtWorkRecordControl.DataSource)
|
||||
value = EvaluateFormula(DFKA, Me.PersonalExtWorkRecordControl.DataSource, Nothing,variables)
|
||||
Else
|
||||
value = Me.PersonalExtWorkRecordControl.DataSource.GetValue(Me.PersonalExtWorkRecordControl.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.PersonalExtWorkRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalExtWorkRecordControl.DataSource)
|
||||
value = EvaluateFormula(formula, Me.PersonalExtWorkRecordControl.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
|
||||
|
1027
PersonalExtWork/AddPersonalExtWork.xml
Normal file
1027
PersonalExtWork/AddPersonalExtWork.xml
Normal file
File diff suppressed because it is too large
Load diff
100
PersonalExtWork/EditPersonalExtWork.aspx
Normal file
100
PersonalExtWork/EditPersonalExtWork.aspx
Normal file
|
@ -0,0 +1,100 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonalExtWork" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonalExtWork.aspx.vb" Culture="th-TH" MasterPageFile="..\Master Pages\HorPersonalmenu.master" Inherits="Persons.UI.EditPersonalExtWork" %>
|
||||
<%@ 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:PersonalExtWorkRecordControl runat="server" id="PersonalExtWorkRecordControl"> <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="PersonalExtWorkRecordControlPanelExtender" runat="server" TargetControlid="PersonalExtWorkRecordControlCollapsibleRegion" ExpandControlID="PersonalExtWorkRecordControlIcon" CollapseControlID="PersonalExtWorkRecordControlIcon" ImageControlID="PersonalExtWorkRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonalExtWorkRecordControlIcon" 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="PersonalExtWorkTitle" Text="<%#String.Concat(GetResourceValue("Title:Edit")," Personal Ext Work") %>"> </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="PersonalExtWorkRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="PersonalExtWorkRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="PersonalIdLabel" Text="Personal"> </asp:Literal></td><td class="dfv" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="PersonalId" Columns="13" MaxLength="13" cssclass="field_input"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" id="PersonalIdRequiredFieldValidator" ControlToValidate="PersonalId" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Personal") %>" enabled="True" text="*"></asp:RequiredFieldValidator>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="PersonalIdTextBoxMaxLengthValidator" ControlToValidate="PersonalId" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "Personal") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="fls"><asp:Literal runat="server" id="BeginDateLabel" 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="BeginDate" Columns="20" MaxLength="20" cssclass="field_input"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="BeginDateCalendarExtender" TargetControlID="BeginDate" CssClass="MyCalendar" Format="d MMM yy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="BeginDateTextBoxMaxLengthValidator" ControlToValidate="BeginDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ตั้งแต่วันที่") %>"></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>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ถึงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</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>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="DescriptionLabel" Text="รายการปฏิบัติงาน"> </asp:Literal></td><td class="dfv" colspan="3" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Description" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="DescriptionTextBoxMaxLengthValidator" ControlToValidate="Description" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "รายการปฏิบัติงาน") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="PlaceLabel" Text="ที่"> </asp:Literal></td><td class="dfv" colspan="3" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Place" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="PlaceTextBoxMaxLengthValidator" ControlToValidate="Place" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ที่") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr><tr><td class="fls"><asp:Literal runat="server" id="CommandLabel" Text="คำสั่ง"> </asp:Literal></td><td class="dfv" colspan="3" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Command" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "คำสั่ง") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td></tr></table></asp:panel>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonalExtWorkRecordControl>
|
||||
|
||||
<%= 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
PersonalExtWork/EditPersonalExtWork.aspx.vb
Normal file
616
PersonalExtWork/EditPersonalExtWork.aspx.vb
Normal file
|
@ -0,0 +1,616 @@
|
|||
|
||||
' This file implements the code-behind class for EditPersonalExtWork.aspx.
|
||||
' App_Code\EditPersonalExtWork.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 EditPersonalExtWork
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the EditPersonalExtWork 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 Ext Work"
|
||||
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.PersonalExtWorkRecordControl.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.PersonalExtWorkRecordControl.LoadData()
|
||||
Me.PersonalExtWorkRecordControl.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
|
||||
|
||||
' 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.PersonalExtWorkRecordControl Is Nothing AndAlso Not Me.PersonalExtWorkRecordControl.DataSource Is Nothing Then
|
||||
|
||||
id = Me.PersonalExtWorkRecordControl.DataSource.id0.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.PersonalExtWorkRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalExtWorkRecordControl.DataSource)
|
||||
value = EvaluateFormula(DFKA, Me.PersonalExtWorkRecordControl.DataSource, Nothing,variables)
|
||||
Else
|
||||
value = Me.PersonalExtWorkRecordControl.DataSource.GetValue(Me.PersonalExtWorkRecordControl.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.PersonalExtWorkRecordControl.DataSource.TableAccess.TableDefinition.TableCodeName, Me.PersonalExtWorkRecordControl.DataSource)
|
||||
value = EvaluateFormula(formula, Me.PersonalExtWorkRecordControl.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
|
||||
|
996
PersonalExtWork/EditPersonalExtWork.xml
Normal file
996
PersonalExtWork/EditPersonalExtWork.xml
Normal file
|
@ -0,0 +1,996 @@
|
|||
<?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>EditPersonalExtWork</Name>
|
||||
<Type>Page</Type>
|
||||
<SubType>DotNet</SubType>
|
||||
<MasterLayout>..\Master Pages\HorPersonalmenu.master</MasterLayout>
|
||||
<GenerateDirectory>PersonalExtWork</GenerateDirectory>
|
||||
<Layout>PersonalExtWork\EditPersonalExtWork.xml</Layout>
|
||||
<DisplayName>EditPersonalExtWork</DisplayName>
|
||||
<Description>Standard record panel.</Description>
|
||||
<MenuFileToHilite>Menu</MenuFileToHilite>
|
||||
<MenuHiliteItem>การปฏ_บ_ต_งานMenuItem</MenuHiliteItem>
|
||||
<LoginRequired><PRoles>NO_ACCESS</PRoles></LoginRequired>
|
||||
<CheckSum>1745554411-12748</CheckSum>
|
||||
</Self>
|
||||
<ComposedOf>
|
||||
<ContainedComponent>
|
||||
<Name>BeginDate</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>BeginDate</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>BeginDateRequiredFieldValidator:Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>DateSelectorType</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>BeginDateLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>PersonalExtWorkRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>BeginDate</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%PersonalExtWork%BeginDate</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>CancelButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.ascx</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>false</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>Redirect</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Consumers</Name>
|
||||
<Value>page</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-RedirectURL</Name>
|
||||
<Value>Back</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:Cancel</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>Command</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>Command</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Columns</Name>
|
||||
<Value>60</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CommandRequiredFieldValidator:Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>RichTextEditorType</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Rows</Name>
|
||||
<Value>5</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>TextMode</Name>
|
||||
<Value>MultiLine</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>CommandDate</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>CommandDate</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CommandDateRequiredFieldValidator:Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>DateSelectorType</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>CommandDateLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>PersonalExtWorkRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>CommandDate</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%PersonalExtWork%CommandDate</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>CommandLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>PersonalExtWorkRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>Command</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%PersonalExtWork%Command</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>Description</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>Description</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Columns</Name>
|
||||
<Value>60</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>DescriptionRequiredFieldValidator:Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>RichTextEditorType</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Rows</Name>
|
||||
<Value>5</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>TextMode</Name>
|
||||
<Value>MultiLine</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>DescriptionLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>PersonalExtWorkRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>Description</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%PersonalExtWork%Description</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>EndDate</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>EndDate</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>DateSelectorType</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EndDateRequiredFieldValidator:Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>EndDateLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>PersonalExtWorkRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>EndDate</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%PersonalExtWork%EndDate</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PageTitle</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>{Title:Edit} Personal Ext Work</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PersonalExtWorkRecordControl</Name>
|
||||
<Type>Record</Type>
|
||||
<PanelStyle>EditRec_DTB_Parent</PanelStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>EnterKeyCaptureToButton</Name>
|
||||
<Value>SaveButton,SaveAndNewButton,OKButton,EditButton,CancelButton</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>HideDataUntilSearched</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>URL</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSourceArg</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>URL</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PersonalExtWorkRecordControlCollapsibleRegion</Name>
|
||||
<Type>Aspx</Type>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
<ControlClass>System.Web.UI.WebControls.Panel</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PersonalExtWorkRecordControlIcon</Name>
|
||||
<Type>Aspx</Type>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
<ControlClass>System.Web.UI.WebControls.ImageButton</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PersonalExtWorkRecordControlPanelExtender</Name>
|
||||
<Type>Aspx</Type>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
<ControlClass>AjaxControlToolkit.CollapsiblePanelExtender</ControlClass>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PersonalExtWorkTitle</Name>
|
||||
<Type>Html</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>HtmlEncodeWhiteSpace</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value><%#String.Concat(GetResourceValue("Title:Edit")," Personal Ext Work") %></Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PersonalId</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>PersonalId</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PersonalIdRequiredFieldValidator:Enabled</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PersonalIdRequiredFieldValidator:Text</Name>
|
||||
<Value>*</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PersonalIdLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>PersonalExtWorkRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>PersonalId</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%PersonalExtWork%PersonalId</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>Place</Name>
|
||||
<Type>FieldValue</Type>
|
||||
<Field>Place</Field>
|
||||
<FieldValueStyle>TextBox</FieldValueStyle>
|
||||
<Table>PersonalExtWork</Table>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Columns</Name>
|
||||
<Value>60</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>CssClass</Name>
|
||||
<Value>field_input</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>EnableIncrementDecrementButtons</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:DataSource</Name>
|
||||
<Value>Parent</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PlaceRequiredFieldValidator:Enabled</Name>
|
||||
<Value>False</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>RichTextEditorType</Name>
|
||||
<Value>Default</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Rows</Name>
|
||||
<Value>5</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>TextMode</Name>
|
||||
<Value>MultiLine</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>PlaceLabel</Name>
|
||||
<Type>Literal</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Consumers</Name>
|
||||
<Value>PersonalExtWorkRecordControl</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Field</Name>
|
||||
<Value>Place</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>InternalUse:Table</Name>
|
||||
<Value>PersonalExtWork</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Text</Name>
|
||||
<Value>%ISD_DEFAULT%PersonalExtWork%Place</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
<InsideControl>PersonalExtWorkRecordControl</InsideControl>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>SaveButton</Name>
|
||||
<Type>Button</Type>
|
||||
<Layout>..\Shared\ThemeButton.ascx</Layout>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>Button-CausesValidation</Name>
|
||||
<Value>true</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-CommandName</Name>
|
||||
<Value>UpdateData</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Consumers</Name>
|
||||
<Value>page</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-RedirectURL</Name>
|
||||
<Value>Back</Value>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>Button-Text</Name>
|
||||
<Value>Btn:Save</Value>
|
||||
<Type>ResourceReference</Type>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>PostBack</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
<ContainedComponent>
|
||||
<Name>UpdatePanel1</Name>
|
||||
<Type>UpdatePanel</Type>
|
||||
<PassthroughAttributes>
|
||||
<Attribute>
|
||||
<Name>SmoothPanelUpdate</Name>
|
||||
<Value>True</Value>
|
||||
</Attribute>
|
||||
</PassthroughAttributes>
|
||||
</ContainedComponent>
|
||||
</ComposedOf>
|
||||
<LayoutDefinition><?xml version="1.0" encoding="utf-16"?>
|
||||
<LayoutDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Layout Name="Page" Type="RootLayout">
|
||||
<Prolog>
|
||||
<Value>&lt;asp:Content id="PageSection" ContentPlaceHolderID="PageContent" Runat="server"&gt;
|
||||
&lt;a id="StartOfPageContent"&gt;&lt;/a&gt;
|
||||
&lt;GEN:UPDATEPANEL NAME="UpdatePanel1"&gt;
|
||||
</Value>
|
||||
</Prolog>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>
|
||||
&lt;GEN:RECORD NAME="PersonalExtWorkRecordControl"&gt;&lt;/GEN:RECORD&gt;
|
||||
</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="PageButtons"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>recordPanelButtonsAlignment</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Epilog>
|
||||
<Value>
|
||||
&lt;/GEN:UPDATEPANEL&gt;
|
||||
&lt;div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"&gt;&lt;/div&gt;
|
||||
&lt;asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"&gt;&lt;/asp:ValidationSummary&gt;
|
||||
&lt;/asp:Content&gt;
|
||||
</Value>
|
||||
</Epilog>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="PersonalExtWorkRecordControl" Type="RecordPanel" PanelControlName="PersonalExtWorkRecordControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="PersonalExtWorkPanelHeader"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dh</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;asp:panel id="PersonalExtWorkRecordControlCollapsibleRegion" runat="server"&gt;&lt;GEN:PANEL NAME="PersonalExtWorkPanel"/&gt;&lt;/asp:panel&gt;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="PersonalExtWorkPanelHeader" Type="PanelHeader" PanelControlName="PersonalExtWorkRecordControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhel</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;asp:CollapsiblePanelExtender id="PersonalExtWorkRecordControlPanelExtender" runat="server" TargetControlid="PersonalExtWorkRecordControlCollapsibleRegion" ExpandControlID="PersonalExtWorkRecordControlIcon" CollapseControlID="PersonalExtWorkRecordControlIcon" ImageControlID="PersonalExtWorkRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true"/&gt;
|
||||
&lt;asp:ImageButton id="PersonalExtWorkRecordControlIcon" runat="server" ToolTip="&amp;lt;%# GetResourceValue(&amp;quot;Btn:ExpandCollapse&amp;quot;) %&amp;gt;" causesvalidation="False" imageurl="~/images/icon_panelcollapse.gif" /&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dheci</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="PersonalExtWorkRecordControlTitleRegion"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhb</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;img src="../Images/space.gif" alt=""/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dher</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>100%</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="PersonalExtWorkRecordControlTitleRegion" PanelControlName="PersonalExtWorkRecordControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:HTML NAME="PersonalExtWorkTitle"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dhtr</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>valign</Name>
|
||||
<AttributeValue>middle</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="PersonalExtWorkPanel" PanelControlName="PersonalExtWorkRecordControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:PANEL NAME="PersonalExtWorkFields"/&gt;</Value>
|
||||
<CellAttributes />
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dBody</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>width</Name>
|
||||
<AttributeValue>100%</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="PersonalExtWorkFields" Type="RecordGrid" PanelControlName="PersonalExtWorkRecordControl">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="PersonalIdLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="PersonalId"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="BeginDateLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="BeginDate"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="EndDateLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="EndDate"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="CommandDateLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="CommandDate"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="DescriptionLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="Description"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>3</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="PlaceLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="Place"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>3</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDLABEL NAME="CommandLabel"/&gt;</Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>fls</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:FIELDVALUE NAME="Command"/&gt; </Value>
|
||||
<CellAttributes>
|
||||
<Attribute>
|
||||
<Name>class</Name>
|
||||
<AttributeValue>dfv</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>colspan</Name>
|
||||
<AttributeValue>3</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>style</Name>
|
||||
<AttributeValue>white-space:nowrap;</AttributeValue>
|
||||
</Attribute>
|
||||
</CellAttributes>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
<Layout Name="PageButtons" Type="PageButton">
|
||||
<Row>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="SaveButton"/&gt;</Value>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Value>&lt;GEN:BUTTON NAME="CancelButton"/&gt;</Value>
|
||||
</Cell>
|
||||
</Row>
|
||||
<TableAttributes>
|
||||
<Attribute>
|
||||
<Name>cellpadding</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>cellspacing</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<Name>border</Name>
|
||||
<AttributeValue>0</AttributeValue>
|
||||
</Attribute>
|
||||
</TableAttributes>
|
||||
</Layout>
|
||||
</LayoutDefinition></LayoutDefinition>
|
||||
</ComponentDefinition>
|
123
PersonalExtWork/EditPersonalExtWorkTable.aspx
Normal file
123
PersonalExtWork/EditPersonalExtWorkTable.aspx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonalExtWorkTable.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.EditPersonalExtWorkTable" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonalExtWorkTable" %>
|
||||
|
||||
<%@ 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:PersonalExtWorkTableControl runat="server" id="PersonalExtWorkTableControl"> <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="PersonalExtWorkTableControlPanelExtender" runat="server" TargetControlid="PersonalExtWorkTableControlCollapsibleRegion" ExpandControlID="PersonalExtWorkTableControlIcon" CollapseControlID="PersonalExtWorkTableControlIcon" ImageControlID="PersonalExtWorkTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonalExtWorkTableControlIcon" 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="PersonalExtWorkTitle" Text="<%#String.Concat("Personal Ext Work") %>"> </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="PersonalExtWorkTableControlCollapsibleRegion" 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("PersonalExtWorkSearchButton"))%>
|
||||
<asp:TextBox runat="server" id="PersonalExtWorkSearch" columns="50" cssclass="Search_Input"> </asp:TextBox>
|
||||
<asp:AutoCompleteExtender id="PersonalExtWorkSearchAutoCompleteExtender" runat="server" TargetControlID="PersonalExtWorkSearch" ServiceMethod="GetAutoCompletionList_PersonalExtWorkSearch" MinimumPrefixLength="2" CompletionInterval="700" CompletionSetCount="10" CompletionListCssClass="autotypeahead_completionListElement" CompletionListItemCssClass="autotypeahead_listItem " CompletionListHighlightedItemCssClass="autotypeahead_highlightedListItem">
|
||||
</asp:AutoCompleteExtender>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalExtWorkSearchButton"))%>
|
||||
</td><td class="filbc"><Persons:ThemeButton runat="server" id="PersonalExtWorkSearchButton" button-causesvalidation="False" button-commandname="Search" button-text="<%# GetResourceValue("Btn:SearchGoButtonText", "Persons") %>"></Persons:ThemeButton></td></tr><tr><td class="fila"><asp:Literal runat="server" id="PersonalIdLabel" Text="Personal"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
<asp:DropDownList runat="server" id="PersonalIdFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
</td><td class="filbc" rowspan="2"></td></tr><tr><td class="fila"><asp:Literal runat="server" id="DescriptionLabel" Text="รายการปฏิบัติงาน"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
<asp:DropDownList runat="server" id="DescriptionFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
</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="PersonalExtWorkAddButton" 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="PersonalExtWorkEditButton" 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="PersonalExtWorkDeleteButton" 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="PersonalExtWorkSaveButton" 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="PersonalExtWorkRefreshButton" 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="PersonalExtWorkResetButton" 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="PersonalExtWorkPagination"></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="PersonalExtWorkToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="PersonalIdLabel1" Text="Personal" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="DescriptionLabel1" Text="รายการปฏิบัติงาน" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="PlaceLabel" Text="ที่" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="BeginDateLabel" 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="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="PersonalExtWorkTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalExtWorkTableControlRow runat="server" id="PersonalExtWorkTableControlRow">
|
||||
<tr><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalExtWorkRowViewButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_view.gif" tooltip="<%# GetResourceValue("Txt:ViewRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalExtWorkRowEditButton" 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="PersonalExtWorkRowDeleteButton" 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="PersonalExtWorkRecordRowSelection" onclick="moveToThisTableRow(this);"> </asp:CheckBox></td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="PersonalId" Columns="13" MaxLength="13" cssclass="field_input"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" id="PersonalIdRequiredFieldValidator" ControlToValidate="PersonalId" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "Personal") %>" enabled="True" text="*"></asp:RequiredFieldValidator>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="PersonalIdTextBoxMaxLengthValidator" ControlToValidate="PersonalId" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "Personal") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Description" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="DescriptionTextBoxMaxLengthValidator" ControlToValidate="Description" 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="Place" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="PlaceTextBoxMaxLengthValidator" ControlToValidate="Place" 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="BeginDate" Columns="20" MaxLength="20" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="BeginDateCalendarExtender" TargetControlID="BeginDate" CssClass="MyCalendar" Format="d MMM yyyy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="BeginDateTextBoxMaxLengthValidator" ControlToValidate="BeginDate" 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;">
|
||||
<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>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" 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="Command" MaxLength="255" columns="60" cssclass="field_input" rows="5" textmode="MultiLine"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" 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="CommandDate" Columns="20" MaxLength="20" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="CommandDateCalendarExtender" TargetControlID="CommandDate" CssClass="MyCalendar" Format="d MMM yyyy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td></tr></Persons:PersonalExtWorkTableControlRow>
|
||||
</ITEMTEMPLATE>
|
||||
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonalExtWorkTableControl>
|
||||
|
||||
</td></tr></table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"></div>
|
||||
<asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"></asp:ValidationSummary>
|
||||
</asp:Content>
|
||||
|
499
PersonalExtWork/EditPersonalExtWorkTable.aspx.vb
Normal file
499
PersonalExtWork/EditPersonalExtWorkTable.aspx.vb
Normal file
|
@ -0,0 +1,499 @@
|
|||
|
||||
' This file implements the code-behind class for EditPersonalExtWorkTable.aspx.
|
||||
' App_Code\EditPersonalExtWorkTable.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 EditPersonalExtWorkTable
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the EditPersonalExtWorkTable 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_PersonalExtWorkSearch(ByVal prefixText As String, ByVal count As Integer) As String()
|
||||
' GetPersonalExtWorkSearchCompletionList 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_PersonalExtWorkSearch()
|
||||
' or replace the call to GetAutoCompletionList_PersonalExtWorkSearch().
|
||||
Return GetAutoCompletionList_PersonalExtWorkSearch_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 Ext Work"
|
||||
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.PersonalExtWorkTableControl.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_PersonalExtWorkSearch_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.EditPersonalExtWorkTable.PersonalExtWorkTableControl
|
||||
control = new Persons.UI.Controls.EditPersonalExtWorkTable.PersonalExtWorkTableControl()
|
||||
|
||||
Return control.GetAutoCompletionList_PersonalExtWorkSearch(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.PersonalExtWorkTableControl.LoadData()
|
||||
Me.PersonalExtWorkTableControl.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 = "PersonalExtWorkMenuItem"
|
||||
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
|
||||
|
1926
PersonalExtWork/EditPersonalExtWorkTable.xml
Normal file
1926
PersonalExtWork/EditPersonalExtWorkTable.xml
Normal file
File diff suppressed because it is too large
Load diff
110
PersonalExtWork/EditPersonalExtWorkTable2.aspx
Normal file
110
PersonalExtWork/EditPersonalExtWorkTable2.aspx
Normal file
|
@ -0,0 +1,110 @@
|
|||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="EditPersonalExtWorkTable2.aspx.vb" Culture="th-TH" MasterPageFile="..\Master Pages\HorPersonalmenu.master" Inherits="Persons.UI.EditPersonalExtWorkTable2" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.EditPersonalExtWorkTable2" %>
|
||||
|
||||
<%@ 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:PersonalExtWorkTableControl runat="server" id="PersonalExtWorkTableControl"> <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="PersonalExtWorkTableControlPanelExtender" runat="server" TargetControlid="PersonalExtWorkTableControlCollapsibleRegion" ExpandControlID="PersonalExtWorkTableControlIcon" CollapseControlID="PersonalExtWorkTableControlIcon" ImageControlID="PersonalExtWorkTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonalExtWorkTableControlIcon" 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="PersonalExtWorkTitle" Text="<%#String.Concat("Personal Ext Work") %>"> </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="PersonalExtWorkTableControlCollapsibleRegion" 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="PersonalExtWorkAddButton" 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="PersonalExtWorkEditButton" 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="PersonalExtWorkDeleteButton" 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="PersonalExtWorkSaveButton" 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="PersonalExtWorkRefreshButton" 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="PersonalExtWorkResetButton" 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="PersonalExtWorkPagination"></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="2"><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="PersonalExtWorkToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="DescriptionLabel1" Text="รายการปฏิบัติงาน" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="PlaceLabel" Text="ที่" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="ActiveLabel" Text="งานปัจจุบัน" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="BeginDateLabel" 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="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="PersonalExtWorkTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalExtWorkTableControlRow runat="server" id="PersonalExtWorkTableControlRow">
|
||||
<tr><td class="ticnb" scope="row"></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalExtWorkRowDeleteButton" 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="PersonalExtWorkRecordRowSelection" onclick="moveToThisTableRow(this);"> </asp:CheckBox></td><td class="ttc" style="white-space:nowrap;"><span style="white-space:nowrap;">
|
||||
<asp:TextBox runat="server" id="Description" MaxLength="255" columns="41" cssclass="field_input" rows="5"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" id="DescriptionRequiredFieldValidator" ControlToValidate="Description" ErrorMessage="<%# GetResourceValue("Val:ValueIsRequired", "Persons").Replace("{FieldName}", "รายการปฏิบัติงาน") %>" enabled="True" text="*"></asp:RequiredFieldValidator>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="DescriptionTextBoxMaxLengthValidator" ControlToValidate="Description" 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>
|
||||
<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="Place" MaxLength="255" columns="20" cssclass="field_input" rows="5"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="PlaceTextBoxMaxLengthValidator" ControlToValidate="Place" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ที่") %>"></BaseClasses:TextBoxMaxLengthValidator></span>
|
||||
</td><td class="ttc"><asp:CheckBox runat="server" id="Active"></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="BeginDate" MaxLength="20" columns="11" cssclass="field_input" dataformat="d MMM yyyy"></asp:TextBox></td>
|
||||
<td>
|
||||
<Selectors:CalendarExtendarClass runat="server" ID="BeginDateCalendarExtender" TargetControlID="BeginDate" CssClass="MyCalendar" Format="d MMM yyyy">
|
||||
</Selectors:CalendarExtendarClass>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="BeginDateTextBoxMaxLengthValidator" ControlToValidate="BeginDate" 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;">
|
||||
<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>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="EndDateTextBoxMaxLengthValidator" ControlToValidate="EndDate" 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="Command" MaxLength="255" columns="20" cssclass="field_input" rows="5"></asp:TextBox>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandTextBoxMaxLengthValidator" ControlToValidate="Command" 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="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>
|
||||
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="CommandDateTextBoxMaxLengthValidator" ControlToValidate="CommandDate" ErrorMessage="<%# GetResourceValue("Val:ValueTooLong", "Persons").Replace("{FieldName}", "ลงวันที่") %>"></BaseClasses:TextBoxMaxLengthValidator></td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td></tr></Persons:PersonalExtWorkTableControlRow>
|
||||
</ITEMTEMPLATE>
|
||||
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonalExtWorkTableControl>
|
||||
|
||||
</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
PersonalExtWork/EditPersonalExtWorkTable2.aspx.vb
Normal file
488
PersonalExtWork/EditPersonalExtWorkTable2.aspx.vb
Normal file
|
@ -0,0 +1,488 @@
|
|||
|
||||
' This file implements the code-behind class for EditPersonalExtWorkTable2.aspx.
|
||||
' App_Code\EditPersonalExtWorkTable2.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 EditPersonalExtWorkTable2
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the EditPersonalExtWorkTable2 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_PersonalExtWorkSearch(ByVal prefixText As String, ByVal count As Integer) As String()
|
||||
' ' GetPersonalExtWorkSearchCompletionList 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_PersonalExtWorkSearch()
|
||||
' ' or replace the call to GetAutoCompletionList_PersonalExtWorkSearch().
|
||||
' Return GetAutoCompletionList_PersonalExtWorkSearch_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 Ext Work"
|
||||
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.PersonalExtWorkTableControl.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.PersonalExtWorkTableControl.LoadData()
|
||||
Me.PersonalExtWorkTableControl.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
|
||||
|
1612
PersonalExtWork/EditPersonalExtWorkTable2.xml
Normal file
1612
PersonalExtWork/EditPersonalExtWorkTable2.xml
Normal file
File diff suppressed because it is too large
Load diff
52
PersonalExtWork/ShowPersonalExtWork.aspx
Normal file
52
PersonalExtWork/ShowPersonalExtWork.aspx
Normal file
|
@ -0,0 +1,52 @@
|
|||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="ShowPersonalExtWork.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.ShowPersonalExtWork" %>
|
||||
<%@ Register Tagprefix="Persons" TagName="ThemeButton" Src="../Shared/ThemeButton.ascx" %>
|
||||
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.ShowPersonalExtWork" %>
|
||||
|
||||
<%@ 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:PersonalExtWorkRecordControl runat="server" id="PersonalExtWorkRecordControl"> <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="PersonalExtWorkRecordControlPanelExtender" runat="server" TargetControlid="PersonalExtWorkRecordControlCollapsibleRegion" ExpandControlID="PersonalExtWorkRecordControlIcon" CollapseControlID="PersonalExtWorkRecordControlIcon" ImageControlID="PersonalExtWorkRecordControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonalExtWorkRecordControlIcon" 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="PersonalExtWorkTitle" Text="<%#String.Concat("Personal Ext Work") %>"> </asp:Literal></td><td class="dhir"><asp:ImageButton runat="server" id="PersonalExtWorkDialogEditButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/iconEdit.gif" tooltip="<%# GetResourceValue("Btn:Edit", "Persons") %>">
|
||||
</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="PersonalExtWorkRecordControlCollapsibleRegion" runat="server"><table class="dBody" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><asp:panel id="PersonalExtWorkRecordControlPanel" runat="server"><table cellpadding="0" cellspacing="0" border="0"><tr><td class="fls"><asp:Literal runat="server" id="PersonalIdLabel" Text="Personal"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="PersonalId"></asp:Literal> </td><td class="fls"><asp:Literal runat="server" id="BeginDateLabel" Text="ตั้งแต่วันที่"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="BeginDate"></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="CommandDateLabel" Text="ลงวันที่"> </asp:Literal></td><td class="dfv"><asp:Literal runat="server" id="CommandDate"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="DescriptionLabel" Text="รายการปฏิบัติงาน"> </asp:Literal></td><td class="dfv" colspan="3"><asp:Literal runat="server" id="Description"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="PlaceLabel" Text="ที่"> </asp:Literal></td><td class="dfv" colspan="3"><asp:Literal runat="server" id="Place"></asp:Literal> </td></tr><tr><td class="fls"><asp:Literal runat="server" id="CommandLabel" Text="คำสั่ง"> </asp:Literal></td><td class="dfv" colspan="3"><asp:Literal runat="server" id="Command"></asp:Literal> </td></tr></table></asp:panel>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonalExtWorkRecordControl>
|
||||
|
||||
<%= 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="<%# GetResourceValue("Btn:OK", "Persons") %>"></Persons:ThemeButton></td><td><Persons:ThemeButton runat="server" id="EditButton" button-causesvalidation="false" button-commandname="Redirect" button-text="<%# GetResourceValue("Btn:Edit", "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>
|
||||
|
583
PersonalExtWork/ShowPersonalExtWork.aspx.vb
Normal file
583
PersonalExtWork/ShowPersonalExtWork.aspx.vb
Normal file
|
@ -0,0 +1,583 @@
|
|||
|
||||
' This file implements the code-behind class for ShowPersonalExtWork.aspx.
|
||||
' App_Code\ShowPersonalExtWork.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 ShowPersonalExtWork
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the ShowPersonalExtWork 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 Ext Work"
|
||||
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.PersonalExtWorkRecordControl.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.PersonalExtWorkRecordControl.LoadData()
|
||||
Me.PersonalExtWorkRecordControl.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 = "PersonalExtWorkMenuItem"
|
||||
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 = "../PersonalExtWork/EditPersonalExtWork.aspx?PersonalExtWork={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
|
||||
|
1165
PersonalExtWork/ShowPersonalExtWork.xml
Normal file
1165
PersonalExtWork/ShowPersonalExtWork.xml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -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>
|
|
@ -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>
|
80
PersonalExtWork/ShowPersonalExtWorkTable.aspx
Normal file
80
PersonalExtWork/ShowPersonalExtWorkTable.aspx
Normal file
|
@ -0,0 +1,80 @@
|
|||
<%@ Register Tagprefix="Persons" Namespace="Persons.UI.Controls.ShowPersonalExtWorkTable" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Tagprefix="Selectors" Namespace="Persons" %>
|
||||
|
||||
<%@ Register Tagprefix="Persons" TagName="Pagination" Src="../Shared/Pagination.ascx" %>
|
||||
|
||||
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeFile="ShowPersonalExtWorkTable.aspx.vb" Culture="th-TH" MasterPageFile="~/Master Pages/HorizontalMenu.master" Inherits="Persons.UI.ShowPersonalExtWorkTable" %>
|
||||
<%@ 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:PersonalExtWorkTableControl runat="server" id="PersonalExtWorkTableControl"> <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="PersonalExtWorkTableControlPanelExtender" runat="server" TargetControlid="PersonalExtWorkTableControlCollapsibleRegion" ExpandControlID="PersonalExtWorkTableControlIcon" CollapseControlID="PersonalExtWorkTableControlIcon" ImageControlID="PersonalExtWorkTableControlIcon" ExpandedImage="~/images/icon_panelcollapse.gif" CollapsedImage="~/images/icon_panelexpand.gif" SuppressPostBack="true" />
|
||||
<asp:ImageButton id="PersonalExtWorkTableControlIcon" 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="PersonalExtWorkTitle" Text="<%#String.Concat("Personal Ext Work") %>"> </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="PersonalExtWorkTableControlCollapsibleRegion" 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("PersonalExtWorkSearchButton"))%>
|
||||
<asp:TextBox runat="server" id="PersonalExtWorkSearch" columns="50" cssclass="Search_Input"> </asp:TextBox>
|
||||
<asp:AutoCompleteExtender id="PersonalExtWorkSearchAutoCompleteExtender" runat="server" TargetControlID="PersonalExtWorkSearch" ServiceMethod="GetAutoCompletionList_PersonalExtWorkSearch" MinimumPrefixLength="2" CompletionInterval="700" CompletionSetCount="10" CompletionListCssClass="autotypeahead_completionListElement" CompletionListItemCssClass="autotypeahead_listItem " CompletionListHighlightedItemCssClass="autotypeahead_highlightedListItem">
|
||||
</asp:AutoCompleteExtender>
|
||||
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalExtWorkSearchButton"))%>
|
||||
</td><td class="filbc"><Persons:ThemeButton runat="server" id="PersonalExtWorkSearchButton" button-causesvalidation="False" button-commandname="Search" button-text="<%# GetResourceValue("Btn:SearchGoButtonText", "Persons") %>"></Persons:ThemeButton></td></tr><tr><td class="fila"><asp:Literal runat="server" id="PersonalIdLabel" Text="Personal"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
<asp:DropDownList runat="server" id="PersonalIdFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
</td><td class="filbc" rowspan="2"></td></tr><tr><td class="fila"><asp:Literal runat="server" id="DescriptionLabel" Text="รายการปฏิบัติงาน"> </asp:Literal></td><td><%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
<asp:DropDownList runat="server" id="DescriptionFilter" autopostback="True" cssclass="Filter_Input" onkeypress="dropDownListTypeAhead(this,false)"> </asp:DropDownList><%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("PersonalExtWorkFilterButton"))%>
|
||||
</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="PersonalExtWorkNewButton" causesvalidation="false" commandname="Redirect" 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="PersonalExtWorkEditButton" 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="PersonalExtWorkCopyButton" causesvalidation="false" commandname="Redirect" imageurl="../Images/ButtonBarCopy.gif" onmouseout="this.src='../Images/ButtonBarCopy.gif'" onmouseover="this.src='../Images/ButtonBarCopyOver.gif'" tooltip="<%# GetResourceValue("Btn:Copy", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalExtWorkDeleteButton" causesvalidation="false" 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="PersonalExtWorkPDFButton" causesvalidation="false" commandname="ReportData" imageurl="../Images/ButtonBarPDFExport.gif" onmouseout="this.src='../Images/ButtonBarPDFExport.gif'" onmouseover="this.src='../Images/ButtonBarPDFExportOver.gif'" tooltip="<%# GetResourceValue("Btn:PDF", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalExtWorkWordButton" causesvalidation="false" commandname="ExportToWord" imageurl="../Images/ButtonBarWordExport.gif" onmouseout="this.src='../Images/ButtonBarWordExport.gif'" onmouseover="this.src='../Images/ButtonBarWordExportOver.gif'" tooltip="<%# GetResourceValue("Btn:Word", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalExtWorkExportExcelButton" causesvalidation="false" commandname="ExportDataExcel" imageurl="../Images/ButtonBarExcelExport.gif" onmouseout="this.src='../Images/ButtonBarExcelExport.gif'" onmouseover="this.src='../Images/ButtonBarExcelExportOver.gif'" tooltip="<%# GetResourceValue("Btn:ExportExcel", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalExtWorkExportCSVButton" causesvalidation="false" commandname="ExportData" imageurl="../Images/ButtonBarCSVExport.gif" onmouseout="this.src='../Images/ButtonBarCSVExport.gif'" onmouseover="this.src='../Images/ButtonBarCSVExportOver.gif'" tooltip="<%# GetResourceValue("Btn:Export", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalExtWorkImportButton" causesvalidation="false" commandname="ImportCSV" imageurl="../Images/ButtonBarImport.gif" onmouseout="this.src='../Images/ButtonBarImport.gif'" onmouseover="this.src='../Images/ButtonBarImportOver.gif'" tooltip="<%# GetResourceValue("Btn:Import", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="prbbc"><asp:ImageButton runat="server" id="PersonalExtWorkRefreshButton" 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="PersonalExtWorkResetButton" 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="PersonalExtWorkPagination"></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="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="PersonalExtWorkToggleAll" onclick="toggleAllCheckboxes(this);"> </asp:CheckBox></th><th class="thc" scope="col"><asp:LinkButton runat="server" id="PersonalIdLabel1" Text="Personal" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="DescriptionLabel1" Text="รายการปฏิบัติงาน" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="PlaceLabel" Text="ที่" CausesValidation="False"> </asp:LinkButton>
|
||||
</th><th class="thc" scope="col"><asp:LinkButton runat="server" id="BeginDateLabel" 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="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="PersonalExtWorkTableControlRepeater"> <ITEMTEMPLATE> <Persons:PersonalExtWorkTableControlRow runat="server" id="PersonalExtWorkTableControlRow">
|
||||
<tr><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalExtWorkRowViewButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_view.gif" tooltip="<%# GetResourceValue("Txt:ViewRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalExtWorkRowEditButton" 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="PersonalExtWorkRowCopyButton" causesvalidation="False" commandname="Redirect" cssclass="button_link" imageurl="../Images/icon_copy.gif" tooltip="<%# GetResourceValue("Txt:CopyRecord", "Persons") %>">
|
||||
</asp:ImageButton></td><td class="ticnb" scope="row"><asp:ImageButton runat="server" id="PersonalExtWorkRowDeleteButton" causesvalidation="False" 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="PersonalExtWorkRecordRowSelection" onclick="moveToThisTableRow(this);"> </asp:CheckBox></td><td class="ttc"><asp:Literal runat="server" id="PersonalId"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Description"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="Place"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="BeginDate"></asp:Literal> </td><td class="ttc"><asp:Literal runat="server" id="EndDate"></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:PersonalExtWorkTableControlRow>
|
||||
</ITEMTEMPLATE>
|
||||
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
</asp:panel></td></tr></table>
|
||||
</Persons:PersonalExtWorkTableControl>
|
||||
|
||||
</td></tr></table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="detailPopup" class="detailRolloverPopup" onmouseout="detailRolloverPopupClose();" onmouseover="clearTimeout(gPopupTimer);"></div>
|
||||
<asp:ValidationSummary id="ValidationSummary1" ShowMessageBox="true" ShowSummary="false" runat="server"></asp:ValidationSummary>
|
||||
</asp:Content>
|
||||
|
499
PersonalExtWork/ShowPersonalExtWorkTable.aspx.vb
Normal file
499
PersonalExtWork/ShowPersonalExtWorkTable.aspx.vb
Normal file
|
@ -0,0 +1,499 @@
|
|||
|
||||
' This file implements the code-behind class for ShowPersonalExtWorkTable.aspx.
|
||||
' App_Code\ShowPersonalExtWorkTable.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 ShowPersonalExtWorkTable
|
||||
Inherits BaseApplicationPage
|
||||
' Code-behind class for the ShowPersonalExtWorkTable 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_PersonalExtWorkSearch(ByVal prefixText As String, ByVal count As Integer) As String()
|
||||
' GetPersonalExtWorkSearchCompletionList 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_PersonalExtWorkSearch()
|
||||
' or replace the call to GetAutoCompletionList_PersonalExtWorkSearch().
|
||||
Return GetAutoCompletionList_PersonalExtWorkSearch_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("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 Ext Work"
|
||||
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.PersonalExtWorkTableControl.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_PersonalExtWorkSearch_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.ShowPersonalExtWorkTable.PersonalExtWorkTableControl
|
||||
control = new Persons.UI.Controls.ShowPersonalExtWorkTable.PersonalExtWorkTableControl()
|
||||
|
||||
Return control.GetAutoCompletionList_PersonalExtWorkSearch(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.PersonalExtWorkTableControl.LoadData()
|
||||
Me.PersonalExtWorkTableControl.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 = "PersonalExtWorkMenuItem"
|
||||
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
|
||||
|
2317
PersonalExtWork/ShowPersonalExtWorkTable.xml
Normal file
2317
PersonalExtWork/ShowPersonalExtWorkTable.xml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue