<%@ CodePage="1252" LCID="1046" %> <% Response.Buffer = EW_RESPONSE_BUFFER %> <% Session.Timeout = 20 %> <% Call ew_Header(False, EW_CHARSET) %> <% ' Define page object Dim receptor_delete Set receptor_delete = New creceptor_delete Set Page = receptor_delete ' Page init processing Call receptor_delete.Page_Init() ' Page main processing Call receptor_delete.Page_Main() %> <% receptor_delete.ShowPageHeader() %> <% ' Load records for display Set receptor_delete.Recordset = receptor_delete.LoadRecordset() receptor_delete.TotalRecs = receptor_delete.Recordset.RecordCount ' Get record count If receptor_delete.TotalRecs <= 0 Then ' No record found, exit receptor_delete.Recordset.Close Set receptor_delete.Recordset = Nothing Call receptor_delete.Page_Terminate("receptorlist.asp") ' Return to list End If %>

<%= Language.Phrase("Delete") %> <%= Language.Phrase("TblTypeTABLE") %><%= receptor.TableCaption %>

<%= Language.Phrase("GoBack") %>

<% receptor_delete.ShowMessage %>

<% For i = 0 to UBound(receptor_delete.RecKeys) %> <% Next %>
<%= receptor.TableCustomInnerHTML %> <% receptor_delete.RecCnt = 0 i = 0 Do While (Not receptor_delete.Recordset.Eof) receptor_delete.RecCnt = receptor_delete.RecCnt + 1 ' Set row properties Call receptor.ResetAttrs() receptor.RowType = EW_ROWTYPE_VIEW ' view ' Get the field contents Call receptor_delete.LoadRowValues(receptor_delete.Recordset) ' Render row Call receptor_delete.RenderRow() %> > > ><%= receptor.ID.ListViewValue %> > ><%= receptor.REGISTRO_GERAL.ListViewValue %> > ><%= receptor.NOME_PACIENTE.ListViewValue %> > ><%= receptor.IDADE_PACIENTE.ListViewValue %> > ><%= receptor.PESO_PACIENTE.ListViewValue %> > ><%= receptor.SEXO_PACIENTE.ListViewValue %> > ><%= receptor.NACIONALIDADE.ListViewValue %> > ><%= receptor.LOCAL.ListViewValue %> > ><%= receptor.QUARTO.ListViewValue %> > ><%= receptor.LEITO.ListViewValue %> > ><%= receptor.HIPOTESE_DIAGNOSTICA.ListViewValue %> > ><%= receptor.HISTORICO_TRANSFUCIONAL.ListViewValue %> > ><%= receptor.REACAO_TRANSFUCIONAL.ListViewValue %> > ><%= receptor.QUAL.ListViewValue %> > ><%= receptor.GESTACAO_ABORTOS.ListViewValue %> > ><%= receptor.QUANTOS.ListViewValue %> > ><%= receptor.ABO.ListViewValue %> > ><%= receptor.RH.ListViewValue %> > ><%= receptor.SENSIBILIDADE.ListViewValue %> > ><%= receptor.FONTE_PAGA.ListViewValue %> <% receptor_delete.Recordset.MoveNext Loop receptor_delete.Recordset.Close Set receptor_delete.Recordset = Nothing %>
<%= receptor.ID.FldCaption %> <%= receptor.REGISTRO_GERAL.FldCaption %> <%= receptor.NOME_PACIENTE.FldCaption %> <%= receptor.IDADE_PACIENTE.FldCaption %> <%= receptor.PESO_PACIENTE.FldCaption %> <%= receptor.SEXO_PACIENTE.FldCaption %> <%= receptor.NACIONALIDADE.FldCaption %> <%= receptor.LOCAL.FldCaption %> <%= receptor.QUARTO.FldCaption %> <%= receptor.LEITO.FldCaption %> <%= receptor.HIPOTESE_DIAGNOSTICA.FldCaption %> <%= receptor.HISTORICO_TRANSFUCIONAL.FldCaption %> <%= receptor.REACAO_TRANSFUCIONAL.FldCaption %> <%= receptor.QUAL.FldCaption %> <%= receptor.GESTACAO_ABORTOS.FldCaption %> <%= receptor.QUANTOS.FldCaption %> <%= receptor.ABO.FldCaption %> <%= receptor.RH.FldCaption %> <%= receptor.SENSIBILIDADE.FldCaption %> <%= receptor.FONTE_PAGA.FldCaption %>

">

<% receptor_delete.ShowPageFooter() If EW_DEBUG_ENABLED Then Response.Write ew_DebugMsg() %> <% ' Drop page object Set receptor_delete = Nothing %> <% ' ----------------------------------------------------------------- ' Page Class ' Class creceptor_delete ' Page ID Public Property Get PageID() PageID = "delete" End Property ' Table Name Public Property Get TableName() TableName = "receptor" End Property ' Page Object Name Public Property Get PageObjName() PageObjName = "receptor_delete" End Property ' Page Name Public Property Get PageName() PageName = ew_CurrentPage() End Property ' Page Url Public Property Get PageUrl() PageUrl = ew_CurrentPage() & "?" If receptor.UseTokenInUrl Then PageUrl = PageUrl & "t=" & receptor.TableVar & "&" ' add page token End Property ' Message Public Property Get Message() Message = Session(EW_SESSION_MESSAGE) End Property Public Property Let Message(v) Dim msg msg = Session(EW_SESSION_MESSAGE) Call ew_AddMessage(msg, v) Session(EW_SESSION_MESSAGE) = msg End Property Public Property Get FailureMessage() FailureMessage = Session(EW_SESSION_FAILURE_MESSAGE) End Property Public Property Let FailureMessage(v) Dim msg msg = Session(EW_SESSION_FAILURE_MESSAGE) Call ew_AddMessage(msg, v) Session(EW_SESSION_FAILURE_MESSAGE) = msg End Property Public Property Get SuccessMessage() SuccessMessage = Session(EW_SESSION_SUCCESS_MESSAGE) End Property Public Property Let SuccessMessage(v) Dim msg msg = Session(EW_SESSION_SUCCESS_MESSAGE) Call ew_AddMessage(msg, v) Session(EW_SESSION_SUCCESS_MESSAGE) = msg End Property ' Show Message Public Sub ShowMessage() Dim sMessage sMessage = Message Call Message_Showing(sMessage, "") If sMessage <> "" Then Response.Write "

" & sMessage & "

" Session(EW_SESSION_MESSAGE) = "" ' Clear message in Session ' Success message Dim sSuccessMessage sSuccessMessage = SuccessMessage Call Message_Showing(sSuccessMessage, "success") If sSuccessMessage <> "" Then Response.Write "

" & sSuccessMessage & "

" Session(EW_SESSION_SUCCESS_MESSAGE) = "" ' Clear message in Session ' Failure message Dim sErrorMessage sErrorMessage = FailureMessage Call Message_Showing(sErrorMessage, "failure") If sErrorMessage <> "" Then Response.Write "

" & sErrorMessage & "

" Session(EW_SESSION_FAILURE_MESSAGE) = "" ' Clear message in Session End Sub Dim PageHeader Dim PageFooter ' Show Page Header Public Sub ShowPageHeader() Dim sHeader sHeader = PageHeader Call Page_DataRendering(sHeader) If sHeader <> "" Then ' Header exists, display Response.Write "

" & sHeader & "

" End If End Sub ' Show Page Footer Public Sub ShowPageFooter() Dim sFooter sFooter = PageFooter Call Page_DataRendered(sFooter) If sFooter <> "" Then ' Footer exists, display Response.Write "

" & sFooter & "

" End If End Sub ' ----------------------- ' Validate Page request ' Public Function IsPageRequest() If receptor.UseTokenInUrl Then IsPageRequest = False If Not (ObjForm Is Nothing) Then IsPageRequest = (receptor.TableVar = ObjForm.GetValue("t")) End If If Request.QueryString("t").Count > 0 Then IsPageRequest = (receptor.TableVar = Request.QueryString("t")) End If Else IsPageRequest = True End If End Function ' ----------------------------------------------------------------- ' Class initialize ' - init objects ' - open ADO connection ' Private Sub Class_Initialize() If IsEmpty(StartTimer) Then StartTimer = Timer ' Init start time ' Initialize language object If IsEmpty(Language) Then Set Language = New cLanguage Call Language.LoadPhrases() End If ' Initialize table object If IsEmpty(receptor) Then Set receptor = New creceptor Set Table = receptor ' Initialize urls ' Initialize form object Set ObjForm = Nothing ' Intialize page id (for backward compatibility) EW_PAGE_ID = "delete" ' Initialize table name (for backward compatibility) EW_TABLE_NAME = "receptor" ' Open connection to the database If IsEmpty(Conn) Then Call ew_Connect() End Sub ' ----------------------------------------------------------------- ' Subroutine Page_Init ' - called before page main ' - check Security ' - set up response header ' - call page load events ' Sub Page_Init() ' Global page loading event (in userfn7.asp) Call Page_Loading() ' Page load event, used in current page Call Page_Load() End Sub ' ----------------------------------------------------------------- ' Class terminate ' - clean up page object ' Private Sub Class_Terminate() Call Page_Terminate("") End Sub ' ----------------------------------------------------------------- ' Subroutine Page_Terminate ' - called when exit page ' - clean up ADO connection and objects ' - if url specified, redirect to url ' Sub Page_Terminate(url) ' Page unload event, used in current page Call Page_Unload() ' Global page unloaded event (in userfn60.asp) Call Page_Unloaded() Dim sRedirectUrl sReDirectUrl = url Call Page_Redirecting(sReDirectUrl) If Not (Conn Is Nothing) Then Conn.Close ' Close Connection Set Conn = Nothing Set receptor = Nothing Set ObjForm = Nothing ' Go to url if specified If sReDirectUrl <> "" Then If Response.Buffer Then Response.Clear Response.Redirect sReDirectUrl End If End Sub ' ' Subroutine Page_Terminate (End) ' ---------------------------------------- Dim TotalRecs Dim RecCnt Dim RecKeys Dim Recordset ' Page main processing Sub Page_Main() Dim sFilter ' Load Key Parameters RecKeys = receptor.GetRecordKeys() ' Load record keys sFilter = receptor.GetKeyFilter() If sFilter = "" Then Call Page_Terminate("receptorlist.asp") ' Prevent SQL injection, return to list End If ' Set up filter (Sql Where Clause) and get Return Sql ' Sql constructor in receptor class, receptorinfo.asp receptor.CurrentFilter = sFilter ' Get action If Request.Form("a_delete").Count > 0 Then receptor.CurrentAction = Request.Form("a_delete") Else receptor.CurrentAction = "D" ' Delete record directly End If Select Case receptor.CurrentAction Case "D" ' Delete receptor.SendEmail = True ' Send email on delete success If DeleteRows() Then ' delete rows SuccessMessage = Language.Phrase("DeleteSuccess") ' Set up success message Call Page_Terminate(receptor.ReturnUrl) ' Return to caller End If End Select End Sub ' ----------------------------------------------------------------- ' Load recordset ' Function LoadRecordset() ' Call Recordset Selecting event Dim sFilter sFilter = receptor.CurrentFilter Call receptor.Recordset_Selecting(sFilter) receptor.CurrentFilter = sFilter ' Load list page sql Dim sSql sSql = receptor.ListSQL Call ew_SetDebugMsg("LoadRecordset: " & sSql) ' Show SQL for debugging ' Load recordset Dim RsRecordset Set RsRecordset = ew_LoadRecordset(sSql) ' Call Recordset Selected event Call receptor.Recordset_Selected(RsRecordset) Set LoadRecordset = RsRecordset End Function ' ----------------------------------------------------------------- ' Load row based on key values ' Function LoadRow() Dim RsRow, sSql, sFilter sFilter = receptor.KeyFilter ' Call Row Selecting event Call receptor.Row_Selecting(sFilter) ' Load sql based on filter receptor.CurrentFilter = sFilter sSql = receptor.SQL Call ew_SetDebugMsg("LoadRow: " & sSql) ' Show SQL for debugging Set RsRow = ew_LoadRow(sSql) If RsRow.Eof Then LoadRow = False Else LoadRow = True RsRow.MoveFirst Call LoadRowValues(RsRow) ' Load row values End If RsRow.Close Set RsRow = Nothing End Function ' ----------------------------------------------------------------- ' Load row values from recordset ' Sub LoadRowValues(RsRow) Dim sDetailFilter If RsRow.Eof Then Exit Sub ' Call Row Selected event Call receptor.Row_Selected(RsRow) receptor.ID.DbValue = RsRow("ID") receptor.REGISTRO_GERAL.DbValue = RsRow("REGISTRO_GERAL") receptor.NOME_PACIENTE.DbValue = RsRow("NOME_PACIENTE") receptor.IDADE_PACIENTE.DbValue = RsRow("IDADE_PACIENTE") receptor.PESO_PACIENTE.DbValue = RsRow("PESO_PACIENTE") receptor.SEXO_PACIENTE.DbValue = RsRow("SEXO_PACIENTE") receptor.NACIONALIDADE.DbValue = RsRow("NACIONALIDADE") receptor.LOCAL.DbValue = RsRow("LOCAL") receptor.QUARTO.DbValue = RsRow("QUARTO") receptor.LEITO.DbValue = RsRow("LEITO") receptor.HIPOTESE_DIAGNOSTICA.DbValue = RsRow("HIPOTESE_DIAGNOSTICA") receptor.HISTORICO_TRANSFUCIONAL.DbValue = RsRow("HISTORICO_TRANSFUCIONAL") receptor.REACAO_TRANSFUCIONAL.DbValue = RsRow("REACAO_TRANSFUCIONAL") receptor.QUAL.DbValue = RsRow("QUAL") receptor.GESTACAO_ABORTOS.DbValue = RsRow("GESTACAO_ABORTOS") receptor.QUANTOS.DbValue = RsRow("QUANTOS") receptor.ABO.DbValue = RsRow("ABO") receptor.RH.DbValue = RsRow("RH") receptor.SENSIBILIDADE.DbValue = RsRow("SENSIBILIDADE") receptor.FONTE_PAGA.DbValue = RsRow("FONTE_PAGA") End Sub ' ----------------------------------------------------------------- ' Render row values based on field settings ' Sub RenderRow() ' Initialize urls ' Call Row Rendering event Call receptor.Row_Rendering() ' --------------------------------------- ' Common render codes for all row types ' --------------------------------------- ' ID ' REGISTRO_GERAL ' NOME_PACIENTE ' IDADE_PACIENTE ' PESO_PACIENTE ' SEXO_PACIENTE ' NACIONALIDADE ' LOCAL ' QUARTO ' LEITO ' HIPOTESE_DIAGNOSTICA ' HISTORICO_TRANSFUCIONAL ' REACAO_TRANSFUCIONAL ' QUAL ' GESTACAO_ABORTOS ' QUANTOS ' ABO ' RH ' SENSIBILIDADE ' FONTE_PAGA ' ----------- ' View Row ' ----------- If receptor.RowType = EW_ROWTYPE_VIEW Then ' View row ' ID receptor.ID.ViewValue = receptor.ID.CurrentValue receptor.ID.CssStyle = "text-align:center;" receptor.ID.ViewCustomAttributes = "" ' REGISTRO_GERAL receptor.REGISTRO_GERAL.ViewValue = receptor.REGISTRO_GERAL.CurrentValue receptor.REGISTRO_GERAL.CssStyle = "text-align:center;" receptor.REGISTRO_GERAL.ViewCustomAttributes = "" ' NOME_PACIENTE receptor.NOME_PACIENTE.ViewValue = receptor.NOME_PACIENTE.CurrentValue receptor.NOME_PACIENTE.CssStyle = "text-align:center;" receptor.NOME_PACIENTE.ViewCustomAttributes = "" ' IDADE_PACIENTE receptor.IDADE_PACIENTE.ViewValue = receptor.IDADE_PACIENTE.CurrentValue receptor.IDADE_PACIENTE.CssStyle = "text-align:center;" receptor.IDADE_PACIENTE.ViewCustomAttributes = "" ' PESO_PACIENTE receptor.PESO_PACIENTE.ViewValue = receptor.PESO_PACIENTE.CurrentValue receptor.PESO_PACIENTE.CssStyle = "text-align:center;" receptor.PESO_PACIENTE.ViewCustomAttributes = "" ' SEXO_PACIENTE If Not IsNull(receptor.SEXO_PACIENTE.CurrentValue) Then Select Case receptor.SEXO_PACIENTE.CurrentValue Case "MASCULINO" receptor.SEXO_PACIENTE.ViewValue = ew_IIf(receptor.SEXO_PACIENTE.FldTagCaption(1) <> "", receptor.SEXO_PACIENTE.FldTagCaption(1), "MASCULINO") Case "FEMININO" receptor.SEXO_PACIENTE.ViewValue = ew_IIf(receptor.SEXO_PACIENTE.FldTagCaption(2) <> "", receptor.SEXO_PACIENTE.FldTagCaption(2), "FEMININO") Case Else receptor.SEXO_PACIENTE.ViewValue = receptor.SEXO_PACIENTE.CurrentValue End Select Else receptor.SEXO_PACIENTE.ViewValue = Null End If receptor.SEXO_PACIENTE.CssStyle = "text-align:center;" receptor.SEXO_PACIENTE.ViewCustomAttributes = "" ' NACIONALIDADE receptor.NACIONALIDADE.ViewValue = receptor.NACIONALIDADE.CurrentValue receptor.NACIONALIDADE.CssStyle = "text-align:center;" receptor.NACIONALIDADE.ViewCustomAttributes = "" ' LOCAL receptor.LOCAL.ViewValue = receptor.LOCAL.CurrentValue receptor.LOCAL.CssStyle = "text-align:center;" receptor.LOCAL.ViewCustomAttributes = "" ' QUARTO receptor.QUARTO.ViewValue = receptor.QUARTO.CurrentValue receptor.QUARTO.CssStyle = "text-align:center;" receptor.QUARTO.ViewCustomAttributes = "" ' LEITO receptor.LEITO.ViewValue = receptor.LEITO.CurrentValue receptor.LEITO.CssStyle = "text-align:center;" receptor.LEITO.ViewCustomAttributes = "" ' HIPOTESE_DIAGNOSTICA receptor.HIPOTESE_DIAGNOSTICA.ViewValue = receptor.HIPOTESE_DIAGNOSTICA.CurrentValue receptor.HIPOTESE_DIAGNOSTICA.CssStyle = "text-align:center;" receptor.HIPOTESE_DIAGNOSTICA.ViewCustomAttributes = "" ' HISTORICO_TRANSFUCIONAL receptor.HISTORICO_TRANSFUCIONAL.ViewValue = receptor.HISTORICO_TRANSFUCIONAL.CurrentValue receptor.HISTORICO_TRANSFUCIONAL.CssStyle = "text-align:center;" receptor.HISTORICO_TRANSFUCIONAL.ViewCustomAttributes = "" ' REACAO_TRANSFUCIONAL If Not IsNull(receptor.REACAO_TRANSFUCIONAL.CurrentValue) Then Select Case receptor.REACAO_TRANSFUCIONAL.CurrentValue Case "NÃO" receptor.REACAO_TRANSFUCIONAL.ViewValue = ew_IIf(receptor.REACAO_TRANSFUCIONAL.FldTagCaption(1) <> "", receptor.REACAO_TRANSFUCIONAL.FldTagCaption(1), "NÃO") Case "SIM" receptor.REACAO_TRANSFUCIONAL.ViewValue = ew_IIf(receptor.REACAO_TRANSFUCIONAL.FldTagCaption(2) <> "", receptor.REACAO_TRANSFUCIONAL.FldTagCaption(2), "SIM") Case Else receptor.REACAO_TRANSFUCIONAL.ViewValue = receptor.REACAO_TRANSFUCIONAL.CurrentValue End Select Else receptor.REACAO_TRANSFUCIONAL.ViewValue = Null End If receptor.REACAO_TRANSFUCIONAL.CssStyle = "text-align:center;" receptor.REACAO_TRANSFUCIONAL.ViewCustomAttributes = "" ' QUAL receptor.QUAL.ViewValue = receptor.QUAL.CurrentValue receptor.QUAL.CssStyle = "text-align:center;" receptor.QUAL.ViewCustomAttributes = "" ' GESTACAO_ABORTOS If Not IsNull(receptor.GESTACAO_ABORTOS.CurrentValue) Then Select Case receptor.GESTACAO_ABORTOS.CurrentValue Case "NÃO" receptor.GESTACAO_ABORTOS.ViewValue = ew_IIf(receptor.GESTACAO_ABORTOS.FldTagCaption(1) <> "", receptor.GESTACAO_ABORTOS.FldTagCaption(1), "NÃO") Case "SIM" receptor.GESTACAO_ABORTOS.ViewValue = ew_IIf(receptor.GESTACAO_ABORTOS.FldTagCaption(2) <> "", receptor.GESTACAO_ABORTOS.FldTagCaption(2), "SIM") Case Else receptor.GESTACAO_ABORTOS.ViewValue = receptor.GESTACAO_ABORTOS.CurrentValue End Select Else receptor.GESTACAO_ABORTOS.ViewValue = Null End If receptor.GESTACAO_ABORTOS.CssStyle = "text-align:center;" receptor.GESTACAO_ABORTOS.ViewCustomAttributes = "" ' QUANTOS receptor.QUANTOS.ViewValue = receptor.QUANTOS.CurrentValue receptor.QUANTOS.CssStyle = "text-align:center;" receptor.QUANTOS.ViewCustomAttributes = "" ' ABO If Not IsNull(receptor.ABO.CurrentValue) Then Select Case receptor.ABO.CurrentValue Case "A" receptor.ABO.ViewValue = ew_IIf(receptor.ABO.FldTagCaption(1) <> "", receptor.ABO.FldTagCaption(1), "A") Case "B" receptor.ABO.ViewValue = ew_IIf(receptor.ABO.FldTagCaption(2) <> "", receptor.ABO.FldTagCaption(2), "B") Case "AB" receptor.ABO.ViewValue = ew_IIf(receptor.ABO.FldTagCaption(3) <> "", receptor.ABO.FldTagCaption(3), "AB") Case "O" receptor.ABO.ViewValue = ew_IIf(receptor.ABO.FldTagCaption(4) <> "", receptor.ABO.FldTagCaption(4), "O") Case Else receptor.ABO.ViewValue = receptor.ABO.CurrentValue End Select Else receptor.ABO.ViewValue = Null End If receptor.ABO.CssStyle = "font-weight:bold;text-align:center;" receptor.ABO.ViewCustomAttributes = "" ' RH If Not IsNull(receptor.RH.CurrentValue) Then Select Case receptor.RH.CurrentValue Case "NEG" receptor.RH.ViewValue = ew_IIf(receptor.RH.FldTagCaption(1) <> "", receptor.RH.FldTagCaption(1), "NEG") Case "POS" receptor.RH.ViewValue = ew_IIf(receptor.RH.FldTagCaption(2) <> "", receptor.RH.FldTagCaption(2), "POS") Case Else receptor.RH.ViewValue = receptor.RH.CurrentValue End Select Else receptor.RH.ViewValue = Null End If receptor.RH.CssStyle = "font-weight:bold;text-align:center;" receptor.RH.ViewCustomAttributes = "" ' SENSIBILIDADE receptor.SENSIBILIDADE.ViewValue = receptor.SENSIBILIDADE.CurrentValue receptor.SENSIBILIDADE.CssStyle = "text-align:center;" receptor.SENSIBILIDADE.ViewCustomAttributes = "" ' FONTE_PAGA If Not IsNull(receptor.FONTE_PAGA.CurrentValue) Then Select Case receptor.FONTE_PAGA.CurrentValue Case "SUS" receptor.FONTE_PAGA.ViewValue = ew_IIf(receptor.FONTE_PAGA.FldTagCaption(1) <> "", receptor.FONTE_PAGA.FldTagCaption(1), "SUS") Case "CONVÊNIO" receptor.FONTE_PAGA.ViewValue = ew_IIf(receptor.FONTE_PAGA.FldTagCaption(2) <> "", receptor.FONTE_PAGA.FldTagCaption(2), "CONVÊNIO") Case "PARTICULAR" receptor.FONTE_PAGA.ViewValue = ew_IIf(receptor.FONTE_PAGA.FldTagCaption(3) <> "", receptor.FONTE_PAGA.FldTagCaption(3), "PARTICULAR") Case Else receptor.FONTE_PAGA.ViewValue = receptor.FONTE_PAGA.CurrentValue End Select Else receptor.FONTE_PAGA.ViewValue = Null End If receptor.FONTE_PAGA.CssStyle = "text-align:center;" receptor.FONTE_PAGA.ViewCustomAttributes = "" ' View refer script ' ID receptor.ID.LinkCustomAttributes = "" receptor.ID.HrefValue = "" receptor.ID.TooltipValue = "" ' REGISTRO_GERAL receptor.REGISTRO_GERAL.LinkCustomAttributes = "" receptor.REGISTRO_GERAL.HrefValue = "" receptor.REGISTRO_GERAL.TooltipValue = "" ' NOME_PACIENTE receptor.NOME_PACIENTE.LinkCustomAttributes = "" receptor.NOME_PACIENTE.HrefValue = "" receptor.NOME_PACIENTE.TooltipValue = "" ' IDADE_PACIENTE receptor.IDADE_PACIENTE.LinkCustomAttributes = "" receptor.IDADE_PACIENTE.HrefValue = "" receptor.IDADE_PACIENTE.TooltipValue = "" ' PESO_PACIENTE receptor.PESO_PACIENTE.LinkCustomAttributes = "" receptor.PESO_PACIENTE.HrefValue = "" receptor.PESO_PACIENTE.TooltipValue = "" ' SEXO_PACIENTE receptor.SEXO_PACIENTE.LinkCustomAttributes = "" receptor.SEXO_PACIENTE.HrefValue = "" receptor.SEXO_PACIENTE.TooltipValue = "" ' NACIONALIDADE receptor.NACIONALIDADE.LinkCustomAttributes = "" receptor.NACIONALIDADE.HrefValue = "" receptor.NACIONALIDADE.TooltipValue = "" ' LOCAL receptor.LOCAL.LinkCustomAttributes = "" receptor.LOCAL.HrefValue = "" receptor.LOCAL.TooltipValue = "" ' QUARTO receptor.QUARTO.LinkCustomAttributes = "" receptor.QUARTO.HrefValue = "" receptor.QUARTO.TooltipValue = "" ' LEITO receptor.LEITO.LinkCustomAttributes = "" receptor.LEITO.HrefValue = "" receptor.LEITO.TooltipValue = "" ' HIPOTESE_DIAGNOSTICA receptor.HIPOTESE_DIAGNOSTICA.LinkCustomAttributes = "" receptor.HIPOTESE_DIAGNOSTICA.HrefValue = "" receptor.HIPOTESE_DIAGNOSTICA.TooltipValue = "" ' HISTORICO_TRANSFUCIONAL receptor.HISTORICO_TRANSFUCIONAL.LinkCustomAttributes = "" receptor.HISTORICO_TRANSFUCIONAL.HrefValue = "" receptor.HISTORICO_TRANSFUCIONAL.TooltipValue = "" ' REACAO_TRANSFUCIONAL receptor.REACAO_TRANSFUCIONAL.LinkCustomAttributes = "" receptor.REACAO_TRANSFUCIONAL.HrefValue = "" receptor.REACAO_TRANSFUCIONAL.TooltipValue = "" ' QUAL receptor.QUAL.LinkCustomAttributes = "" receptor.QUAL.HrefValue = "" receptor.QUAL.TooltipValue = "" ' GESTACAO_ABORTOS receptor.GESTACAO_ABORTOS.LinkCustomAttributes = "" receptor.GESTACAO_ABORTOS.HrefValue = "" receptor.GESTACAO_ABORTOS.TooltipValue = "" ' QUANTOS receptor.QUANTOS.LinkCustomAttributes = "" receptor.QUANTOS.HrefValue = "" receptor.QUANTOS.TooltipValue = "" ' ABO receptor.ABO.LinkCustomAttributes = "" receptor.ABO.HrefValue = "" receptor.ABO.TooltipValue = "" ' RH receptor.RH.LinkCustomAttributes = "" receptor.RH.HrefValue = "" receptor.RH.TooltipValue = "" ' SENSIBILIDADE receptor.SENSIBILIDADE.LinkCustomAttributes = "" receptor.SENSIBILIDADE.HrefValue = "" receptor.SENSIBILIDADE.TooltipValue = "" ' FONTE_PAGA receptor.FONTE_PAGA.LinkCustomAttributes = "" receptor.FONTE_PAGA.HrefValue = "" receptor.FONTE_PAGA.TooltipValue = "" End If ' Call Row Rendered event If receptor.RowType <> EW_ROWTYPE_AGGREGATEINIT Then Call receptor.Row_Rendered() End If End Sub ' ' Delete records based on current filter ' Function DeleteRows() If Not EW_DEBUG_ENABLED Then On Error Resume Next Dim sKey, sThisKey, sKeyFld, arKeyFlds Dim sSql, RsDelete Dim RsOld DeleteRows = True sSql = receptor.SQL Set RsDelete = Server.CreateObject("ADODB.Recordset") RsDelete.CursorLocation = EW_CURSORLOCATION RsDelete.Open sSql, Conn, 1, EW_RECORDSET_LOCKTYPE If Err.Number <> 0 Then FailureMessage = Err.Description RsDelete.Close Set RsDelete = Nothing DeleteRows = False Exit Function ElseIf RsDelete.Eof Then FailureMessage = Language.Phrase("NoRecord") ' No record found RsDelete.Close Set RsDelete = Nothing DeleteRows = False Exit Function End If Conn.BeginTrans ' Clone old recordset object Set RsOld = ew_CloneRs(RsDelete) ' Call row deleting event If DeleteRows Then RsDelete.MoveFirst Do While Not RsDelete.Eof DeleteRows = receptor.Row_Deleting(RsDelete) If Not DeleteRows Then Exit Do RsDelete.MoveNext Loop RsDelete.MoveFirst End If If DeleteRows Then sKey = "" RsDelete.MoveFirst Do While Not RsDelete.Eof sThisKey = "" If sThisKey <> "" Then sThisKey = sThisKey & EW_COMPOSITE_KEY_SEPARATOR sThisKey = sThisKey & RsDelete("ID") RsDelete.Delete If Err.Number <> 0 Then FailureMessage = Err.Description ' Set up error message DeleteRows = False Exit Do End If If sKey <> "" Then sKey = sKey & ", " sKey = sKey & sThisKey RsDelete.MoveNext Loop Else ' Set up error message If receptor.CancelMessage <> "" Then FailureMessage = receptor.CancelMessage receptor.CancelMessage = "" Else FailureMessage = Language.Phrase("DeleteCancelled") End If End If If DeleteRows Then Conn.CommitTrans ' Commit the changes If Err.Number <> 0 Then FailureMessage = Err.Description DeleteRows = False ' Delete failed End If Else Conn.RollbackTrans ' Rollback changes End If RsDelete.Close Set RsDelete = Nothing ' Call row deleting event If DeleteRows Then If Not RsOld.Eof Then RsOld.MoveFirst Do While Not RsOld.Eof Call receptor.Row_Deleted(RsOld) RsOld.MoveNext Loop End If RsOld.Close Set RsOld = Nothing End Function ' Page Load event Sub Page_Load() 'Response.Write "Page Load" End Sub ' Page Unload event Sub Page_Unload() 'Response.Write "Page Unload" End Sub ' Page Redirecting event Sub Page_Redirecting(url) 'url = newurl End Sub ' Message Showing event ' typ = ""|"success"|"failure" Sub Message_Showing(msg, typ) ' Example: 'If typ = "success" Then msg = "your success message" End Sub ' Page Data Rendering event Sub Page_DataRendering(header) ' Example: 'header = "your header" End Sub ' Page Data Rendered event Sub Page_DataRendered(footer) ' Example: 'footer = "your footer" End Sub End Class %>