Base solution for your next web application

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>
Question

Hi,

I have a modal-component which is containing a custom control. My custom-control is a combination of "select" and "button" controls. When you click button control, a new modal is appearing to insert a new item into the selectbox. When i click the "button", new modal is apperaring inside the previous modal as it was shown below. How can i display second modal outside of the first modal's boundary?

[attachment=0:2zwda31a]modals.jpg[/attachment:2zwda31a]

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> ?

I am following "step-by-step devolopment" documentation. "Should_Create_Person_With_Valid_Arguments" test is giving an error. Can you please guide me how i need to correct this issue?

Result Message: Missing type map configuration or unsupported mapping.

Mapping types: CreatePersonInput -> Person OY.EvdenIs.People.Dto.CreatePerson.Input -> OY.EvdenIs.People.Person

Note: I have created Person table with "Guid" type ID instead of "long" by using code: public class Person: FullAuditedEntity<Guid>

Do i need to make any change to the given code while defining CreatePerson DTO? public class CreatePersonInput

I have tryed "public class CreatePersonInput: FullAuditedEntity<Guid>" but itt didnt work.

Showing 1 to 6 of 6 entries