Imports CAMS_BL
Imports CAMS_ADMIN
Imports System.Data
Imports System.Text
Imports System.Globalization

Public Class frmFilters
    'Inherits CAMSBasePage
    Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object
    Protected WithEvents txtYearEnd As System.Web.UI.WebControls.TextBox
    Protected WithEvents btnCancel As System.Web.UI.WebControls.Button
    Protected WithEvents txtYearIni As System.Web.UI.WebControls.TextBox
    Protected WithEvents ddlQuarter As System.Web.UI.WebControls.DropDownList
    '//Protected WithEvents btnExport As System.Web.UI.HtmlControls.HtmlInputButton
    Protected WithEvents ddlField As System.Web.UI.WebControls.DropDownList

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        
        'LoadControls()
        'DefaultControlValue()
        'Me.txtYearIni.Attributes.Add("onKeyPress", "fnOnlyDigits(event,'decNO')")
        'Me.txtYearEnd.Attributes.Add("onKeyPress", "fnOnlyDigits(event,'decNO')")
        'txtYearIni.Attributes.Add("onblur", "ValidateYear()")
        'txtYearEnd.Attributes.Add("onblur", "ValidateYear()")

        'Added by Raul Callupe
        If Me.IsPostBack = False Then
            Dim stbOutput As New StringBuilder
            stbOutput.Append("<script language='Javascript'>")
            stbOutput.Append("var pag = window.parent.frames(0);")
            stbOutput.Append("pag.document.all.lblPath.innerHTML='Spreadsheet/ExportQuery'")
            stbOutput.Append("</script>")
            Response.Write(stbOutput.ToString)
        End If
        'End Added

    End Sub

    'Private Sub LoadControls()
        'Dim oCC_Case As New CC_Case
        'Dim dsData As DataSet
        'Try
        '    dsData = oCC_Case.GetDataForControls
        '    If Not dsData Is Nothing Then
                'Util.FillDropDownList(dsData.Tables("STATUS").DefaultView, ddlStatus, "IDSEQUENCE", "STATUS", True, "All")
                'Util.FillDropDownList(dsData.Tables("QUARTERS").DefaultView, ddlQuarter, "IDSEQUENCE", "IDSEQUENCE", True, "All")
        '    End If
        'Catch
        'End Try
        'End Sub


    'Private Sub DefaultControlValue()

    '    Me.txtYearIni.Text = Date.Today.Year
    '    Me.txtYearEnd.Text = Date.Today.Year + 1

    '    If ddlQuarter.Items.Count > 0 Then
    '        If Date.Today.Month.ToString >= 4 And Date.Today.Month.ToString <= 6 Then
    '            Util.SelectValueFromDropDown(ddlQuarter, "Q1")
    '        ElseIf Date.Today.Month.ToString >= 7 And Date.Today.Month.ToString <= 9 Then
    '            Util.SelectValueFromDropDown(ddlQuarter, "Q2")
    '        ElseIf Date.Today.Month.ToString >= 8 And Date.Today.Month.ToString <= 12 Then
    '            Util.SelectValueFromDropDown(ddlQuarter, "Q3")
    '        ElseIf Date.Today.Month.ToString >= 1 And Date.Today.Month.ToString <= 3 Then
    '            Util.SelectValueFromDropDown(ddlQuarter, "Q4")
    '            Me.txtYearIni.Text = Date.Today.Year - 1
    '            Me.txtYearEnd.Text = Date.Today.Year
    '        End If
    '    End If
    'End Sub




End Class

