Base solution for your next web application

Activities of "bakinalp"

Hi guys,

I'm totallay new to the the aspnetzero and angular so please bear with me.

My objective is to create a procurement request form. Form has some generic fields and 2 areas where user can add products and invitees to the request.

Project type: Angular/Core I have 3 objects as follows: PEvent PEventProduct (Contains PEventID, ProductID, and fields like quantity required) PEventInvitee Product

I have no problems saving the initial Pevent Object but once inserted I need to get the object immediatly so that I can save products and invitees associated to it as well. Below code works for the first part where I insert the pevent. But it fails on second part stating EventId must be between 1 and 2147483647 I believe the problem will be solved if I can get the inserted objects eventid and pass it to neweventproduct.eventid.

The question is whether it is possible to get the resulting object after insert operation.

save(): void {
        this._procurementService.createPEvent(this.pevent)
                .finally(() => this.saving = false)
                .subscribe(() => {
                           this.notify.info(this.l('SavedSuccessfully'));              
               });
//works  up to here without a problem 
        
        //this.newEventProduct.EventId = <- Pass EventID here from the result
        this._procurementService.addEventProduct(this.newEventProduct).subscribe(
                  result => {
                     this.editingPevent.eventProducts.push(result);
                     this.newEventProduct.quantity = 1;
                     this.notify.success(this.l('SavedSuccessfully'))
                 });
//errors here stating EventId must be between 1 and 2147483647 
}
Showing 1 to 1 of 1 entries