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; | |
using System.Collections.Generic; | |
using ServiceStack.Text; | |
namespace TestServiceStackText | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
// Excel de bosta! http://stackoverflow.com/questions/727466/how-do-i-convert-an-excel-serial-date-number-to-a-net-datetime#727495 | |
if (dtnasc > 59) | |
DtNascimento = new DateTime(1899, 12, 31).AddDays(dtnasc); |
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 IList<Usuaria> GetUsersTakingPill() | |
{ | |
return FindUsers((Usuaria arg) => arg.PrimeiraPilula > DateTime.Today.AddDays(-21) && arg.PrimeiraPilula <= DateTime.Today); | |
} | |
public IList<Usuaria> GetUsersThatFinishedToTakePill() | |
{ | |
return FindUsers((Usuaria arg) => arg.PrimeiraPilula < DateTime.Today.AddDays(-20)); | |
} |
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 override ClientePessoaJuridica Save(string jsv) | |
{ | |
ClientePessoaJuridica model = jsv.FromJsv<ClientePessoaJuridica>(); | |
var lastindex = 0; | |
var startmark = "Imagem:"; | |
foreach (var dig in model.Digitalizacoes) | |
{ | |
var start = jsv.IndexOf(startmark, lastindex) + startmark.Length; | |
var end = lastindex = jsv.IndexOf(",", start); | |
dig.Imagem = Convert.FromBase64String(jsv.Substring(start, end - start).Replace(" ", "+")); |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data.SqlClient; | |
using System.Configuration; | |
using System.Data; | |
namespace Infra | |
{ |
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 tipoVeiculo = $(this).find("span").text(); | |
var tipoVeiculoSingular = (tipoVeiculo + " ").replace(/s /g, " "); | |
var tipoVeiculoSexo = tipoVeiculoSingular[tipoVeiculoSingular.length - 2]; | |
$(".createnew").text("Criar nov" + tipoVeiculoSexo + " " + tipoVeiculoSingular); |
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
if object_id('tempdb..#tempCobranca1') is not null | |
drop table #tempCobranca1 | |
select | |
parte, | |
tipoIf, | |
grupo, | |
faixa, | |
modalidadeLiquidacao, | |
dataOperacao, |
NewerOlder