fixed the program.cs and run in VC code

This commit is contained in:
2026-07-30 17:23:48 +10:00
parent ce2b3ba8c9
commit 5d2e989ee9
112 changed files with 17313 additions and 17245 deletions
+53 -53
View File
@@ -1,53 +1,53 @@
import { CommonModule } from '@angular/common';
import { Component, OnDestroy, OnInit, signal, ViewChild } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Table, TableModule } from 'primeng/table';
import { Person } from '../models';
import { IconFieldModule } from 'primeng/iconfield';
import { InputIconModule } from 'primeng/inputicon';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
import { ButtonModule } from 'primeng/button';
import { InputTextModule } from 'primeng/inputtext';
@Component({
selector: 'app-pickperson',
imports: [TableModule, ButtonModule,CommonModule, InputTextModule, FormsModule,IconFieldModule,InputIconModule],
templateUrl: './pickperson.html',
styleUrl: './pickperson.css'
})
export class Pickperson implements OnInit, OnDestroy{
@ViewChild(Table) dt2!: Table;
constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig)
{
}
loading = false;
familyList = signal<Person[]>([]);
selectedPerson!: Person;
handleInput(event: Event) {
const value = (event.target as HTMLInputElement).value;
this.dt2.filterGlobal(value, 'contains');
}
edit(id: number): void {
}
cancel(e:Event):void {
e.preventDefault();
this.ref.close(null);
}
select(e:Event):void {
e.preventDefault();
this.ref.close(this.selectedPerson);
}
ngOnDestroy(): void {
}
ngOnInit(): void {
console.log("pick person the familyList", this.config);
this.familyList.set(this.config.data.familyList);
}
}
import { CommonModule } from '@angular/common';
import { Component, OnDestroy, OnInit, signal, ViewChild } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Table, TableModule } from 'primeng/table';
import { Person } from '../models';
import { IconFieldModule } from 'primeng/iconfield';
import { InputIconModule } from 'primeng/inputicon';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
import { ButtonModule } from 'primeng/button';
import { InputTextModule } from 'primeng/inputtext';
@Component({
selector: 'app-pickperson',
imports: [TableModule, ButtonModule,CommonModule, InputTextModule, FormsModule,IconFieldModule,InputIconModule],
templateUrl: './pickperson.html',
styleUrl: './pickperson.css'
})
export class Pickperson implements OnInit, OnDestroy{
@ViewChild(Table) dt2!: Table;
constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig)
{
}
loading = false;
familyList = signal<Person[]>([]);
selectedPerson!: Person;
handleInput(event: Event) {
const value = (event.target as HTMLInputElement).value;
this.dt2.filterGlobal(value, 'contains');
}
edit(id: number): void {
}
cancel(e:Event):void {
e.preventDefault();
this.ref.close(null);
}
select(e:Event):void {
e.preventDefault();
this.ref.close(this.selectedPerson);
}
ngOnDestroy(): void {
}
ngOnInit(): void {
console.log("pick person the familyList", this.config);
this.familyList.set(this.config.data.familyList);
}
}