Activities of "krushnakant"

hi

The fields name should be:

ProjectWorkLogDetailViewModel[0].Id  
ProjectWorkLogDetailViewModel[0].ProjectWorkLogId   
 
ProjectWorkLogDetailViewModel[1].Id  
ProjectWorkLogDetailViewModel[1].ProjectWorkLogId   

Hello Sir Thank you for Valueable response Above Answer Is Static Logic Not Dynamic i need Dynamicaly rows created using Jquery on click and Submit

Can you share the details? You can set the correct name property for these fields.

        
public class ProjectWorkLogViewModel
{
    public ProjectWorkLogViewModel()
    {
        ProjectWorkLogDetailViewModel = new List<ProjectWorkLogDetailViewModel>();
    }

    [Required]
    public Guid ProjectId { get; set; }
    public string ProjectName { get; set; }

    public List<ProjectWorkLogDetailViewModel> ProjectWorkLogDetailViewModel { get; set; }
}

public class ProjectWorkLogDetailViewModel
{
    public Guid Id { get; set; }
    public Guid ProjectWorkLogId { get; set; }

    [Required]
    public Guid EmployeeId { get; set; }
    public LogType LogType { get; set; }

    [Required]
    public string IssueNo { get; set; }

    [TextArea]
    public string IssueSummary { get; set; }

    [TextArea]
    public string LogSummary { get; set; }

    [Required]
    public float HoursLogs t; set; }

    [Required]
    [DataType(DataType.Date)]
    public DateTime LogDateTime { get; set; }
}

Create .cshml

@page
@using Training.Localization
@using Training.Web.Pages.Projects
@using Microsoft.Extensions.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@model Training.Web.Pages.ProjectWorkLogs.CreateModalModel
@using Training.ProjectWorkLogDetails
@inject IStringLocalizer<TrainingResource> L
@{
    Layout = null;
}
<form asp-page="/ProjectWorkLogs/CreateModal">
    <abp-modal>
        <abp-modal-header title="@L["NewProjectWorkLog"].Value"></abp-modal-header>
        <abp-modal-body>
            <div class="form-group">
                <label asp-for="Input.ProjectId">Project</label>
                <select asp-for="Input.ProjectId" class="form-control">
                    @if (Model.Projects != null)
                    {
                        @foreach (var project in Model.Projects)
                        {
                            <option value="@project.Id">@project.ProjectName</option>
                        }
                    }
                </select>
                <span asp-validation-for="Input.ProjectId"></span>
            </div>

            <div class="row">
                <abp-button id="AddProjectWorkLogDetails"
                            text="@L["AddProjectWorkLogDetails"].Value"
                            icon="plus"
                            button-type="Primary" />
            </div>
            <br />
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th class="text-center">Sr No</th>
                            <th class="text-center">Assign</th>
                            <th>Issue No</th>
                            <th>IssueSummary</th>
                            <th>Log Type</th>
                            <th>Log Summary</th>
                            <th>Spent Time</th>
                            <th>Log DateTime</th>
                            <th class="text-center">Action</th>
                        </tr>
                    </thead>
                    <tbody id="tbody">
                    </tbody>
                </table>
            </div>
        </abp-modal-body>
        <abp-modal-footer buttons="@(AbpModalButtons.Cancel | AbpModalButtons.Save)"></abp-modal-footer>
    </abp-modal>
</form>

<script>
	$(document).ready(function () {

	// Denotes total number of rows
	var rowIdx = 0;

	// jQuery button click event to add a row
        $('#AddProjectWorkLogDetails').on('click', function () {

		// Adding a row inside the tbody.
            $('#tbody').append(
                `&lt;tr id=&quot;R${++rowIdx}&quot;&gt;
                         &lt;td style=&quot;display:none&quot;&gt;
                                  &lt;input type=&quot;hidden&quot;  id=&quot;Id&quot;/&gt;
                         &lt;/td&gt;
            &lt;td class=&quot;row-index text-center&quot;&gt;
			&lt;p&gt;${rowIdx}&lt;/p&gt;
			&lt;/td&gt;
			&lt;td&gt;
			&lt;select asp-for=&quot;EmployeeId&quot;&gt;
                                        @if (Model.Projects != null)
                                        {
                                            @foreach (var project in Model.Projects)
                                            {
                                                &lt;option value=&quot;@project.Id&quot;&gt;@project.ProjectName&lt;/option&gt;
                                            }
                                        }
                                    &lt;/select&gt;
			&lt;/td&gt;
            &lt;td&gt;
            &lt;input type=&quot;text&quot;  id=&quot;IssueNo&quot; style=&quot;width: 150px;&quot; /&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;input type=&quot;text&quot;  id=&quot;IssueSummary&quot; style=&quot;width: 150px;&quot; /&gt;
            &lt;/td&gt;
            &lt;td&gt;
             &lt;abp-select asp-for=&quot;LogType&quot; style=&quot;width: 150px;&quot; /&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;input type=&quot;text&quot;  id=&quot;LogSummary&quot; style=&quot;width: 150px;&quot; /&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;input type=&quot;text&quot;  id=&quot;HoursLogs&quot; style=&quot;width: 150px;&quot; /&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;input type=&quot;date&quot;  id=&quot;LogDateTime&quot; style=&quot;width: 150px;&quot; /&gt;
            &lt;/td&gt;
			&lt;td class=&quot;text-center&quot;&gt;
				&lt;button class=&quot;btn btn-danger remove&quot;
				type=&quot;button&quot;&gt;Remove&lt;/button&gt;
				&lt;/td&gt;
			&lt;/tr&gt;`);

	});

	// jQuery button click event to remove a row.
	$('#tbody').on('click', '.remove', function () {

		// Getting all the rows next to the row
		// containing the clicked button
		var child = $(this).closest('tr').nextAll();

		// Iterating across all the rows
		// obtained to change the index
		child.each(function () {

		// Getting <tr> id.
		var id = $(this).attr('id');

		// Getting the <p> inside the .row-index class.
		var idx = $(this).children('.row-index').children('p');

		// Gets the row number from <tr> id.
		var dig = parseInt(id.substring(1));

		// Modifying row index.
		idx.html(`Row ${dig - 1}`);

		// Modifying row id.
		$(this).attr('id', `R${dig - 1}`);
		});

		// Removing the current row.
		$(this).closest('tr').remove();

		// Decreasing total number of rows by 1.
		rowIdx--;
	});
	});
</script>
  • ABP Framework version: v4.4.3
  • UI type: MVC
  • DB provider: EF Core / PgAdmin
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:" How to bind viewmodel for dynamic rows generate using jquery in master and detail save on submit
  • ABP Framework version: v4.4.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: http://192.168.1.204:10014/connect/authorize?client_id=SGLPV_Web_Public& redirect_uri=http%3A%2F%2F192.168.1.204%3A10013%2Fsignin-oidc&response_type=code%20id_token& scope=openid%20profile%20role%20email%20phone%20SGLPV& response_mode=form_post&nonce=637720618520273859.M2E3M2M1ZWYtZmFhZi00MDU0LWIzOTQtMjZjMTA1NTc5ZjU5OWY0NWUxMGEtMzJhZS00NGViLTllZjctNTVjOTYzZmQ3Yzhh&state=CfDJ8ALTBWnhtOJDhmZ-a17WiIEQ9S0-xedlH1Cmv7jCEz5KOwcsm9zIv-CbuErNPuleneKaLZQU53KcBw8PSMh54Gnc0fIJ0-YXHT0aOEAPNGYJYBWoVE9jaTgerr6YKMDeQ9wg_thIUX6FC4-pYqH6GjdyPgJiwlTvKzVST7HfmqveruMzShkar712GEk78MVJlghsYqA5-eIlDE2lRVOOODLjx8MaWmeUfYnY0pe7ICEXF9KkfhYOTos6x5L0fTnQOvn-lvsFsb2tjvuLeyFA1_Z86h-KryTy_ZzF5eeMClsI &x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0
  • Steps to reproduce the issue: We have developed application: web url : http://192.168.1.204:10014 . WebClient url: http://192.168.1.204:10013. We get back on the public site with 400 error. not sure why its not working. Working in local development mode

I want to use API created or existing abp module's api in the web.public project. Please guide how I can achieve to consume the Web project API into Web.Public project.

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.4.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no [Non-Tiered]
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Showing 41 to 45 of 45 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11