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.Linq.Expressions; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Html; | |
namespace MyProject.Helpers | |
{ |
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
//be sure to reference System.Xml; | |
//need a using using System.Data.OleDb; | |
//set up an adapter and a data table to iterate over | |
var resultsAdapter = new OleDbDataAdapter(); | |
var resultsTable = new DataTable(); | |
resultsAdapter.Fill(resultsTable, Dts.Variables["ZipCodesResultSet"].Value); | |
var list = new StringBuilder(); | |
int count = 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
//note that variable name spaces are not to be used and variables are case sensitive | |
object myVar = Dts.Variables["MyCaseSensitiveVariableName"].Value; |
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
(DT_WSTR, 4) YEAR( @[System::StartTime] ) | |
+ "-" | |
+ (DT_WSTR, 1)( MONTH( @[System::StartTime] ) < 10 ? (DT_WSTR, 1)"0" : (DT_WSTR, 0)"" ) | |
+ (DT_WSTR, 4) MONTH ( @[System::StartTime] ) | |
+ "-" | |
+ (DT_WSTR, 1)( DAY( @[System::StartTime] ) < 10 ? (DT_WSTR, 1)"0" : (DT_WSTR, 0)"" ) | |
+ (DT_WSTR, 4) DAY ( @[System::StartTime] ) | |
+ " " | |
+ (DT_WSTR, 1)( DATEPART( "Hour" , @[System::StartTime] ) < 10 ? (DT_WSTR, 1)"0" : (DT_WSTR, 0)"" ) | |
+ (DT_WSTR, 2) DATEPART( "Hour" , @[System::StartTime] ) |
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
function Global:CopyFilesInFolder([string] $FromDir, [string] $ToDir, [string] $FileExtension) | |
{ | |
#Destination for files | |
$From = $FromDir + "*" + $FileExtension | |
Copy-Item $From $ToDir | |
} |
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
function Global:ClearDir([string] $PATH) | |
{ | |
$AllItemsInPath = $Path + "*" | |
Remove-Item $AllItemsInPath -recurse -force | |
} |
NewerOlder