Ok it clear to me now
Thank you
Hi can you please give me the sample how to implement Process.start() i already try put in .ts file but when i click the error show
ERROR TypeError: Cannot read property 'Process' of undefined
at PhoneBookComponent.webpackJsonp.2170.PhoneBookComponent.callExe (phonebook.component.ts:40)
at Object.eval [as handleEvent] (PhoneBookComponent.html:35)
at handleEvent (core.es5.js:11914)
at callWithDebugContext (core.es5.js:13206)
at Object.debugHandleEvent [as handleEvent] (core.es5.js:12794)
at dispatchEvent (core.es5.js:8814)
at core.es5.js:9406
at HTMLButtonElement.<anonymous> (platform-browser.es5.js:2687)
at ZoneDelegate.webpackJsonp.666.ZoneDelegate.invokeTask (zone.js:398)
at Object.onInvokeTask (core.es5.js:4140)
at ZoneDelegate.webpackJsonp.666.ZoneDelegate.invokeTask (zone.js:397)
at Zone.webpackJsonp.666.Zone.runTask (zone.js:165)
at HTMLButtonElement.ZoneTask.invoke (zone.js:460)
and this is the code that i try on .ts file
callExe(): void{
var p = new System.Diagnostics.Process();
p.StartInfo.FileName = "notepad.exe";
p.StartInfo.Arguments = "Test";
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardOutput.ReadToEnd().Dump();
}
and this the button that i try to call
<button (click)="callExe()" class="btn default" type="submit"><i class="icon-magnifier"></i></button>
Thank you
Hi
it is possible when i click the left menu and then call .exe program with pass parameters to my Drive C:\
i follow the help from internet
function executeCommands(inputparms)
{
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\WINDOWS\\Notepad.exe";
if (inputparms != "")
{
var commandParms = document.Form1.filename.value;
}
oShell.ShellExecute(commandtoRun, commandParms, "", "open", "1");
}
it not working
Thank you
Hi i got work for create DisplayCode Field to the DB.
i also update
OrganizationUnitDto.cs Class
[AutoMapFrom(typeof(OrganizationUnit))]
public class OrganizationUnitDto : AuditedEntityDto<long>
{
public long? ParentId { get; set; }
public string Code { get; set; }
public string DisplayName { get; set; }
public int MemberCount { get; set; }
public string DisplayCode { get; set; }
}
then run nswag/refresh.bat file and also modify the angular side to display DisplayCode Field but when i run the page DisplayCode Field is empty
i also check the service-proxies.ts file DisplayCode also show
xport class OrganizationUnitDto {
parentId: number;
code: string;
displayName: string;
memberCount: number;
displayCode: string;
lastModificationTime: moment.Moment;
lastModifierUserId: number;
creationTime: moment.Moment;
creatorUserId: number;
id: number;
constructor(data?: any) {
if (data !== undefined) {
this.parentId = data["parentId"] !== undefined ? data["parentId"] : null;
this.code = data["code"] !== undefined ? data["code"] : null;
this.displayName = data["displayName"] !== undefined ? data["displayName"] : null;
this.memberCount = data["memberCount"] !== undefined ? data["memberCount"] : null;
this.displayCode = data["displayCode"] !== undefined ? data["displayCode"] : null;
this.lastModificationTime = data["lastModificationTime"] ? moment(data["lastModificationTime"].toString()) : null;
this.lastModifierUserId = data["lastModifierUserId"] !== undefined ? data["lastModifierUserId"] : null;
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : null;
this.creatorUserId = data["creatorUserId"] !== undefined ? data["creatorUserId"] : null;
this.id = data["id"] !== undefined ? data["id"] : null;
}
}
How can i solve this issue Thank you
Hi this link is very helpful: <a class="postlink" href="https://www.aspnetzero.com/Documents/Extending-Existing-Entities#extending-non-abstract-entities">https://www.aspnetzero.com/Documents/Ex ... t-entities</a>
but i have the problem when extending AbpOrganizationUnits table
public class OrgChartExtend : OrganizationUnit
{
public virtual string DisplayCode { get; set; }
}
public partial class Added_DisplayCode_To_OrganizationUnit : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn< string > (name: "DisplayCode", table: "dbo.AbpOrganizationUnits", nullable: true, maxLength: 50);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(name: "DisplayCode", table: "dbo.AbpOrganizationUnits");
}
}
and when i update this to the database error show this
PM> Update-Database
Executed DbCommand (35ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT [MigrationId], [ProductVersion]
FROM [__EFMigrationsHistory]
ORDER BY [MigrationId];
Applying migration '20170625042330_Added_DisplayCode_To_OrganizationUnit'.
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
ALTER TABLE [dbo.AbpOrganizationUnits] ADD [DisplayCode] nvarchar(50);
System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "dbo.AbpOrganizationUnits" because it does not exist or you do not have permissions.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean closeConnection)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
ClientConnectionId:74ac8c62-7c3f-4b38-9db1-246f2ccfc65f
Error Number:4902,State:1,Class:16
Cannot find the object "dbo.AbpOrganizationUnits" because it does not exist or you do not have permissions.
Thank you
Hi I got it work by Modify IIS
Open IIS (my version 8.5)
Thank you
Hi i got it working now, i just copy source to new folder and build it again
Thank you