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 Castle.MicroKernel.Registration; | |
using Castle.Windsor; | |
using CommonServiceLocator.WindsorAdapter; | |
using HSTM.Common.Web.SessionState; | |
using HSTM.HLC.BusinessLogic; | |
using HSTM.HLC.Common; | |
using HSTM.HLC.DataAccess; | |
using HSTM.HLC.Web.UI.Controllers; | |
using Microsoft.Practices.ServiceLocation; |
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
============================== | |
private void Start() | |
{ | |
var container = new WindsorContainer(); | |
ServiceLocator.SetLocatorProvider(() => new WindsorServiceLocator(container)); | |
container.Install( | |
new HLCCommonInstaller(), | |
new DataAccessInstaller(), | |
new WebUIInstaller(), | |
new HLCBusinessLogicInstaller() |
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
@Html.TextboxSubmission(x=>x.FirstName).ToString() | |
This would emit: | |
<div class = “surroundingElement”> | |
<label for=”FirstName”>First Name</label> | |
<input name=”FirstName” type=”text”></input> | |
</div> |
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
@Html.TextboxSubmission(x=>x.FName).DisplayLabel(“First Name”).ToString() | |
@Html.TextboxSubmission(x=>x.FName).HideLabe().AddClassToInput("MakeMePink").ToString() |
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
@(Html.Grid("Basic") | |
.SetCaption("Basic Grid") | |
.AddColumn(new Column("CustomerId") | |
.SetLabel("Id")) | |
.AddColumn(new Column("Name")) | |
.AddColumn(new Column("Company")) | |
.AddColumn(new Column("EmailAddress")) | |
.AddColumn(new Column("Last Modified")) | |
.AddColumn(new Column("Telephone")) | |
.SetUrl(Url.Action("GridDataBasic")) |
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 OrdersJqGridModel() | |
{ | |
OrdersGrid = new JQGrid | |
{ | |
Columns = new List() | |
{ | |
new JQGridColumn { DataField = "OrderID", | |
// always set PrimaryKey for Add,Edit,Delete operations | |
// if not set, the first column will be assumed as primary key | |
PrimaryKey = true, |
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
protected override Grid<StatementSearchResultsetDTO> BuildGrid() | |
{ | |
GridBuilder.LinkColumnFor(x => x.StatementName) | |
.ForAction<StatementController>(x => x.AddUpdate(null)) | |
.ToPerformAction(ColumnAction.AddUpdateItem) | |
.ToolTip("Edit Item") | |
.DefaultSortColumn(); | |
GridBuilder.DisplayFor(x => x.Description); | |
GridBuilder.DisplayFor(x => x.UpdateDateTime).DisplayHeader("Updated"); | |
return this; |
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 test | |
{ | |
[Theory, TestData] | |
public void make_this_populate_a_controller( TestController SUT) | |
{ | |
var actionResult = SUT.Get("hello"); | |
var x = ""; | |
} | |
} |
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 React = require("react"); | |
var bs = require("react-bootstrap"); | |
var RHInput = React.createClass({ | |
//contextTypes: { getValue: React.PropTypes.func.isRequired }, | |
natEnglishFormCamelCase: function (val) { | |
//make this work | |
return val.toUpperCase(); |
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
co.wrap(function*() { | |
try { | |
var salt = yield bcrypt.genSalt(); | |
var hash = yield bcrypt.hash(this.password, salt); | |
this.password = hash; | |
done(); | |
} | |
catch (err) { | |
done(err); | |
} |
OlderNewer