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
<asp:LinqDataSource ID="LinqDataSource1" runat="server" | |
ContextTypeName="iShouldKnow.Data.iShouldKnowDataContext" OrderBy="FirstName" | |
Select="new (Id, LastName, FirstName)" TableName="Persons" | |
Where="CreatedByUserId == @CreatedByUserId"> | |
<WhereParameters> | |
<asp:ProfileParameter DbType="Guid" Name="CreatedByUserId" PropertyName="UserId" /> | |
</WhereParameters> | |
</asp:LinqDataSource> |
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
protected void SiteCreateUserWizard_CreatedUser(object sender, EventArgs e) | |
{ | |
// get the newly create user and add custom defaults to the profile data | |
ProfileCommon userProfile = (ProfileCommon)ProfileCommon.Create(this.SiteCreateUserWizard.UserName, true); | |
// we need to add'l store the UserId of the user in its profile data so that we can obtain | |
// it later when using object binding | |
MembershipUser createdUser = Membership.GetUser(this.SiteCreateUserWizard.UserName); | |
userProfile.UserId = (Guid)createdUser.ProviderUserKey; | |
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
<asp:LinqDataSource ID="LinqDataSource1" runat="server" | |
ContextTypeName="Company.Data.CompanyDataContext" OrderBy="FirstName" | |
Select="new (Id, LastName, FirstName)" TableName="Persons" | |
Where="CreatedByUserId == @CreatedByUserId"> | |
<WhereParameters> | |
<asp:ProfileParameter DbType="Guid" Name="CreatedByUserId" PropertyName="UserId" /> | |
</WhereParameters> | |
</asp:LinqDataSource> |
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
ROBOCOPY.EXE "C:\Source" "C:\Destination" /MIR | |
SET ROBOCOPY_ERRORLEVEL=%ERRORLEVEL% | |
ECHO Error Level: %ROBOCOPY_ERRORLEVEL% | |
if %ROBOCOPY_ERRORLEVEL% == 1 set ROBOCOPY_ERRORLEVEL=0 | |
if %ROBOCOPY_ERRORLEVEL% == 2 set ROBOCOPY_ERRORLEVEL=0 | |
if %ROBOCOPY_ERRORLEVEL% == 3 set ROBOCOPY_ERRORLEVEL=0 | |
if %ROBOCOPY_ERRORLEVEL% == 4 set ROBOCOPY_ERRORLEVEL=0 | |
if %ROBOCOPY_ERRORLEVEL% == 5 set ROBOCOPY_ERRORLEVEL=0 | |
if %ROBOCOPY_ERRORLEVEL% == 6 set ROBOCOPY_ERRORLEVEL=0 | |
if %ROBOCOPY_ERRORLEVEL% == 7 set ROBOCOPY_ERRORLEVEL=0 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<!-- snip --> | |
<PackageDir>Package\$(Configuration)</PackageDir> | |
</PropertyGroup> | |
<!-- snip --> | |
<Target Name="AfterBuild"> | |
<!-- Load up the information from the assembly --> | |
<GetAssemblyIdentity AssemblyFiles="$(OutputPath)$(AssemblyName).dll"> |
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
MSBUILD.exe /t:Build,Package,Publish /p:Configuration=Debug .\MyProject\MyProject.csproj |
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.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Reflection; | |
namespace Helpers | |
{ | |
/// <summary> | |
/// Used by the <see cref="PropertyHelper.CopyProperties"/> method 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
$projects = Get-Project -All | Select @{ Name="ProjectName";Expression={$_.ProjectName}}, @{Name="Has";Expression={Get-Package Insight.Database -ProjectName $_.ProjectName}} | where { $_.Has -ne 'Insight.Database 1.1.5' } | |
$projects | select { Uninstall-Package Insight.Database -ProjectName $_.ProjectName -Force } | |
$projects | select { Install-Package Insight.Database -Version 1.1.4 -ProjectName $_.ProjectName } |
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
@helper BrList(IEnumerable<string> list) | |
{ | |
var first = true; | |
foreach (var str in list) | |
{ | |
if (!first) | |
{ | |
<text><br /></text> | |
} | |
else |
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
@helper BullList(IEnumerable<string> list) | |
{ | |
var first = true; | |
foreach (var str in list) | |
{ | |
if (!first) | |
{ | |
<text> • </text> | |
} | |
else |
OlderNewer