Hello
found that in the generated code the view modal did not load displaying error "Internal Error Occurred" when attempting to "View" , after spending some time found that the footer generated in the _ViewMyEntityModal
the header was correct but the footer pointer to a different path
@Html.Partial("~/Areas/gl/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(""))
@Html.Partial("~/Areas/App/Views/Common/Modals/_ModalFooterWithClose.cshtml")
the correct path to the footer was
@Html.Partial("~/Areas/gl/Views/Common/Modals/_ModalFooterWithClose.cshtml")
can this be please corrected .
thanks and regards Anwar
Thanks
what do you mean by "i write PM" my email id is <a href="mailto:[email protected]">[email protected]</a>
Hello i did the following
*** This is my CreateOrEditModal.js part
$('#OpenSchoolLookupTableButton').click(function () {
var institution = _$institutionInformationForm.serializeFormToObject();
_schoolLookupTableModal.open({ id: institution.schoolId, displayName: institution.schoolSchoolName, cityId: institution.CityId}, function (data) {
_$institutionInformationForm.find('input[name=SchoolSchoolName]').val(data.displayName);
_$institutionInformationForm.find('input[name=SchoolId]').val(data.id);
});
});
$('#ClearSchoolSchoolNameButton').click(function () {
_$institutionInformationForm.find('input[name=SchoolSchoolName]').val('');
_$institutionInformationForm.find('input[name=SchoolId]').val('');
});
*** This is my Controller.js part
[AbpMvcAuthorize(AppPermissions.Pages_Institutions_Create, AppPermissions.Pages_Institutions_Edit)]
public PartialViewResult SchoolLookupTableModal(int? id, string displayName, int cityId)
{
var viewModel = new SchoolLookupTableViewModel()
{
Id = id,
CityId = cityId,
DisplayName = displayName,
FilterText = ""
};
return PartialView("_SchoolLookupTableModal", viewModel);
}
*** This is my Service part
public async Task<PagedResultDto<SchoolLookupTableDto>> GetAllSchoolForLookupTable(GetAllForLookupTableInput input)
{
var query = _schoolRepository.GetAll().WhereIf(
!string.IsNullOrWhiteSpace(input.Filter),
e=> e.SchoolName.ToString().Contains(input.Filter)
);
var totalCount = await query.CountAsync();
var schoolList = await query
.PageBy(input)
.ToListAsync();
var lookupTableDtoList = new List<SchoolLookupTableDto>();
foreach(var school in schoolList){
lookupTableDtoList.Add(new SchoolLookupTableDto
{
Id = school.Id,
DisplayName = school.SchoolName.ToString()
});
}
return new PagedResultDto<SchoolLookupTableDto>(
totalCount,
lookupTableDtoList
);
}
*** This is my GetAllForLookupTableInput part
public class GetAllForLookupTableInput : PagedAndSortedResultRequestDto
{
public int? CityId { get; set; }
public string Filter { get; set; }
}
*** This is my SchoolLookupTableViewModel part added line marked with ****
public class SchoolLookupTableViewModel
{
public int? Id { get; set; }
public int? CityId { get; set; }
public string DisplayName { get; set; }
public string FilterText { get; set; }
}
*** This is my part SchoolLookupTableViewModel
@using NOOR.Sched.Authorization
@using NOOR.Sched.Web.Areas.App.Models.Institutions
@using NOOR.Sched.Web.Areas.App.Startup
@using NOOR.Sched.Web.Areas.App.Models.Common.Modals
@model SchoolLookupTableViewModel
@section Scripts
{
<script abp-src="/view-resources/Areas/App/Views/Institutions/_SchoolLookupTableModal.js" asp-append-version="true"></script>
}
@Html.Partial("~/Areas/App/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("PickSchool")))
<div class="m-content">
<div class="m-portlet m-portlet--mobile">
<div class="m-portlet__body">
<div class="m-form m-form--label-align-right">
<div class="row align-items-center m--margin-bottom-10">
<div class="col-xl-12">
<div class="form-group m-form__group align-items-center">
<div class="input-group">
**** <input class="form-control" id="CityIdFilter" value="@Model.CityId" type="text" name="CityId" hidden /> ****
<input type="text" id="SchoolTableFilter" class="form-control m-input" placeholder="@L("SearchWithThreeDot")" value="@Model.FilterText">
<span class="input-group-btn">
<button id="GetSchoolButton" class="btn btn-primary" type="submit"><i class="flaticon-search-1"></i></button>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="row align-items-center">
<table id="SchoolTable" class="display table table-striped table-bordered table-hover dt-responsive nowrap">
<thead>
<tr>
<th>@L("Actions")</th>
<th>@L("SchoolName")</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
@Html.Partial("~/Areas/App/Views/Common/Modals/_ModalFooterWithClose.cshtml")
Ready to work as a contract developer, have developed 3 apps using ASP.NEt Zero, for overseas clients ,
please give me your contact details and we can take this discussion further.
regards Anwar
yes, no other parameters are passed....
hello
i followed the instruction but the cityId is not passed to the controller, it is always 0
regards Anwar
This is my CreatOrEditModal.js made changes
----------From Here
(function ($) { app.modals.CreateOrEditInstitutionModal = function () {
var _institutionsService = abp.services.app.institutions;
var _modalManager;
var _$institutionInformationForm = null;
var _cityLookupTableModal = new app.ModalManager({
viewUrl: abp.appPath + 'App/Institutions/CityLookupTableModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Institutions/_CityLookupTableModal.js',
modalClass: 'CityLookupTableModal'
}); var _schoolLookupTableModal = new app.ModalManager({
viewUrl: abp.appPath + 'App/Institutions/SchoolLookupTableModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Institutions/_SchoolLookupTableModal.js',
modalClass: 'SchoolLookupTableModal'
}); var _gradeLookupTableModal = new app.ModalManager({
viewUrl: abp.appPath + 'App/Institutions/GradeLookupTableModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Institutions/_GradeLookupTableModal.js',
modalClass: 'GradeLookupTableModal'
}); var _sectionLookupTableModal = new app.ModalManager({
viewUrl: abp.appPath + 'App/Institutions/SectionLookupTableModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Institutions/_SectionLookupTableModal.js',
modalClass: 'SectionLookupTableModal'
}); var _academicyearLookupTableModal = new app.ModalManager({
viewUrl: abp.appPath + 'App/Institutions/AcademicyearLookupTableModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Institutions/_AcademicyearLookupTableModal.js',
modalClass: 'AcademicyearLookupTableModal'
});
this.init = function (modalManager) {
_modalManager = modalManager;
var modal = _modalManager.getModal();
modal.find('.date-picker').datetimepicker({
locale: abp.localization.currentLanguage.name,
format: 'L'
});
_$institutionInformationForm = _modalManager.getModal().find('form[name=InstitutionInformationsForm]');
_$institutionInformationForm.validate();
};
$('#OpenCityLookupTableButton').click(function () {
var institution = _$institutionInformationForm.serializeFormToObject();
_cityLookupTableModal.open({ id: institution.cityId, displayName: institution.cityCitiName }, function (data) {
_$institutionInformationForm.find('input[name=CityCitiName]').val(data.displayName);
_$institutionInformationForm.find('input[name=CityId]').val(data.id);
});
});
$('#ClearCityCitiNameButton').click(function () {
_$institutionInformationForm.find('input[name=CityCitiName]').val('');
_$institutionInformationForm.find('input[name=CityId]').val('');
});
$('#OpenSchoolLookupTableButton').click(function () {
var institution = _$institutionInformationForm.serializeFormToObject();
_schoolLookupTableModal.open({ id: institution.schoolId, displayName: institution.schoolSchoolName,filterText:institution.cityCitiName}, function (data) {
---------------------------------------------------------------------------------------------------------------------- _$institutionInformationForm.find('input[name=SchoolSchoolName]').val(data.displayName); _$institutionInformationForm.find('input[name=SchoolId]').val(data.id); }); });
$('#ClearSchoolSchoolNameButton').click(function () {
_$institutionInformationForm.find('input[name=SchoolSchoolName]').val('');
_$institutionInformationForm.find('input[name=SchoolId]').val('');
});
$('#OpenGradeLookupTableButton').click(function () {
var institution = _$institutionInformationForm.serializeFormToObject();
_gradeLookupTableModal.open({ id: institution.gradeId, displayName: institution.gradeGradeName }, function (data) {
_$institutionInformationForm.find('input[name=GradeGradeName]').val(data.displayName);
_$institutionInformationForm.find('input[name=GradeId]').val(data.id);
});
});
$('#ClearGradeGradeNameButton').click(function () {
_$institutionInformationForm.find('input[name=GradeGradeName]').val('');
_$institutionInformationForm.find('input[name=GradeId]').val('');
});
$('#OpenSectionLookupTableButton').click(function () {
var institution = _$institutionInformationForm.serializeFormToObject();
_sectionLookupTableModal.open({ id: institution.sectionId, displayName: institution.sectionSectionName }, function (data) {
_$institutionInformationForm.find('input[name=SectionSectionName]').val(data.displayName);
_$institutionInformationForm.find('input[name=SectionId]').val(data.id);
});
});
$('#ClearSectionSectionNameButton').click(function () {
_$institutionInformationForm.find('input[name=SectionSectionName]').val('');
_$institutionInformationForm.find('input[name=SectionId]').val('');
});
$('#OpenAcademicyearLookupTableButton').click(function () {
var institution = _$institutionInformationForm.serializeFormToObject();
_academicyearLookupTableModal.open({ id: institution.academicyearId, displayName: institution.academicyearYear_Attended }, function (data) {
_$institutionInformationForm.find('input[name=AcademicyearYear_Attended]').val(data.displayName);
_$institutionInformationForm.find('input[name=AcademicyearId]').val(data.id);
});
});
$('#ClearAcademicyearYear_AttendedButton').click(function () {
_$institutionInformationForm.find('input[name=AcademicyearYear_Attended]').val('');
_$institutionInformationForm.find('input[name=AcademicyearId]').val('');
});
this.save = function () {
if (!_$institutionInformationForm.valid()) {
return;
}
var institution = _$institutionInformationForm.serializeFormToObject();
_modalManager.setBusy(true);
_institutionsService.createOrEdit(
institution
).done(function () {
abp.notify.info(app.localize('SavedSuccessfully'));
_modalManager.close();
abp.event.trigger('app.createOrEditInstitutionModalSaved');
}).always(function () {
_modalManager.setBusy(false);
});
};
};
})(jQuery);
hello
i would like to change the splash screen in the mobile app how do i go about it, please let me know.
for both android and ios
i would like to add a background image then have the logo layer on top
regards Anwar