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
#region Variables | |
public string path { get; set; } | |
public string searchTerm { get; set; } | |
public int lineNumberCount { get; set; } | |
public List<string> FileList { get; set; } | |
#endregion | |
public GetFile() | |
{ |
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
foreach ($file in $FileList) | |
{ | |
$newFileURI = $TestDir + $file + $TestDirExtension | |
$makeNewFile = Invoke-RestMethod $newFileURI -Method POST -Body $jsonobject -ContentType application/json | |
} |
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 createRESTFileStructure($path, $directories, $Files) | |
{ | |
$RestURL = "myURL" | |
foreach ($dir in $directories) | |
{ | |
$newPath = $RestURL + $dir | |
$response = Invoke-RestMethod $newPath -Method POST | |
New-Item $newPath -type directory | |
} |
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
System.Windows.Markup.XamlParseException occurred | |
HResult=-2146233087 | |
LineNumber=6 | |
LinePosition=9 | |
Message='The invocation of the constructor on type 'app.MainWindow' that matches the specified binding constraints threw an exception.' Line number '6' and line position '9'. | |
Source=PresentationFramework | |
StackTrace: | |
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) | |
InnerException: | |
HResult=-2146233080 |
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
System.Windows.Markup.XamlParseException occurred | |
HResult=-2146233087 | |
LineNumber=6 | |
LinePosition=9 | |
Message='The invocation of the constructor on type 'Verifone.Utility.MainWindow' that matches the specified binding constraints threw an exception.' Line number '6' and line position '9'. | |
Source=PresentationFramework | |
StackTrace: | |
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) | |
InnerException: | |
HResult=-2146233080 |
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 selectPOSData ($Server, $Database, $Username, $Password) { | |
$Connection = New-Object System.Data.SQLClient.SQLConnection | |
$Connection.ConnectionString = "server=$Server;database=$Database;User ID= $Username; Password= $Password;" | |
$Command = New-Object System.Data.SQLClient.SQLCommand | |
$Connection.Open() | |
$Command.Connection = $Connection | |
$Command.CommandText = 'somequery' | |
# Fill the DataSet. |
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 selectPOSData ($Server, $Database, $query, $Username, $Password) { | |
$Connection = New-Object System.Data.SQLClient.SQLConnection | |
$Connection.ConnectionString = "server='$Server';database='$Database';User ID= $Username; Password= $Password;" | |
$Connection.Open() | |
$Command = New-Object System.Data.SQLClient.SQLCommand | |
$Command.Connection = $Connection | |
$Command.CommandText = $query | |
#Set the SqlDataAdapter's SelectCommand. | |
# Fill the DataSet. |
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
foreach ($dir in $directories) | |
{ | |
New-Item $dirPath -type directory -value #value for including directory data or metadata | |
} | |
foreach ($file in $Files) | |
{ | |
New-Item ($dirPath + $FileName) -ItemType file -value #value for including file data | |
Join-Path -Parent $dirPath -ChildPath $FileName | |
} |
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
foreach ($dir in $directories) | |
{ | |
New-Item $dirPath -type directory -value #value for including directory data or metadata | |
foreach ($file in $Files) | |
{ | |
New-Item ($dirPath + $FilePath) -ItemType file -value #value for including file data | |
} | |
} |
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
$connectionString = "Server= $SQLServer, $PORT;Database=$SQLDBName;User ID= $Username; Password= $Password;" | |
$conn = New-Object System.Data.SqlClient.SqlConnection | |
$conn.ConnectionString = $connectionString | |
$cmd = New-Object System.Data.SqlClient.SqlCommand | |
$cmd.commandtext = $query | |
$conn.open() | |
if ($conn.Open() -eq $true) | |
{ |
NewerOlder