This file contains 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
$(document).ready(function(){ | |
$(".stripeMe tr").on{ | |
mouseover: function() | |
{ | |
$(this).addClass("over"); | |
} | |
mouseleave: function() | |
{ | |
$(this).removeClass("over"); | |
} |
This file contains 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
// After using the Microsoft.Web.Mvc Html.ActionLink<TController>(... Expression<Action<TController>> action ...); | |
// I was unable to use that for a Image, so here's the code for it: | |
// **** :) no more magic strings for image linking to actions. | |
// usage: | |
// <%= Html.ImageActionLink<HomeController>( | |
// x => x.ChangeCulture(Culture.pt, this.Request.RawUrl), | |
// Culture.pt.ToString() + ".png") | |
// %> | |
This file contains 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; | |
using System.Web; | |
using NHibernate; | |
using NHibernate.Cfg; | |
namespace workshop_httpmodule | |
{ | |
public class NHibernateHttpModule : IHttpModule | |
{ | |
public static readonly string NHibernateSessionKey = "NHibernateSession"; |
This file contains 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 NHibernate.Driver; | |
using NHibernate.Mapping.ByCode; | |
using NHibernate.Mapping.ByCode.Conformist; | |
namespace workshop_Entity | |
{ | |
public class Category | |
{ | |
public virtual int IdCategoria { get; set; } | |
public virtual string Nome { get; set; } |
This file contains 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.Collections.Generic; | |
namespace Workshop.Data | |
{ | |
public interface IRepository<T> | |
{ | |
T Save(T entity); | |
T Update(T entity); | |
void Delete(T entity); | |
T ById(int id); |
This file contains 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.Collections.Generic; | |
using workshop_httpmodule; | |
namespace Workshop.Data.NHibernate | |
{ | |
public class GenericRepository<T> : IRepository<T> | |
{ | |
public T Save(T entity) | |
{ | |
NHibernateHttpModule.RecuperarSessao.Save(entity); |
This file contains 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
For<IRepository<TipoServico>>().Use<Repository<TipoServico>>(); |
This file contains 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
package com.bemobi.wap.config; | |
import java.util.Properties; | |
import javax.persistence.EntityManagerFactory; | |
import javax.sql.DataSource; | |
import org.hibernate.ejb.HibernatePersistence; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains 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 UserRequiredAnnotationInterceptor extends HandlerInterceptorAdapter | |
{ | |
@Override | |
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception | |
{ | |
if (handler == null) | |
{ | |
return true; | |
} |
This file contains 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 UserRequiredAnnotationInterceptor extends HandlerInterceptorAdapter | |
{ | |
@Override | |
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception | |
{ | |
if (handler == null) | |
{ | |
return true; | |
} |
OlderNewer