home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / ltgFixtureMasterview.aspx.vb < prev    next >
Text File  |  2014-01-25  |  18KB  |  602 lines

  1. Imports System.Data
  2. Imports System.Data.Common
  3. Imports System.Xml
  4. Imports System.IO
  5. Imports System.Data.OleDb
  6.  
  7. '
  8. ' ASP.NET code-behind class (Page)
  9. '
  10.  
  11. Partial Class ltgFixtureMasterview
  12.     Inherits AspNetMaker7_tfpssnet
  13.  
  14.     ' Page object
  15.     Public ltgFixtureMaster_view As cltgFixtureMaster_view
  16.  
  17.     '
  18.     ' Page Class
  19.     '
  20.     Class cltgFixtureMaster_view
  21.         Inherits AspNetMakerPage
  22.         Implements IDisposable        
  23.  
  24.         ' Used by system generated functions
  25.         Private RsWrk As Object, sSqlWrk As String, sWhereWrk As String
  26.  
  27.         Private arwrk As Object
  28.  
  29.         Private armultiwrk() As String        
  30.  
  31.         ' Page URL
  32.         Public ReadOnly Property PageUrl() As String
  33.             Get
  34.                 Dim Url As String = ew_CurrentPage() & "?"
  35.                 If ltgFixtureMaster.UseTokenInUrl Then Url = Url & "t=" & ltgFixtureMaster.TableVar & "&" ' Add page token
  36.                 Return Url    
  37.             End Get
  38.         End Property
  39.  
  40.         ' Validate page request
  41.         Public Function IsPageRequest() As Boolean
  42.             Dim Result As Boolean
  43.             If ltgFixtureMaster.UseTokenInUrl Then
  44.                 Result = False
  45.                 If ObjForm IsNot Nothing Then
  46.                     Result = (ltgFixtureMaster.TableVar = ObjForm.GetValue("t"))
  47.                 End If
  48.                 If ew_Get("t") <> "" Then
  49.                     Result = (ltgFixtureMaster.TableVar = ew_Get("t"))
  50.                 End If
  51.                 Return Result
  52.             End If
  53.             Return True            
  54.         End Function    
  55.  
  56.         ' ltgFixtureMaster
  57.         Public Property ltgFixtureMaster() As cltgFixtureMaster
  58.             Get                
  59.                 Return ParentPage.ltgFixtureMaster
  60.             End Get
  61.             Set(ByVal v As cltgFixtureMaster)
  62.                 ParentPage.ltgFixtureMaster = v    
  63.             End Set    
  64.         End Property
  65.  
  66.         ' ltgFixtureMaster
  67.         Public Property tblEmployees() As ctblEmployees
  68.             Get                
  69.                 Return ParentPage.tblEmployees
  70.             End Get
  71.             Set(ByVal v As ctblEmployees)
  72.                 ParentPage.tblEmployees = v    
  73.             End Set    
  74.         End Property
  75.  
  76.         '
  77.         '  Constructor
  78.         '  - init objects
  79.         '  - open connection
  80.         '
  81.         Public Sub New(ByRef APage As AspNetMaker7_tfpssnet)                
  82.             m_ParentPage = APage
  83.             m_Page = Me    
  84.             m_PageID = "view"
  85.             m_PageObjName = "ltgFixtureMaster_view"
  86.             m_PageObjTypeName = "cltgFixtureMaster_view"
  87.  
  88.             ' Table Name
  89.             m_TableName = "ltgFixtureMaster"
  90.  
  91.             ' Initialize table object
  92.             ltgFixtureMaster = New cltgFixtureMaster(Me)
  93.             tblEmployees = New ctblEmployees(Me)
  94.  
  95.             ' Connect to database
  96.             Conn = New cConnection()
  97.         End Sub
  98.  
  99.         '
  100.         '  Subroutine Page_Init
  101.         '  - called before page main
  102.         '  - check Security
  103.         '  - set up response header
  104.         '  - call page load events
  105.         '
  106.         Public Sub Page_Init()
  107.             Security = New cAdvancedSecurity(Me)
  108.             If Not Security.IsLoggedIn() Then Security.AutoLogin()
  109.             If Not Security.IsLoggedIn() Then
  110.                 Security.SaveLastUrl()
  111.                 Page_Terminate("login.aspx")
  112.             End If
  113.  
  114.             ' Table Permission loading event
  115.             Security.TablePermission_Loading()
  116.             Security.LoadCurrentUserLevel(TableName)
  117.  
  118.             ' Table Permission loaded event
  119.             Security.TablePermission_Loaded()
  120.             If Not Security.CanView Then
  121.                 Security.SaveLastUrl()
  122.                 Page_Terminate("ltgFixtureMasterlist.aspx")
  123.             End If
  124.  
  125.             ' User ID loading event
  126.             Security.UserID_Loading()
  127.             If Security.IsLoggedIn() Then Call Security.LoadUserID()
  128.  
  129.             ' User ID loaded event
  130.             Security.UserID_Loaded()
  131.  
  132.             ' Global page loading event (in ewglobal*.vb)
  133.             ParentPage.Page_Loading()
  134.  
  135.             ' Page load event, used in current page
  136.             Page_Load()
  137.         End Sub
  138.  
  139.         '
  140.         '  Class terminate
  141.         '  - clean up page object
  142.         '
  143.         Public Sub Dispose() Implements IDisposable.Dispose
  144.             Page_Terminate("")
  145.         End Sub
  146.  
  147.         '
  148.         '  Sub Page_Terminate
  149.         '  - called when exit page
  150.         '  - clean up connection and objects
  151.         '  - if URL specified, redirect to URL
  152.         '
  153.         Sub Page_Terminate(url As String)
  154.  
  155.             ' Page unload event, used in current page
  156.             Page_Unload()
  157.  
  158.             ' Global page unloaded event (in ewglobal*.vb)
  159.             ParentPage.Page_Unloaded()
  160.  
  161.             ' Close connection
  162.             Conn.Dispose()
  163.             Security = Nothing
  164.             ltgFixtureMaster.Dispose()
  165.             tblEmployees.Dispose()
  166.  
  167.             ' Go to URL if specified
  168.             If url <> "" Then
  169.                 HttpContext.Current.Response.Clear()
  170.                 HttpContext.Current.Response.Redirect(url)
  171.             End If
  172.         End Sub
  173.  
  174.     Public lDisplayRecs As Integer ' Number of display records
  175.  
  176.     Public lStartRec As Integer, lStopRec As Integer, lTotalRecs As Integer, lRecRange As Integer
  177.  
  178.     Public lRecCnt As Integer
  179.  
  180.     Public sSrchWhere As String
  181.  
  182.     '
  183.     ' Page main processing
  184.     '
  185.     Sub Page_Main()
  186.         Dim sReturnUrl As String = ""
  187.         Dim bMatchRecord As Boolean = False
  188.         If IsPageRequest Then ' Validate request
  189.             If ew_Get("lfxID") <> "" Then
  190.                 ltgFixtureMaster.lfxID.QueryStringValue = ew_Get("lfxID")
  191.             Else
  192.                 sReturnUrl = "ltgFixtureMasterlist.aspx" ' Return to list
  193.             End If
  194.  
  195.             ' Get action
  196.             ltgFixtureMaster.CurrentAction = "I" ' Display form
  197.             Select Case ltgFixtureMaster.CurrentAction
  198.                 Case "I" ' Get a record to display
  199.                     If Not LoadRow() Then ' Load record based on key
  200.                         Message = "No records found" ' Set no record message
  201.                         sReturnUrl = "ltgFixtureMasterlist.aspx" ' No matching record, return to list
  202.                     End If
  203.             End Select
  204.         Else
  205.             sReturnUrl = "ltgFixtureMasterlist.aspx" ' Not page request, return to list
  206.         End If
  207.         If sReturnUrl <> "" Then Page_Terminate(sReturnUrl)
  208.  
  209.         ' Render row
  210.         ltgFixtureMaster.RowType = EW_ROWTYPE_VIEW
  211.         RenderRow()
  212.     End Sub
  213.  
  214.     Public Pager As Object
  215.  
  216.     '
  217.     ' Set up Starting Record parameters
  218.     '
  219.     Sub SetUpStartRec()
  220.         Dim nPageNo As Integer
  221.  
  222.         ' Exit if lDisplayRecs = 0
  223.         If lDisplayRecs = 0 Then Exit Sub
  224.         If IsPageRequest Then ' Validate request
  225.  
  226.             ' Check for a "start" parameter
  227.             If ew_Get(EW_TABLE_START_REC) <> "" AndAlso IsNumeric(ew_Get(EW_TABLE_START_REC)) Then
  228.                 lStartRec = ew_ConvertToInt(ew_Get(EW_TABLE_START_REC))
  229.                 ltgFixtureMaster.StartRecordNumber = lStartRec
  230.             ElseIf ew_Get(EW_TABLE_PAGE_NO) <> "" AndAlso IsNumeric(ew_Get(EW_TABLE_PAGE_NO)) Then
  231.                 nPageNo = ew_ConvertToInt(ew_Get(EW_TABLE_PAGE_NO))
  232.                 lStartRec = (nPageNo-1)*lDisplayRecs+1
  233.                 If lStartRec <= 0 Then
  234.                     lStartRec = 1
  235.                 ElseIf lStartRec >= ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1 Then
  236.                     lStartRec = ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1
  237.                 End If
  238.                 ltgFixtureMaster.StartRecordNumber = lStartRec
  239.             End If
  240.         End If
  241.         lStartRec = ltgFixtureMaster.StartRecordNumber
  242.  
  243.         ' Check if correct start record counter
  244.         If lStartRec <= 0 Then ' Avoid invalid start record counter
  245.             lStartRec = 1 ' Reset start record counter
  246.             ltgFixtureMaster.StartRecordNumber = lStartRec
  247.         ElseIf lStartRec > lTotalRecs Then ' Avoid starting record > total records
  248.             lStartRec = ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1 ' Point to last page first record
  249.             ltgFixtureMaster.StartRecordNumber = lStartRec
  250.         ElseIf (lStartRec-1) Mod lDisplayRecs <> 0 Then
  251.             lStartRec = ((lStartRec-1)\lDisplayRecs)*lDisplayRecs+1 ' Point to page boundary
  252.             ltgFixtureMaster.StartRecordNumber = lStartRec
  253.         End If
  254.     End Sub
  255.  
  256.     '
  257.     ' Load default values
  258.     '
  259.     Sub LoadDefaultValues()
  260.     End Sub
  261.  
  262.     '
  263.     ' Load row based on key values
  264.     '
  265.     Function LoadRow() As Boolean
  266.         Dim RsRow As OleDbDataReader
  267.         Dim sFilter As String = ltgFixtureMaster.KeyFilter
  268.  
  269.         ' Row Selecting event
  270.         ltgFixtureMaster.Row_Selecting(sFilter)
  271.  
  272.         ' Load SQL based on filter
  273.         ltgFixtureMaster.CurrentFilter = sFilter
  274.         Dim sSql As String = ltgFixtureMaster.SQL
  275.  
  276.         ' Write SQL for debug
  277.         If EW_DEBUG_ENABLED Then ew_Write(sSql)
  278.         Try
  279.             RsRow = Conn.GetTempDataReader(sSql)    
  280.             If Not RsRow.Read() Then
  281.                 Return False
  282.             Else                
  283.                 LoadRowValues(RsRow) ' Load row values
  284.  
  285.                 ' Row Selected event
  286.                 ltgFixtureMaster.Row_Selected(RsRow)
  287.                 Return True    
  288.             End If
  289.         Catch
  290.             If EW_DEBUG_ENABLED Then Throw
  291.             Return False
  292.         Finally
  293.             Conn.CloseTempDataReader()
  294.         End Try
  295.     End Function
  296.  
  297.     '
  298.     ' Load row values from recordset
  299.     '
  300.     Sub LoadRowValues(ByRef RsRow As OleDbDataReader)
  301.         ltgFixtureMaster.lfxID.DbValue = RsRow("lfxID")
  302.         ltgFixtureMaster.lfxCode.DbValue = RsRow("lfxCode")
  303.         ltgFixtureMaster.lfxDescription.DbValue = RsRow("lfxDescription")
  304.         ltgFixtureMaster.lfxMFG.DbValue = RsRow("lfxMFG")
  305.         ltgFixtureMaster.lfxModel.DbValue = RsRow("lfxModel")
  306.         ltgFixtureMaster.lfxSerialNumber.DbValue = RsRow("lfxSerialNumber")
  307.         ltgFixtureMaster.lfxLamp.DbValue = RsRow("lfxLamp")
  308.         ltgFixtureMaster.lfxFixtureTypeID.DbValue = RsRow("lfxFixtureTypeID")
  309.         ltgFixtureMaster.lfxLocationID.DbValue = RsRow("lfxLocationID")
  310.         ltgFixtureMaster.lfxChannel.DbValue = RsRow("lfxChannel")
  311.         ltgFixtureMaster.lfxIsActive.DbValue = IIf(ew_ConvertToBool(RsRow("lfxIsActive")), "1", "0")
  312.         ltgFixtureMaster.lfxCreatedBy.DbValue = RsRow("lfxCreatedBy")
  313.         ltgFixtureMaster.lfxCreatedOn.DbValue = RsRow("lfxCreatedOn")
  314.         ltgFixtureMaster.lfxModifiedBy.DbValue = RsRow("lfxModifiedBy")
  315.         ltgFixtureMaster.lfxModifiedOn.DbValue = RsRow("lfxModifiedOn")
  316.     End Sub
  317.  
  318.     '
  319.     ' Render row values based on field settings
  320.     '
  321.     Sub RenderRow()
  322.  
  323.         ' Row Rendering event
  324.         ltgFixtureMaster.Row_Rendering()
  325.  
  326.         '
  327.         '  Common render codes for all row types
  328.         '
  329.         ' lfxCode
  330.  
  331.         ltgFixtureMaster.lfxCode.CellCssStyle = ""
  332.         ltgFixtureMaster.lfxCode.CellCssClass = ""
  333.  
  334.         ' lfxDescription
  335.         ltgFixtureMaster.lfxDescription.CellCssStyle = ""
  336.         ltgFixtureMaster.lfxDescription.CellCssClass = ""
  337.  
  338.         ' lfxMFG
  339.         ltgFixtureMaster.lfxMFG.CellCssStyle = ""
  340.         ltgFixtureMaster.lfxMFG.CellCssClass = ""
  341.  
  342.         ' lfxModel
  343.         ltgFixtureMaster.lfxModel.CellCssStyle = ""
  344.         ltgFixtureMaster.lfxModel.CellCssClass = ""
  345.  
  346.         ' lfxSerialNumber
  347.         ltgFixtureMaster.lfxSerialNumber.CellCssStyle = ""
  348.         ltgFixtureMaster.lfxSerialNumber.CellCssClass = ""
  349.  
  350.         ' lfxLamp
  351.         ltgFixtureMaster.lfxLamp.CellCssStyle = ""
  352.         ltgFixtureMaster.lfxLamp.CellCssClass = ""
  353.  
  354.         ' lfxFixtureTypeID
  355.         ltgFixtureMaster.lfxFixtureTypeID.CellCssStyle = ""
  356.         ltgFixtureMaster.lfxFixtureTypeID.CellCssClass = ""
  357.  
  358.         ' lfxLocationID
  359.         ltgFixtureMaster.lfxLocationID.CellCssStyle = ""
  360.         ltgFixtureMaster.lfxLocationID.CellCssClass = ""
  361.  
  362.         ' lfxChannel
  363.         ltgFixtureMaster.lfxChannel.CellCssStyle = ""
  364.         ltgFixtureMaster.lfxChannel.CellCssClass = ""
  365.  
  366.         ' lfxIsActive
  367.         ltgFixtureMaster.lfxIsActive.CellCssStyle = ""
  368.         ltgFixtureMaster.lfxIsActive.CellCssClass = ""
  369.  
  370.         ' lfxCreatedBy
  371.         ltgFixtureMaster.lfxCreatedBy.CellCssStyle = ""
  372.         ltgFixtureMaster.lfxCreatedBy.CellCssClass = ""
  373.  
  374.         ' lfxCreatedOn
  375.         ltgFixtureMaster.lfxCreatedOn.CellCssStyle = ""
  376.         ltgFixtureMaster.lfxCreatedOn.CellCssClass = ""
  377.  
  378.         ' lfxModifiedBy
  379.         ltgFixtureMaster.lfxModifiedBy.CellCssStyle = ""
  380.         ltgFixtureMaster.lfxModifiedBy.CellCssClass = ""
  381.  
  382.         ' lfxModifiedOn
  383.         ltgFixtureMaster.lfxModifiedOn.CellCssStyle = ""
  384.         ltgFixtureMaster.lfxModifiedOn.CellCssClass = ""
  385.  
  386.         '
  387.         '  View  Row
  388.         '
  389.  
  390.         If ltgFixtureMaster.RowType = EW_ROWTYPE_VIEW Then ' View row
  391.  
  392.             ' lfxID
  393.             ltgFixtureMaster.lfxID.ViewValue = ltgFixtureMaster.lfxID.CurrentValue
  394.             ltgFixtureMaster.lfxID.CssStyle = ""
  395.             ltgFixtureMaster.lfxID.CssClass = ""
  396.             ltgFixtureMaster.lfxID.ViewCustomAttributes = ""
  397.  
  398.             ' lfxCode
  399.             ltgFixtureMaster.lfxCode.ViewValue = ltgFixtureMaster.lfxCode.CurrentValue
  400.             ltgFixtureMaster.lfxCode.CssStyle = ""
  401.             ltgFixtureMaster.lfxCode.CssClass = ""
  402.             ltgFixtureMaster.lfxCode.ViewCustomAttributes = ""
  403.  
  404.             ' lfxDescription
  405.             ltgFixtureMaster.lfxDescription.ViewValue = ltgFixtureMaster.lfxDescription.CurrentValue
  406.             ltgFixtureMaster.lfxDescription.CssStyle = ""
  407.             ltgFixtureMaster.lfxDescription.CssClass = ""
  408.             ltgFixtureMaster.lfxDescription.ViewCustomAttributes = ""
  409.  
  410.             ' lfxMFG
  411.             ltgFixtureMaster.lfxMFG.ViewValue = ltgFixtureMaster.lfxMFG.CurrentValue
  412.             ltgFixtureMaster.lfxMFG.CssStyle = ""
  413.             ltgFixtureMaster.lfxMFG.CssClass = ""
  414.             ltgFixtureMaster.lfxMFG.ViewCustomAttributes = ""
  415.  
  416.             ' lfxModel
  417.             ltgFixtureMaster.lfxModel.ViewValue = ltgFixtureMaster.lfxModel.CurrentValue
  418.             ltgFixtureMaster.lfxModel.CssStyle = ""
  419.             ltgFixtureMaster.lfxModel.CssClass = ""
  420.             ltgFixtureMaster.lfxModel.ViewCustomAttributes = ""
  421.  
  422.             ' lfxSerialNumber
  423.             ltgFixtureMaster.lfxSerialNumber.ViewValue = ltgFixtureMaster.lfxSerialNumber.CurrentValue
  424.             ltgFixtureMaster.lfxSerialNumber.CssStyle = ""
  425.             ltgFixtureMaster.lfxSerialNumber.CssClass = ""
  426.             ltgFixtureMaster.lfxSerialNumber.ViewCustomAttributes = ""
  427.  
  428.             ' lfxLamp
  429.             ltgFixtureMaster.lfxLamp.ViewValue = ltgFixtureMaster.lfxLamp.CurrentValue
  430.             ltgFixtureMaster.lfxLamp.CssStyle = ""
  431.             ltgFixtureMaster.lfxLamp.CssClass = ""
  432.             ltgFixtureMaster.lfxLamp.ViewCustomAttributes = ""
  433.  
  434.             ' lfxFixtureTypeID
  435.             If ew_NotEmpty(ltgFixtureMaster.lfxFixtureTypeID.CurrentValue) Then
  436.                 sSqlWrk = "SELECT [ftyDescription] FROM [ltgFixtureType] WHERE [ftyID] = " & ew_AdjustSql(ltgFixtureMaster.lfxFixtureTypeID.CurrentValue) & ""
  437.                 sSqlWrk = sSqlWrk & " AND (" & "[ftyIsActive] = True" & ")"
  438.                 sSqlWrk = sSqlWrk & " ORDER BY [ftyDescription] "
  439.                 RsWrk = Conn.GetTempDataReader(sSqlWrk)
  440.                 If RsWrk.Read() Then
  441.                     ltgFixtureMaster.lfxFixtureTypeID.ViewValue = RsWrk("ftyDescription")
  442.                 Else
  443.                     ltgFixtureMaster.lfxFixtureTypeID.ViewValue = ltgFixtureMaster.lfxFixtureTypeID.CurrentValue
  444.                 End If
  445.                 Conn.CloseTempDataReader()
  446.             Else
  447.                 ltgFixtureMaster.lfxFixtureTypeID.ViewValue = System.DBNull.Value
  448.             End If
  449.             ltgFixtureMaster.lfxFixtureTypeID.CssStyle = ""
  450.             ltgFixtureMaster.lfxFixtureTypeID.CssClass = ""
  451.             ltgFixtureMaster.lfxFixtureTypeID.ViewCustomAttributes = ""
  452.  
  453.             ' lfxLocationID
  454.             If ew_NotEmpty(ltgFixtureMaster.lfxLocationID.CurrentValue) Then
  455.                 sSqlWrk = "SELECT [floDescription] FROM [ltgFixtureLocation] WHERE [floID] = " & ew_AdjustSql(ltgFixtureMaster.lfxLocationID.CurrentValue) & ""
  456.                 sSqlWrk = sSqlWrk & " AND (" & "[floIsActive]=True" & ")"
  457.                 sSqlWrk = sSqlWrk & " ORDER BY [floDescription] "
  458.                 RsWrk = Conn.GetTempDataReader(sSqlWrk)
  459.                 If RsWrk.Read() Then
  460.                     ltgFixtureMaster.lfxLocationID.ViewValue = RsWrk("floDescription")
  461.                 Else
  462.                     ltgFixtureMaster.lfxLocationID.ViewValue = ltgFixtureMaster.lfxLocationID.CurrentValue
  463.                 End If
  464.                 Conn.CloseTempDataReader()
  465.             Else
  466.                 ltgFixtureMaster.lfxLocationID.ViewValue = System.DBNull.Value
  467.             End If
  468.             ltgFixtureMaster.lfxLocationID.CssStyle = ""
  469.             ltgFixtureMaster.lfxLocationID.CssClass = ""
  470.             ltgFixtureMaster.lfxLocationID.ViewCustomAttributes = ""
  471.  
  472.             ' lfxChannel
  473.             ltgFixtureMaster.lfxChannel.ViewValue = ltgFixtureMaster.lfxChannel.CurrentValue
  474.             ltgFixtureMaster.lfxChannel.CssStyle = ""
  475.             ltgFixtureMaster.lfxChannel.CssClass = ""
  476.             ltgFixtureMaster.lfxChannel.ViewCustomAttributes = ""
  477.  
  478.             ' lfxIsActive
  479.             If Convert.ToString(ltgFixtureMaster.lfxIsActive.CurrentValue) = "1" Then
  480.                 ltgFixtureMaster.lfxIsActive.ViewValue = "Yes"
  481.             Else
  482.                 ltgFixtureMaster.lfxIsActive.ViewValue = "No"
  483.             End If
  484.             ltgFixtureMaster.lfxIsActive.CssStyle = ""
  485.             ltgFixtureMaster.lfxIsActive.CssClass = ""
  486.             ltgFixtureMaster.lfxIsActive.ViewCustomAttributes = ""
  487.  
  488.             ' lfxCreatedBy
  489.             ltgFixtureMaster.lfxCreatedBy.ViewValue = ltgFixtureMaster.lfxCreatedBy.CurrentValue
  490.             ltgFixtureMaster.lfxCreatedBy.CssStyle = ""
  491.             ltgFixtureMaster.lfxCreatedBy.CssClass = ""
  492.             ltgFixtureMaster.lfxCreatedBy.ViewCustomAttributes = ""
  493.  
  494.             ' lfxCreatedOn
  495.             ltgFixtureMaster.lfxCreatedOn.ViewValue = ltgFixtureMaster.lfxCreatedOn.CurrentValue
  496.             ltgFixtureMaster.lfxCreatedOn.ViewValue = ew_FormatDateTime(ltgFixtureMaster.lfxCreatedOn.ViewValue, 6)
  497.             ltgFixtureMaster.lfxCreatedOn.CssStyle = ""
  498.             ltgFixtureMaster.lfxCreatedOn.CssClass = ""
  499.             ltgFixtureMaster.lfxCreatedOn.ViewCustomAttributes = ""
  500.  
  501.             ' lfxModifiedBy
  502.             ltgFixtureMaster.lfxModifiedBy.ViewValue = ltgFixtureMaster.lfxModifiedBy.CurrentValue
  503.             ltgFixtureMaster.lfxModifiedBy.CssStyle = ""
  504.             ltgFixtureMaster.lfxModifiedBy.CssClass = ""
  505.             ltgFixtureMaster.lfxModifiedBy.ViewCustomAttributes = ""
  506.  
  507.             ' lfxModifiedOn
  508.             ltgFixtureMaster.lfxModifiedOn.ViewValue = ltgFixtureMaster.lfxModifiedOn.CurrentValue
  509.             ltgFixtureMaster.lfxModifiedOn.ViewValue = ew_FormatDateTime(ltgFixtureMaster.lfxModifiedOn.ViewValue, 6)
  510.             ltgFixtureMaster.lfxModifiedOn.CssStyle = ""
  511.             ltgFixtureMaster.lfxModifiedOn.CssClass = ""
  512.             ltgFixtureMaster.lfxModifiedOn.ViewCustomAttributes = ""
  513.  
  514.             ' View refer script
  515.             ' lfxCode
  516.  
  517.             ltgFixtureMaster.lfxCode.HrefValue = ""
  518.  
  519.             ' lfxDescription
  520.             ltgFixtureMaster.lfxDescription.HrefValue = ""
  521.  
  522.             ' lfxMFG
  523.             ltgFixtureMaster.lfxMFG.HrefValue = ""
  524.  
  525.             ' lfxModel
  526.             ltgFixtureMaster.lfxModel.HrefValue = ""
  527.  
  528.             ' lfxSerialNumber
  529.             ltgFixtureMaster.lfxSerialNumber.HrefValue = ""
  530.  
  531.             ' lfxLamp
  532.             ltgFixtureMaster.lfxLamp.HrefValue = ""
  533.  
  534.             ' lfxFixtureTypeID
  535.             ltgFixtureMaster.lfxFixtureTypeID.HrefValue = ""
  536.  
  537.             ' lfxLocationID
  538.             ltgFixtureMaster.lfxLocationID.HrefValue = ""
  539.  
  540.             ' lfxChannel
  541.             ltgFixtureMaster.lfxChannel.HrefValue = ""
  542.  
  543.             ' lfxIsActive
  544.             ltgFixtureMaster.lfxIsActive.HrefValue = ""
  545.  
  546.             ' lfxCreatedBy
  547.             ltgFixtureMaster.lfxCreatedBy.HrefValue = ""
  548.  
  549.             ' lfxCreatedOn
  550.             ltgFixtureMaster.lfxCreatedOn.HrefValue = ""
  551.  
  552.             ' lfxModifiedBy
  553.             ltgFixtureMaster.lfxModifiedBy.HrefValue = ""
  554.  
  555.             ' lfxModifiedOn
  556.             ltgFixtureMaster.lfxModifiedOn.HrefValue = ""
  557.         End If
  558.  
  559.         ' Row Rendered event
  560.         ltgFixtureMaster.Row_Rendered()
  561.     End Sub
  562.  
  563.         ' Page Load event
  564.         Public Sub Page_Load()
  565.  
  566.             'HttpContext.Current.Response.Write("Page Load")
  567.         End Sub
  568.  
  569.         ' Page Unload event
  570.         Public Sub Page_Unload()
  571.  
  572.             'HttpContext.Current.Response.Write("Page Unload")
  573.         End Sub
  574.     End Class
  575.  
  576.     '
  577.     ' ASP.NET Page_Load event
  578.     '
  579.  
  580.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  581.         Response.Buffer = EW_RESPONSE_BUFFER
  582.         Response.Cache.SetCacheability(HttpCacheability.NoCache)
  583.  
  584.         ' Page init
  585.         ltgFixtureMaster_view = New cltgFixtureMaster_view(Me)        
  586.         ltgFixtureMaster_view.Page_Init()
  587.  
  588.         ' Page main processing
  589.         ltgFixtureMaster_view.Page_Main()
  590.     End Sub
  591.  
  592.     '
  593.     ' ASP.NET Page_Unload event
  594.     '
  595.  
  596.     Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
  597.  
  598.         ' Dispose page object
  599.         If ltgFixtureMaster_view IsNot Nothing Then ltgFixtureMaster_view.Dispose()
  600.     End Sub
  601. End Class
  602.