This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Repositorio<T> : IRepositorio<T> where T : Entidade | |
| { | |
| public void Altera(T entidade) | |
| { | |
| NhSession.Merge(entidade); | |
| NhSession.Flush(); | |
| } | |
| public T Inclui(T entidade) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NashConventions | |
| public void IgnorarPropriedadesQueNaoPossuemSet(IPropertyIgnorer ignorer) | |
| { | |
| ignorer.IgnoreProperties(member => !member.CanWrite); | |
| } | |
| FluentConfigurator | |
| .OverrideAll(NashConventions.Para.IgnorarPropriedadesQueNaoPossuemSet) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LimiteDeSaldo | |
| { | |
| private decimal disponivel; | |
| private decimal concedido; | |
| private decimal margemDeCredito; | |
| public LimiteDeSaldo(decimal disponivel, decimal concedido, decimal margemDeCredito) { | |
| this.disponivel = disponivel; | |
| this.concedido = concedido; | |
| this.margemDeCredito = margemDeCredito; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var resposta = Ext.decode(response.responseText); | |
| var novaPasta = resposta.Dados; | |
| var novoNode = new Ext.tree.TreeNode({ | |
| id: novaPasta.id, | |
| idServer: novaPasta.idServer, | |
| text: novaPasta.text, | |
| textFilter: novaPasta.textFilter, | |
| children: [], | |
| leaf: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Aramis.Core; | |
| using FluentNHibernate.Automapping; | |
| using FluentNHibernate.Automapping.Alterations; | |
| namespace Aramis.Persistencia.Configuracao.Convencoes | |
| { | |
| public class EventoOverride : IAutoMappingOverride<Evento> | |
| { | |
| public void Override(AutoMapping<Evento> mapping) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Configuration; | |
| using Aramis.Core; | |
| using Aramis.Persistencia.Configuracao.Convencoes; | |
| using FluentNHibernate.Automapping; | |
| using FluentNHibernate.Cfg; | |
| using FluentNHibernate.Cfg.Db; | |
| using NHibernate; | |
| using NHibernate.Tool.hbm2ddl; | |
| using NHConfiguration = NHibernate.Cfg.Configuration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using FluentNHibernate.Conventions; | |
| using FluentNHibernate.Conventions.Helpers; | |
| namespace Aramis.Persistencia.Configuracao | |
| { | |
| public class AramisConventions | |
| { | |
| public static AramisConventions Recupera | |
| { | |
| get { return new AramisConventions(); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function ($) { | |
| $.fn.carregaOptions = function(configs) { | |
| var defaults = { | |
| options : [], | |
| template: function(val) { | |
| return '<option value="{0}">{1}</option>'.format(val[0], val[1]); | |
| } | |
| }; | |
| return this.each(function(val) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ControllersInstaller : IWindsorInstaller | |
| { | |
| #region IWindsorInstaller Members | |
| public void Install(IWindsorContainer container, IConfigurationStore store) | |
| { | |
| container.Register(FindControllers().Configure(ConfigureControllers())); | |
| } | |
| #endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Rota no Sammy | |
| this.get('#/evento/criar', Views.Evento.Criacao.Inicializa); | |
| // Arquivo da View | |
| ;(function() { | |
| if(!Views.Evento) | |
| Views.Evento = { }; | |
| Views.Evento.Criacao = function (ctx) { | |
| var self = this; |