From: Elton Doerner Sent: Monday, September 26, 2011 9:45 AM To: Elton Doerner Subject: Prog - Voltar Pagina <a href="javascript:history.go(-1)">Voltar</a> From: Elton Doerner Sent: Sunday, September 25, 2011 2:51 AM To: Elton Doerner Subject: Prog - TextBoxFor <%: Html.TextBoxFor(model => model.Aceite, new { style = "width: 150px;", MaxLength = "200" })%> From: Elton Doerner Sent: Tuesday, September 27, 2011 8:49 AM To: Elton Doerner Subject: Prog Ajax.Actionlink Estudar <%= Ajax.ActionLink("Novo", "Create", new { id = ViewData["inscricaoid"] }, new AjaxOptions { UpdateTargetId = "edit" })%> From: Elton Doerner Sent: Wednesday, September 28, 2011 4:30 PM To: Elton Doerner Subject: Prog Modal FancyBox NA JANELA CHAMADORA <script type="text/javascript" src="http://cdn.ucb.org.br/Scripts/jquery.fancybox-1.3.4.pack.js"></script> <script type="text/javascript" src="http://cdn.ucb.org.br/Scripts/jquery.easing-1.3.pack.js"></script> <script type="text/javascript" src="http://cdn.ucb.org.br/Scripts/jquery.mousewheel-3.0.4.pack.js"></script> <link rel="stylesheet" type="text/css" href="http://cdn.ucb.org.br/Content/jquery.fancybox-1.3.4.css" /> jQuery(document).ready(function () { $(".fancybox").fancybox({ 'autoScale': false, 'type': 'iframe' }); }); <a href="/Envolvido/Partes/<%: Model.EnvolvidoId %>" class="fancybox">Partes</a> NO POST DO CONTROLLER return Content("<script>parent.jQuery.fancybox.close();</script> "); From: Elton Doerner Sent: Tuesday, September 27, 2011 10:42 AM To: Elton Doerner Subject: Prog - Mask jQuery(function ($) { $("#DataNascimento").mask("99/99/9999"); $("#MutuarioDesde").mask("99/99/9999"); $("#Cep").mask("99999-999"); $("#Fone").mask("(99) 9999-9999"); $("#Celular").mask("(99) 9999-9999"); }); From: Elton Doerner Sent: Tuesday, September 27, 2011 11:13 AM To: Elton Doerner Subject: Prog - btnEdit/btnDelete <td> <a id="btnEdit" class="Edit" href="/Prestador/Edit/<%: item.PrestadorId %>"> <img src="/Imagens/edit.png" title="Alterar" alt="Alterar" /> </a> <a id="btnDel" href="/Prestador/Delete/<%:item.PrestadorId %>"> <img src="/Imagens/delete.png" title="Apagar" alt="Apagar" /> </a> </td> From: Elton Doerner Sent: Tuesday, September 27, 2011 9:53 AM To: Elton Doerner Subject: Prog - Tablesorter <script type="text/javascript"> $(document).ready(function () { $("#tableId").tablesorter({ widthFixed: true, widgets: ['zebra'] }); }); </script> <table id="tableId" class="tablesorter" > <thead> <tr> <th> Nome ... </thead> <tbody> <tr> <td> ... </tbody> </table> From: Elton Doerner Sent: Thursday, September 22, 2011 1:45 PM To: Elton Doerner Subject: Prog EF - ExecuteStoreCommand EXECUTANDO SQL NO EF var rowsAffected = ContextoDados.Db.ExecuteStoreCommand( @" insert Contabilizacao... ", new SqlParameter { ParameterName = "@mesAberto", Value = mes.Mes }, new SqlParameter { ParameterName = "@usuario", Value = Contexto.UsuarioLogado.Nome }); From: Elton Doerner Sent: Friday, September 23, 2011 11:07 AM To: Elton Doerner Subject: Prog Reports 1. CRIAR UM DATASET COM O SQL DO RELATORIO (o sql nao pode ter campos nullos) 2. CRIAR UM RPT UTILIZANDO O DATASET (utilizado somente para o desing do relatorio) 3. CRIAR UMA CLASSE QUE REPRESENTE OS DADOS DO RELATORIO (dataset) (o tipo da propriedade nao pode ser nullable (ex: int?)) using System; namespace FmgaWeb.Areas.Report.Views.ControllerName { public class ContaCorrenteClass { public int Codigo { get; set; } public string Nome { get; set; } ... } } 4. CRIAR O CONTROLLER using System.Linq; using System.Web.Mvc; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using Dados; using FmgaWeb.Controllers; namespace FmgaWeb.Areas.Report.Controllers { public class ContaCorrenteController : BaseController { public ActionResult ExtratoMensal() { var mes = Me.ObterMesAberto(); var list = ContaCorrente.ListAllFromMes(mes).ToList(); if (list.Count > 0) { ReportClass rpt = new Views.ContaCorrente.ContaCorrenteExtrato(); // arquivo rpt rpt.Load(); rpt.SetDataSource(list); rpt.SetParameterValue("Usuario", Contexto.UsuarioLogado.Nome); rpt.SetParameterValue("Titulo", "Titulo da Relatorio"); var stream = rpt.ExportToStream(ExportFormatType.PortableDocFormat); return File(stream, "application/pdf"); } return null; } } } 5. CRIAR O METODO QUE CARREGA OS DADOS UTILIZANDO O SQL DO DATASET (nenhum campo pode retornar valor null) public static IEnumerable<ContaCorrenteClass> ListAllFromMes(Me mes) { return ContextoDados.Db.ExecuteStoreQuery<ContaCorrenteClass>(@" SELECT ..."); } set nocount onDeclare @Cont Int = 1, @Total Int, @view varchar(100)='v_contacorrentesinistro', @column_name varchar(100),