<%@ CodePage=1252 %> <% 'Include Common Files @1-14C16D61 %> <% 'End Include Common Files 'Initialize Page @1-DBBDDE10 ' Variables Dim PathToRoot, ScriptPath, TemplateFilePath Dim FileName Dim Redirect Dim Tpl, HTMLTemplate Dim TemplateFileName Dim ComponentName Dim PathToCurrentPage Dim Attributes ' Events Dim CCSEvents Dim CCSEventResult ' Connections Dim DBConnection1 ' Page controls Dim retrase Dim ChildControls Redirect = "" TemplateFileName = "retrase_list.html" Set CCSEvents = CreateObject("Scripting.Dictionary") PathToCurrentPage = "./" FileName = "retrase_list.asp" PathToRoot = "./" ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"), Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName)) TemplateFilePath = ScriptPath 'End Initialize Page 'Initialize Objects @1-334A8CD2 Set DBConnection1 = New clsDBConnection1 DBConnection1.Open Set Attributes = New clsAttributes ' Controls Set retrase = New clsGridretrase retrase.Initialize DBConnection1 CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing) 'End Initialize Objects 'Go to destination page @1-6D35F4FD If NOT ( Redirect = "" ) Then UnloadPage Response.Redirect Redirect End If 'End Go to destination page 'Initialize HTML Template @1-7509502B CCSEventResult = CCRaiseEvent(CCSEvents, "OnInitializeView", Nothing) Set HTMLTemplate = new clsTemplate HTMLTemplate.Encoding = "windows-1252" Set HTMLTemplate.Cache = TemplatesRepository HTMLTemplate.LoadTemplate TemplateFilePath & TemplateFileName HTMLTemplate.SetVar "@CCS_PathToRoot", PathToRoot Set Tpl = HTMLTemplate.Block("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Nothing) 'End Initialize HTML Template 'Show Page @1-91D87F09 Attributes.Show HTMLTemplate, "page:" Set ChildControls = CCCreateCollection(Tpl, Null, ccsParseOverwrite, _ Array(retrase)) ChildControls.Show Dim MainHTML HTMLTemplate.Parse "main", False MainHTML = HTMLTemplate.GetHTML("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeOutput", Nothing) If CCSEventResult Then Response.Write MainHTML 'End Show Page 'Unload Page @1-CB210C62 UnloadPage Set Tpl = Nothing Set HTMLTemplate = Nothing 'End Unload Page 'UnloadPage Sub @1-996D1721 Sub UnloadPage() CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing) If DBConnection1.State = adStateOpen Then _ DBConnection1.Close Set DBConnection1 = Nothing Set CCSEvents = Nothing Set Attributes = Nothing Set retrase = Nothing End Sub 'End UnloadPage Sub Class clsGridretrase 'retrase Class @2-DA520CE5 'retrase Variables @2-534CE385 ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public IsDSEmpty Public ForceIteration Public Attributes Private ShownRecords Public ActiveSorter, SortingDirection Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls Dim Sorter_med_retras Dim Sorter_forma_farmaceutica Dim Sorter_concentratie Dim Sorter_dci Dim Sorter_producator Dim Sorter_act_propusa Dim Sorter_data Dim med_retras Dim forma_farmaceutica Dim concentratie Dim dci Dim producator Dim serie Dim motivul_retragerii Dim act_propusa Dim data Dim Navigator 'End retrase Variables 'retrase Class_Initialize Event @2-5035490F Private Sub Class_Initialize() ComponentName = "retrase" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Attributes = New clsAttributes Set Errors = New clsErrors Set DataSource = New clsretraseDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSLocales.GetText("CCS_GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 20 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CInt(PageNumber) Else Errors.AddError(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If ActiveSorter = CCGetParam("retraseOrder", Empty) SortingDirection = CCGetParam("retraseDir", Empty) If NOT(SortingDirection = "ASC" OR SortingDirection = "DESC") Then _ SortingDirection = Empty Set Sorter_med_retras = CCCreateSorter("Sorter_med_retras", Me, FileName) Set Sorter_forma_farmaceutica = CCCreateSorter("Sorter_forma_farmaceutica", Me, FileName) Set Sorter_concentratie = CCCreateSorter("Sorter_concentratie", Me, FileName) Set Sorter_dci = CCCreateSorter("Sorter_dci", Me, FileName) Set Sorter_producator = CCCreateSorter("Sorter_producator", Me, FileName) Set Sorter_act_propusa = CCCreateSorter("Sorter_act_propusa", Me, FileName) Set Sorter_data = CCCreateSorter("Sorter_data", Me, FileName) Set med_retras = CCCreateControl(ccsLabel, "med_retras", Empty, ccsText, Empty, CCGetRequestParam("med_retras", ccsGet)) Set forma_farmaceutica = CCCreateControl(ccsLabel, "forma_farmaceutica", Empty, ccsText, Empty, CCGetRequestParam("forma_farmaceutica", ccsGet)) Set concentratie = CCCreateControl(ccsLabel, "concentratie", Empty, ccsText, Empty, CCGetRequestParam("concentratie", ccsGet)) Set dci = CCCreateControl(ccsLabel, "dci", Empty, ccsText, Empty, CCGetRequestParam("dci", ccsGet)) Set producator = CCCreateControl(ccsLabel, "producator", Empty, ccsText, Empty, CCGetRequestParam("producator", ccsGet)) Set serie = CCCreateControl(ccsLabel, "serie", Empty, ccsMemo, Empty, CCGetRequestParam("serie", ccsGet)) Set motivul_retragerii = CCCreateControl(ccsLabel, "motivul_retragerii", Empty, ccsMemo, Empty, CCGetRequestParam("motivul_retragerii", ccsGet)) Set act_propusa = CCCreateControl(ccsLabel, "act_propusa", Empty, ccsText, Empty, CCGetRequestParam("act_propusa", ccsGet)) Set data = CCCreateControl(ccsLabel, "data", Empty, ccsText, Empty, CCGetRequestParam("data", ccsGet)) Set Navigator = CCCreateNavigator(ComponentName, "Navigator", FileName, 10, tpSimple) IsDSEmpty = True End Sub 'End retrase Class_Initialize Event 'retrase Initialize Method @2-2AEA3975 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.SetOrder ActiveSorter, SortingDirection DataSource.AbsolutePage = PageNumber End Sub 'End retrase Initialize Method 'retrase Class_Terminate Event @2-B97CC660 Private Sub Class_Terminate() Set CCSEvents = Nothing Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing Set Attributes = Nothing End Sub 'End retrase Class_Terminate Event 'retrase Show Method @2-C0F94A7D Sub Show(Tpl) Dim HasNext If NOT Visible Then Exit Sub Dim RowBlock CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) If DataSource.Errors.Count = 0 Then IsDSEmpty = Recordset.EOF Set TemplateBlock = Tpl.Block("Grid " & ComponentName) If TemplateBlock is Nothing Then Exit Sub Set RowBlock = TemplateBlock.Block("Row") Set StaticControls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _ Array(Sorter_med_retras, Sorter_forma_farmaceutica, Sorter_concentratie, Sorter_dci, Sorter_producator, Sorter_act_propusa, Sorter_data, Navigator)) Navigator.SetDataSource Recordset Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(med_retras, forma_farmaceutica, concentratie, dci, producator, serie, motivul_retragerii, act_propusa, data)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub RowControls.PreserveControlsVisible Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid " & ComponentName, Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then Attributes.Show TemplateBlock, "retrase:" TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If HasNext = HasNextRow() ForceIteration = False Do While ForceIteration Or HasNext If HasNext Then med_retras.Value = Recordset.Fields("med_retras") forma_farmaceutica.Value = Recordset.Fields("forma_farmaceutica") concentratie.Value = Recordset.Fields("concentratie") dci.Value = Recordset.Fields("dci") producator.Value = Recordset.Fields("producator") serie.Value = Recordset.Fields("serie") motivul_retragerii.Value = Recordset.Fields("motivul_retragerii") act_propusa.Value = Recordset.Fields("act_propusa") data.Value = Recordset.Fields("data") End If CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) Attributes.Show TemplateBlock.Block("Row"), "retrase:" RowControls.Show If HasNext Then Recordset.MoveNext ShownRecords = ShownRecords + 1 HasNext = HasNextRow() Loop Attributes.Show TemplateBlock, "retrase:" StaticControls.Show End If End Sub 'End retrase Show Method 'retrase PageSize Property Let @2-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End retrase PageSize Property Let 'retrase PageSize Property Get @2-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End retrase PageSize Property Get 'retrase RowNumber Property Get @2-F32EE2C6 Public Property Get RowNumber() RowNumber = ShownRecords + 1 End Property 'End retrase RowNumber Property Get 'retrase HasNextRow Function @2-9BECE27A Public Function HasNextRow() HasNextRow = NOT Recordset.EOF AND ShownRecords < PageSize End Function 'End retrase HasNextRow Function End Class 'End retrase Class @2-A61BA892 Class clsretraseDataSource 'retraseDataSource Class @2-D42C37B5 'DataSource Variables @2-677D51BD Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders, StaticOrder Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Public InsertOmitIfEmpty Public UpdateOmitIfEmpty Private CurrentOperation Private CCSEventResult ' Datasource fields Public med_retras Public forma_farmaceutica Public concentratie Public dci Public producator Public serie Public motivul_retragerii Public act_propusa Public data 'End DataSource Variables 'DataSource Class_Initialize Event @2-223ABA9D Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors Set Connection = Nothing AllParamsSet = True Set med_retras = CCCreateField("med_retras", "med_retras", ccsText, Empty, Recordset) Set forma_farmaceutica = CCCreateField("forma_farmaceutica", "forma_farmaceutica", ccsText, Empty, Recordset) Set concentratie = CCCreateField("concentratie", "concentratie", ccsText, Empty, Recordset) Set dci = CCCreateField("dci", "dci", ccsText, Empty, Recordset) Set producator = CCCreateField("producator", "producator", ccsText, Empty, Recordset) Set serie = CCCreateField("serie", "serie", ccsMemo, Empty, Recordset) Set motivul_retragerii = CCCreateField("motivul_retragerii", "motivul_retragerii", ccsMemo, Empty, Recordset) Set act_propusa = CCCreateField("act_propusa", "act_propusa", ccsText, Empty, Recordset) Set data = CCCreateField("data", "data", ccsText, Empty, Recordset) Fields.AddFields Array(med_retras, forma_farmaceutica, concentratie, dci, producator, serie, motivul_retragerii, act_propusa, data) Orders = Array( _ Array("Sorter_med_retras", "med_retras", ""), _ Array("Sorter_forma_farmaceutica", "forma_farmaceutica", ""), _ Array("Sorter_concentratie", "concentratie", ""), _ Array("Sorter_dci", "dci", ""), _ Array("Sorter_producator", "producator", ""), _ Array("Sorter_act_propusa", "act_propusa", ""), _ Array("Sorter_data", "data", "")) SQL = "SELECT TOP {SqlParam_endRecord} med_retras, forma_farmaceutica, concentratie, dci, producator, serie, motivul_retragerii, act_propusa, data " & vbLf & _ "FROM retrase {SQL_Where} {SQL_OrderBy}" CountSQL = "SELECT COUNT(*) " & vbLf & _ "FROM retrase" Where = "" Order = "id_retrase" StaticOrder = "" End Sub 'End DataSource Class_Initialize Event 'SetOrder Method @2-68FC9576 Sub SetOrder(Column, Direction) Order = Recordset.GetOrder(Order, Column, Direction, Orders) End Sub 'End SetOrder Method 'BuildTableWhere Method @2-98E5A92F Public Sub BuildTableWhere() End Sub 'End BuildTableWhere Method 'Open Method @2-09F85DD8 Function Open(Cmd) Errors.Clear If Connection Is Nothing Then Set Open = New clsEmptyDataSource Exit Function End If Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.CountSQL = CountSQL Cmd.Where = Where Cmd.OrderBy = Order If(Len(StaticOrder)>0) Then If Len(Order)>0 Then Cmd.OrderBy = ", "+Cmd.OrderBy Cmd.OrderBy = StaticOrder + Cmd.OrderBy End If Cmd.Options("CLAUSE") = " TOP {SqlParam_endRecord}" Cmd.Options("SYNTAX") = "Top" Cmd.Options("PLACE") = "beforeFrom" CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @2-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End retraseDataSource Class @2-A61BA892 %>