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
<head runat="server"> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<link rel="stylesheet" href="Content/public.css" type="text/css" media="all" /> | |
<script src="<%: Url.Content("~/Scripts/jquery-1.4.1.min.js") %>" type="text/javascript"></script> |
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.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using System.Web.Mvc; | |
namespace Web.Areas.Public | |
{ |
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
namespace Web.Areas.Public | |
{ | |
public partial class Public : System.Web.Mvc.ViewMasterPage | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
} | |
} | |
} |
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
@echo off | |
SET database.name="${database.name}" | |
SET sql.files.directory="%DIR%..\${folder.database}" | |
SET server.database="${server.database}" | |
SET repository.path="${repository.path}" | |
SET version.file="${file.version}" | |
SET version.xpath="//buildInfo/version" | |
SET environment="${environment}" |
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
[Test] | |
public void UpdateAccountingYearTemplate() | |
{ | |
using (var fixture = new FixtureInit(@"http://localhost")) | |
{ | |
//INIT | |
var data = new PeriodsData(fixture.Context); | |
var setup = fixture.Setup; | |
//ACT |
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 Trackyourtasks.Core.DAL.DataModel; | |
namespace Trackyourtasks.Core.DAL.Repositories | |
{ | |
/// <summary> | |
/// Repository of Blog posts |
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 api_test(url, type, data, callback) { | |
$.ajax( | |
{ | |
url: url, | |
type: type, | |
processData: false, | |
contentType: 'application/json; charset=utf-8', | |
data: JSON.stringify(data), | |
dataType: 'json', | |
async: false, |
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
namespace MyNamespace { | |
public static class MyHelper | |
{ | |
public static MvcHtmlString MyHelper(this HtmlHelper helper) | |
{ | |
return helper.AntiForgeryToken(); | |
} | |
} | |
} |
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
Watcher: | |
(wood) Watch at least one repository | |
(bronze) Watcher more than 10 | |
(silver) Watcher more than 100 | |
(gold) Watcher more than 500 | |
Follower: | |
(wood) Follow at least one person | |
(bronze) Follow more than 10 people | |
(silver) Follow more than 100 people |
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 HostedByCheckAttribute : ActionFilterAttribute { | |
public override void OnActionExecuting(ActionExecutingContext filterContext) { | |
var postId = filterContext.ActionParameters["id"] as int; | |
var postsRepo = new PostsRepository(); | |
var post = postsRepo.Get(postId); | |
if (!post.IsHostedBy(/* ... */)) { | |
filterContext.Result = new ViewResult { ViewName = "InvalidOwner", ViewBag = filterContext.Controller.ViewBag, ViewData = filterContext.Controller.ViewData }; | |
} |
OlderNewer