Skip to content

Instantly share code, notes, and snippets.

View juanplopes's full-sized avatar
🌲
Is that a Segment Tree problem?

Juan Lopes juanplopes

🌲
Is that a Segment Tree problem?
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using Telerik.Web.Mvc;
namespace Simple.Web.Mvc.Telerik
{
public class GridParser
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace ConsoleApplication4
{
public static class Program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace ConsoleApplication4
{
public static class Program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using TVGlobo.SDRH.Config;
using Simple;
using TVGlobo.SDRH.Web.Controllers;
using TVGlobo.SDRH.Web.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Net;
namespace ConsoleApplication8
public static class MontaFiltro<T, P>
where P : DbParameter, new()
{
public static string RetornaWhere(T obj, out List<P> parameters)
{
parameters = new List<P>();
var where = new List<string>();
foreach (var property in obj.GetType().GetProperties())
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
public void ExcluirPacote(Int32 idPacote)
{
ISession session = SessionManager.GetSession();
session.BeginTransaction();
try
{
TbPacoteDao daoP = new TbPacoteDao(session);
TbItemPacoteDao daoItemP = new TbItemPacoteDao(session);
TbMovimentoDao daoCreditos = new TbMovimentoDao(session);
TbClientePacoteDao daoClientePacote = new TbClientePacoteDao(session);
[RequiresTransaction]
public void ExcluirPacote(Int32 idPacote)
{
TbClientePacote.Delete(x => x.Pacote.Id == idPacote);
TbItemPacote.Delete(x => x.Pacote.Id == idPacote);
TbMovimento.Delete(x => x.Pacote.Id == idPacote);
TbPacote.Delete(idPacote);
}
public Configuracao CarregarConfiguracao()
{
Configuracao configuracao = new Configuracao();
IList<TbParametro> parametros = RulesFactory.Create<ITbParametroRules>()
.ListAll(OrderBy.None());
foreach (TbParametro parametro in parametros)
{
if (parametro.Name == Configuracao.BalancaAtivaProperty)
configuracao.BalancaAtiva = bool.Parse(parametro.Value);