Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.09 KB | None | 0 0
  1. Public Class RelRegepaCap
  2. Inherits IcatuHartford.Web.UI.Pagina
  3.  
  4.  
  5. Protected Sub Pag
  6.  
  7. e_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  8. If Not Page.IsPostBack Then
  9. PopularControles()
  10. End If
  11. End Sub
  12.  
  13. Private Sub PopularControles()
  14. txtCPF.Attributes.Add("onkeypress", "MascInteiro();")
  15. txtTitulo.Attributes.Add("onkeypress", "MascInteiro();")
  16.  
  17. Dim oRelFacade As New RelRegepaCapFacade
  18. Dim Dt As New DataTable
  19.  
  20. With Me.cboProdutos
  21. .DataSource = oRelFacade.GetProduto(Me.CacheApp.Item(VariaveisContexto.Veiculo.ToString()))
  22. .DataBind()
  23. End With
  24. End Sub
  25. Public Sub FiltraProduto(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBoxPU.CheckedChanged
  26.  
  27.  
  28. End Sub
  29.  
  30. Protected Sub cmdContinuar_Click(sender As Object, e As EventArgs) Handles cmdContinuar.Click
  31. Dim RelRegepaCapFac As New RelRegepaCapFacade
  32. Dim dt As DataTable
  33. Dim cod_veiculo As String
  34. Dim cpfcnjp As String
  35. Dim titulo As String
  36. Dim useruniqueID As Guid
  37. Dim CodProduto As String
  38. Dim TpProduto As String
  39.  
  40.  
  41. useruniqueID = New Guid(Me.Usuario.Identity.Id)
  42. cod_veiculo = Me.CacheApp.Item(VariaveisContexto.Veiculo.ToString())
  43. cpfcnjp = txtCPF.Text
  44. titulo = txtTitulo.Text
  45. CodProduto = cboProdutos.SelectedValue
  46.  
  47. If CheckBoxPM.Checked Then
  48. TpProduto = "M"
  49. ElseIf CheckBoxPU.Checked Then
  50. TpProduto = "U"
  51. Else
  52. TpProduto = String.Empty
  53. End If
  54.  
  55. Try
  56. With Me.rptRegepa
  57. .DataSource = RelRegepaCapFac.GetRelRegepa(cod_veiculo, cpfcnjp, titulo, useruniqueID, CodProduto, TpProduto)
  58. .DataBind()
  59. End With
  60.  
  61. Finally
  62. RelRegepaCapFac = Nothing
  63. End Try
  64. End Sub
  65.  
  66. Protected Sub cmdExportarExcel_Click(sender As Object, e As EventArgs) Handles cmdExportarExcel.Click
  67. GeraRelatorioExcel()
  68.  
  69. End Sub
  70. Private Sub GeraRelatorioExcel()
  71. Dim strScript As String
  72. Dim params As String() = New String(13) {}
  73.  
  74. params(0) = ConfigurationSettings.AppSettings("IHInternetService_Relatorios") & "RelRegepaCapPopUpExcel.aspx"
  75. params(3) = Me.Usuario.Identity.Veiculo
  76.  
  77. strScript = String.Format("<script>window.open(CodVeiculo={3}" & _
  78. "','_blank','width=780,height=460');</script>", params)
  79.  
  80. Me.RegisterClientScriptBlock("POPUP", strScript)
  81.  
  82. End Sub
  83.  
  84.  
  85. End Class
  86.  
  87.  
  88.  
  89.  
  90. <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RelRegepaCap.aspx.vb"
  91. Inherits="IHInternetService_Relatorios.RelRegepaCap" %>
  92.  
  93. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  94. <html xmlns="http://www.w3.org/1999/xhtml">
  95. <head runat="server">
  96. <title></title>
  97. <script>
  98. function Esconde() {
  99. document.all("cboStatus").style.display = "none";
  100. }
  101.  
  102.  
  103. </script>
  104. </head>
  105. <body>
  106. <form id="Form1" method="post" runat="server" onkeypress="if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('cmdContinuar').click();return false;}} else {return true};">
  107. <div id="dvValidaRelClientes" class="Erro">
  108. </div>
  109. <table class="caixa_home" id="Table4" cellspacing="0" cellpadding="3" width="640px"
  110. border="0">
  111. <tr>
  112. <td>
  113. <table width="100%" cellspacing="0" cellpadding="4" border="0" class="linha_caixa_home">
  114. <tbody>
  115. <tr class="fundo_titulo_tabelas_internas">
  116. <td>
  117. Buscar por:
  118. </td>
  119. </tr>
  120. <tr class="fundo_caixa_home">
  121. <td>
  122. <table width="100%" cellspacing="1" cellpadding="3" border="0" class="TiraBorda">
  123. <tbody>
  124. <tr class="fundo_caixa_home">
  125. <td class="Texto2">
  126. Tipo de Produtos:
  127. </td>
  128. <td class="fundo_cinza Texto_1">
  129. <asp:CheckBox ID="CheckBoxPM" runat="server" Text="M" OnCheckedChanged="FiltraProduto" />
  130. <asp:CheckBox ID="CheckBoxPU" runat="server" Text="U" OnCheckedChanged="FiltraProduto" />
  131. </td>
  132. </tr>
  133. <tr class="fundo_caixa_home">
  134. <td class="Texto2">
  135. Produtos
  136. </td>
  137. <td class="fundo_cinza Texto_1">
  138. <asp:ListBox ID="cboProdutos" runat="server" CssClass="InputP" DataValueField="PRODUTO"
  139. DataTextField="NOMNEGOCIACAO" Height="54px" SelectionMode="Single" Width="349px">
  140. </asp:ListBox>
  141. </td>
  142. </tr>
  143. <tr>
  144. <td class="Texto2">
  145. CPF/CNPJ do cliente
  146. </td>
  147. <td class="fundo_cinza Texto_1">
  148. <asp:TextBox ID="txtCPF" CssClass="InputP" Width="140px" runat="server" MaxLength="14"></asp:TextBox>
  149. </td>
  150. </tr>
  151. <tr>
  152. <td class="Texto2">
  153. Título
  154. </td>
  155. <td class="fundo_cinza Texto_1">
  156. <asp:TextBox ID="txtTitulo" CssClass="InputP" Width="140px" runat="server" MaxLength="11"></asp:TextBox>
  157. </td>
  158. </tr>
  159. </tbody>
  160. </table>
  161. <table width="100%" align="center">
  162. <tr>
  163. <td width="25%">
  164. </td>
  165. <td align="center">
  166. <asp:Button ID="cmdContinuar" CssClass="botao_formulario" runat="server" Text="Consultar">
  167. </asp:Button>
  168. </td>
  169. <td align="center">
  170. </td>
  171. <td width="25%">
  172. </td>
  173. </tr>
  174. </table>
  175. </td>
  176. </tr>
  177. </tbody>
  178. </table>
  179. </td>
  180. </tr>
  181. <tr>
  182. <td>
  183. <asp:Panel ID="pnlRelatorio" runat="server" Visible="<%#rptRegepa.Items.Count>0%>">
  184. <asp:Repeater ID="rptRegepa" runat="server">
  185. <HeaderTemplate>
  186. <table id="resultado" cellspacing="0" cellpadding="4" width="100%" border="0">
  187. <tr>
  188. <td>
  189. <table class="linha_caixa_home" cellspacing="0" cellpadding="4" width="100%" border="0">
  190. <tr class="fundo_cinza Texto2">
  191. <td>
  192. Nº do Título
  193. </td>
  194. <td width="20%">
  195. Série
  196. </td>
  197. <td>
  198. Proposta
  199. </td>
  200. <td>
  201. Nome Cliente
  202. </td>
  203. <td>
  204. Cpf/Cnpj Cliente
  205. </td>
  206. <td>
  207. Conta Corrente
  208. </td>
  209. <td>
  210. Cód. Produto
  211. </td>
  212. <td>
  213. Nome Produto
  214. </td>
  215. <td>
  216. Status
  217. </td>
  218. <td>
  219. Vlr. Mensalidade
  220. </td>
  221. <td>
  222. Última Parcela Paga
  223. </td>
  224. <td>
  225. Data Último Pagamento
  226. </td>
  227. <td>
  228. Vlr. Reserva
  229. </td>
  230. </tr>
  231. <tr class="fundo_caixa_home">
  232. <td colspan="13" style="height: 3px;">
  233. </td>
  234. </tr>
  235. </HeaderTemplate>
  236. <ItemTemplate>
  237. <tr id="trClienteSorte" runat="server">
  238. <td class="Texto_1">
  239. <%#Container.DataItem("TITULO")%>
  240. </td>
  241. <td class="Texto_1">
  242. <%#Container.DataItem("SERIE")%>
  243. </td>
  244. <td class="Texto_1">
  245. <%#Container.DataItem("PROPOSTA")%>
  246. </td>
  247. <td class="Texto_1">
  248. <%#Container.DataItem("NOME_CLIENTE")%>
  249. </td>
  250. <td class="Texto_1">
  251. <%#Container.DataItem("CPF_CNPJ_CLIENTE")%>
  252. </td>
  253. <td class="Texto_1">
  254. <%#Container.DataItem("CONTA_CORRENTE")%>
  255. </td>
  256. <td class="Texto_1">
  257. <%#Container.DataItem("PRODUTO")%>
  258. </td>
  259. <td class="Texto_1">
  260. <%#Container.DataItem("NOMNEGOCIACAO")%>
  261. </td>
  262. <td class="Texto_1">
  263. <%#Container.DataItem("STATUS_TITULO")%>
  264. </td>
  265. <td class="Texto_1">
  266. <%#Databinder.Eval(Container.DataItem,"VALOR_MENSALIDADE","{0:N2}")%>
  267. </td>
  268. <td class="Texto_1">
  269. <%#Container.DataItem("ULTIMA_PARCELA_PAGA")%>
  270. </td>
  271. <td class="Texto_1">
  272. <%#Databinder.Eval(Container.DataItem,"DT_ULTIMO_PAGAMENTO","{0:dd/MM/yyyy}")%>
  273. </td>
  274. <td class="Texto_1">
  275. <%#DataBinder.Eval(Container.DataItem, "VALOR_RESERVA_CLIENTE", "{0:N2}")%>
  276. </td>
  277.  
  278.  
  279. </tr>
  280. </ItemTemplate>
  281. <FooterTemplate>
  282. </TABLE> </TD> </TR> </TABLE>
  283. </FooterTemplate>
  284. </asp:Repeater>
  285. </br>
  286. <table id="exportar" cellspacing="0" cellpadding="0" width="100%" align="center"
  287. border="0" runat="server" visible="<%#rptRegepa.Items.Count>0%>">
  288. <tr>
  289. <td width="30%">
  290. </td>
  291. <td align="center" width="40%">
  292. <asp:Button ID="cmdExportarExcel" CssClass="botao_formulario" runat="server" Text="Exportar Excel">
  293. </asp:Button>
  294. </td>
  295. <td width="30%">
  296. </td>
  297. </tr>
  298. </table>
  299. </asp:Panel>
  300. </td>
  301. </tr>
  302. </table>
  303. </form>
  304. </body>
  305. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement