Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "olcaolgun"

Answer

Hi,

I replaced the class definition as "modal-dialog" instead of "modal fade". It has worked fine.

Old Code:

<div bsModal #linkedAccountsModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"

New Code:

<div bsModal #linkedAccountsModal="bs-modal" class="modal-dialog" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"
Answer

Hi,

Thanks for your answer. I have checked the "linked accoount" modal sample and figure out the reason of the problem. but couldn't solve.

In "linked accoount" modal, the code is working properly because second modal is not defined in a custom control. And definition of the second modal is out of the first modal's <div>.

Your Code:

<div bsModal #linkedAccountsModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" [config]="{keyboard: false}">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">
                    <span>{{l("LinkedAccounts")}}</span>
                    <button class="btn btn-primary blue pull-right" (click)="manageLinkedAccounts()"><i class="fa fa-plus"></i>{{l("LinkNewAccount")}}</button>
                </h4>
            </div>
            <div class="modal-body">
                <div id="LinkedAccountsTable"></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn default pull-right" (click)="close()">{{l("Close")}}</button>
            </div>
        </div>
    </div>
</div>
<linkAccountModal #linkAccountModal (modalSave)="getLinkedUsers()"></linkAccountModal>

If it is a user control, "linkAccountModal" is defined in first modal's division "<div class="modal-body">" instead of previous code.

In My Example Your Code Become like this and second modal is appearing inside the first modal's frame.

<div bsModal #linkedAccountsModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" [config]="{keyboard: false}">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">
                    <span>{{l("LinkedAccounts")}}</span>
                    <button class="btn btn-primary blue pull-right" (click)="manageLinkedAccounts()"><i class="fa fa-plus"></i>{{l("LinkNewAccount")}}</button>
                </h4>
            </div>
            <div class="modal-body">
          <linkAccountModal #linkAccountModal (modalSave)="getLinkedUsers()"></linkAccountModal>
                <div id="LinkedAccountsTable"></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn default pull-right" (click)="close()">{{l("Close")}}</button>
            </div>
        </div>
    </div>
</div>

My template is:

Angular2 + ASP.NET Core

System is giving error in line: var person = input.MapTo<Person>();

public async Task CreatePerson(CreatePersonInput input)
{
    var person = input.MapTo<Person>();
    await _personRepository.InsertAsync(person);
}

INPUT PARAMETERS:

{ "input": { "name": " zxcxc", "surname": "zxczxc", "emailAddress": "[email protected]", "isDeleted": false, "deleterUserId": null, "deletionTime": null, "lastModificationTime": null, "lastModifierUserId": null, "creationTime": "2017-03-27T09:00:11.899872+04:00", "creatorUserId": null, "id": "00000000-0000-0000-0000-000000000000" } }

ERROR LOG:

AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.

CreatePersonInput -> Person OY.EvdenIs.People.Dto.CreatePerson.Input -> OY.EvdenIs.People.Person

Yes. As it is written in the document.


[AutoMapTo(typeof(Person))] public class CreatePersonInput { [Required] [MaxLength(Person.MaxNameLength)] public string Name { get; set; }

[Required]
[MaxLength(Person.MaxSurnameLength)]
public string Surname { get; set; }

[EmailAddress]
[MaxLength(Person.MaxEmailAddressLength)]
public string EmailAddress { get; set; }

}


Can you please send a sample code for "CREATING A NEW PERSON" , if we should define PbPersons tabke with FullAuditedEntity<Guid> ?

Showing 1 to 4 of 4 entries