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
/// <summary> | |
/// Recupera o relatório de questionários respondidos | |
/// </summary> | |
/// <param name="userId">Código do usuário</param> | |
/// <param name="startDate">Data de filtro: De</param> | |
/// <param name="endDate">Data de filtro: Até</param> | |
/// <param name="trainingId">Código do treinamento</param> | |
/// <returns></returns> | |
public IEnumerable<UserReportDTO> GetReports(int userId, DateTime? startDate, DateTime? endDate, string trainingId) | |
{ |
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
--tamanho da página | |
DECLARE @PageSize INT | |
SET @PageSize = 25 | |
--Índice da página (começa em 1) | |
DECLARE @Page INT | |
SET @Page = 4 | |
--Índice do primeiro registro a ser exibido (não precisa ser um parâmetro, pode ser calculado internamente) | |
DECLARE @PageStartIndex INT | |
SET @PageStartIndex = ((@Page - 1) * @PageSize); --qual o primeiro registro da página |
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 interface IDomainEntity | |
{ | |
object Id { get; set; } | |
} | |
public interface IRepository<T> : IDisposable where T : IDomainEntity | |
{ | |
IQueryable<T> GetAll(); | |
IQueryable<T> Query(string sql, params object[] args); | |
IQueryable<T> PagedQuery(long pageNumber, long pageSize, string sql, params object[] args); |
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
/// <reference path="../ts/sammyjs-0.7.d.ts" /> | |
/// <reference path="../ts/jquery-1.8.d.ts" /> | |
/// <reference path="../ts/knockout-2.2.d.ts" /> | |
/// <reference path="bootstrapper.ts" /> | |
module dashboard { | |
export class queryParameters { | |
constructor (campaignId: string, interval: string, date?: Date, from?: Date, to?: Date) { | |
this.campaignId = campaignId; | |
this.interval = interval; |
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
var dashboard; | |
(function (dashboard) { | |
var queryParameters = (function () { | |
function queryParameters(campaignId, interval, date, from, to) { | |
this.campaignId = campaignId; | |
this.interval = interval; | |
this.date = date; | |
this.from = from; | |
this.to = to; | |
} |
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
<script type="text/html" id="base-report-template"> | |
<div class="loading" data-bind="visible: visibleCondition"></div> | |
<h2 data-bind="text: title"></h2> | |
<div data-bind="template: { name: 'error-template' }, visible: iteratedCollection.length === 0"></div> | |
<div data-bind="visibility: !visibleCondition && iteratedCollection.length > 0"> | |
<div class="span12" data-bind="css: { 'plot-wrapper': wrap }, style: { height: wrap ? height : 'auto' }"> | |
<table class="table table-hover"> | |
<thead> | |
<tr> |
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.Threading.Tasks; | |
using Microsoft.AspNet.SignalR.Client; | |
using Microsoft.AspNet.SignalR.Client.Hubs; | |
using TecUnica.Core; | |
namespace TecUnica.PubSub | |
{ | |
public class Subscriber : ISubscriber | |
{ |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var s = new Subscriber(); | |
const string topic = "Topic.Name"; | |
s.Subscribe<string>(topic, msg => Console.WriteLine("NOTIFIED: " + msg)).Wait(); | |
var p = new Publisher(); |
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
<rule name="RemoveDirectory"> | |
<match url="directory/(.*)" /> | |
<action type="Rewrite" url="/{R:1}" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^www.mysite.com$" /> | |
</conditions> | |
</rule> |
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 Brand | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public int? ParentBrandId { get; set; } | |
} |
OlderNewer