We want to implement the roles so that they appear hierarchically . Each level will have different permissions. The roles does not need to inherit permissions, we should just be able to link and show them in hierarchical form.
An example of roles that we want is- Vancouver ---->Manager -------->General Manager -------->Assistant General Manager
Toronto ---->Manager -------->General Manager -------->Assistant General Manager
Is there a feature in ASP.NET Zero that allows us to achieve this?
HI ,
How can i update my project files to latest ASP NET zero version without any problem on my current project. I want to update to latest version of ASP net zero. Currently i am using 2.3 version.
Thanks
Hi, i want to implement Full text search using your pagedresultdto. Following is the code i am using to get list of records. In this i want to implement Full text search.
public async Task<PagedResultDto<BuilderListDto>> getBuilders1(GetBuilderTrack1 input) { IQueryable<BuildersInformation> files; files = _buildersRepository .GetAll() //.Include(p => p.User) .WhereIf( !input.Filter.IsNullOrEmpty(), p => p.BuilderName.ToLower().Contains(input.Filter.ToLower()) //|| p.BuilderAddress.ToLower().Contains(input.Filter.ToLower()) ) //.WhereIf(!input.City.IsNullOrEmpty(), // p => p.CityFor.ToLower().Contains(input.City.ToLower())) .OrderBy(p => p.BuilderName).AsQueryable();
var userCount = await files.CountAsync();
var Files = await files
.OrderBy(input.Sorting)
.PageBy(input)
.ToListAsync();
var builderListDto = Files.MapTo<List<BuilderListDto>>();
return new PagedResultDto<BuilderListDto>(
userCount,
builderListDto
);
}
Hi,
I used the sorting function in jtable. but when i sort the table on browser, it is not sorting according to selected Column. Following is my jtable code. Is there any other place where i need to initialize sorting ?
var _$FileTable = $('#FileTable');
_$FileTable.jtable({
selecting: true,
paging: true,
pageSize: 50,
sorting: true,
multiSorting: true,
actions: {
listAction: {
method: _fileService.getFiles
}
},
fields: {
id: {
key: true,
list: false
},
actions: {
title: app.localize('Actions'),
width: '10%',
sorting: false,
display: function (data) {
var $span = $('<span></span>');
if (_permissions.open) {
if (data.record.typeOfRealEstate == 0 || data.record.typeOfRealEstate == 1) {
$('<a class="RealEstateImage" data-toggle="tooltip" data-placement="right" title="Open File" href="../Mpa/BuilderInformation/Index?jobid=' + data.record.id + '" ></a>')
.appendTo($span)
.click(function () {
//$.ajax({
// url: abp.appPath + 'Mpa/FileTracking/DMS', data: { FileID: "hide"}
//});
});
}
else {
$('<a class="UsedRealEstateImage" data-toggle="tooltip" data-placement="right" title="Open File" href="../Mpa/VendorInformation/Index?jobid=' + data.record.id + '" ></a>')
.appendTo($span)
.click(function () {
//$.ajax({
// url: abp.appPath + 'Mpa/FileTracking/DMS', data: { FileID: "hide"}
//});
});
}
}
if (_permissions.edit) {
$('<button class="btn btn-icon btn-xs" data-toggle="tooltip" data-placement="top" title="Edit" ><i class="fa fa-edit"></i></button>')
.appendTo($span)
.click(function () {
showhidedivs(0);
_addNewFile.html('<i class="fa fa-save"></i> Update');
updateFileid = data.record.id;
getfileinfo(data.record.id);
});
}
if (_permissions.delete) {
$('<button class="btn btn-icon btn-xs" data-toggle="tooltip" data-placement="top" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
.appendTo($span)
.click(function () {
deleteUser(data.record);
});
}
return $span;
}
},
ComInfo1: {
title: 'File Assigned To',
display: function (data) {
var getassitantuser = '';
getassitantuser = $('#Users').find('option[id="' + data.record.assitantuserId1 + '"]').text();
return getassitantuser;
}
},
fileNumber: {
title: app.localize('FileNumber')
},
re: {
title: 'Re:'
},
client: {
title: app.localize('Client')
},
civicAddress: {
title: 'Civic Address',
display: function (data) {
var getaddredd = '';
getaddredd = (data.record.civicAddress == null || data.record.civicAddress == '' ? "" : (data.record.civicAddress
+ ",")) + (data.record.fileTrackingCity == null || data.record.fileTrackingCity == '' ? "" : (data.record.fileTrackingCity
+ ",")) + (data.record.fileTrackingState == null || data.record.fileTrackingState == '' ? "" : (data.record.fileTrackingState
+ ",")) + (data.record.fileTrackingZipCode == null || data.record.fileTrackingZipCode == '' ? "" : (data.record.fileTrackingZipCode
+ ","));
getaddredd = getaddredd.substring(0, getaddredd.length - 1);
return getaddredd;
}
},
creationTime: {
title: app.localize('CreationTime'),
display: function (data) {
$(data.record).each(function () {
if (newJobId < data.record.id) {
newJobId = data.record.id;
}
});
return moment(data.record.creationTime).format('L');
}
},
closingDate: {
title: 'Close Date',
display: function (data) {
if (data.record.closingDate == null)
return '';
return moment(data.record.closingDate).format('L');
}
},
isGeneral: {
title: '',
width: '1%',
display: function (data) {
var $span = $('<span></span>');
$('<div class="md-checkbox"><input id="' + data.record.id + '" class="md-check" type="checkbox" name="Print' + data.record.id + '" value="0"><label for="' + data.record.id + '"><span class="inc"></span><span class="check"></span><span class="box"></span></label></div>')
//$('<input type="checkbox" value="0" name="finalUpdate' + data.record.id + '" />')
.appendTo($span)
.change(function () {
GetCheckValues(data.record.id);
});
return $span;
}
}
}
});
Hi, I have added a modal in my application. but there is some issue I am facing. I write code on js file of modal. It works only one time. When i again open the modal the code written on js file does not work. It is loading js file only one time. Then next time it is not loading. How to make it work. Thanks
Hi, I am trying to add data in jtable with set its paging to true. But it is retrieving emtpy data everytime. It is getting data from database but not displaying in jtable.
the code i am using is as follows . Please check and tell me what i am missing.
----- jtable code ------
METHOD OF JTABLE ------------
var _$FileTable = $('#FileTable'); // FileTable is a div.
_$FileTable.jtable({ selecting: true, paging: true, sorting: true, multiSorting: true, actions: { listAction: { method: _fileService.getFiles } },
fields: {
id: {
key: true,
list: false
},
actions: {
title: app.localize('Actions'),
// width: '30%',
display: function (data) {
var $span = $('<span></span>');
if (_permissions.open) {
$('<a class="action-open" data-toggle="tooltip" data-placement="right" title="Open File" href="../Mpa/BuilderInformation/Index?jobid=' + data.record.id + '" ><i class="fa fa-folder-open-o"></a>')
.appendTo($span)
.click(function () {
//$.ajax({
// url: abp.appPath + 'Mpa/FileTracking/DMS', data: { FileID: "hide"}
//});
});
}
if (_permissions.edit) {
$('<button class="btn btn-icon btn-xs" data-toggle="tooltip" data-placement="top" title="Edit" ><i class="fa fa-edit"></i></button>')
.appendTo($span)
.click(function () {
showhidedivs(0);
_addNewFile.html('<i class="fa fa-save"></i> Update');
updateFileid = data.record.id;
getfileinfo(data.record.id);
});
}
if (_permissions.delete) {
$('<button class="btn btn-icon btn-xs" data-toggle="tooltip" data-placement="top" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
.appendTo($span)
.click(function () {
deleteUser(data.record);
});
}
return $span;
}
},
fileNumber: {
title: app.localize('FileNumber')
},
client: {
title: app.localize('Client')
},
creationTime: {
title: app.localize('CreationTime'),
display: function (data) {
$(data.record).each(function () {
if (newJobId < data.record.id) {
newJobId = data.record.id;
}
});
return moment(data.record.creationTime).format('L');
}
}
},
});
----LOADING JTABLE METHOD -------------
function getRoles(reload) { if (reload) { _$FileTable.jtable('reload'); } else { _$FileTable.jtable('load', { filter: $('#FilterPeopleText').val() }); } }
getRoles();
---------------APP SERVICE CODE -----------------
public PagedResultDto<FileDetails> getFiles(GetFileTrack input) { var files = _fileRepository.GetAll().Include(p => p.MainUser) .WhereIf(!input.Filter.IsNullOrEmpty(), p => p.FileNumber.ToLower().Contains(input.Filter.ToLower()) || p.Id.ToString().ToLower().Contains(input.Filter.ToLower()) ).OrderBy(p => p.FileNumber).AsQueryable(); var userCount = files.ToList().Count; if (input.Skipcount > 0) { files = files.Skip(input.Skipcount); } if (input.Maxresultcount > 0) { files = files.Take(input.Maxresultcount); } return new PagedResultDto<FileDetails>( userCount, files.ToList() );
}
WHERE GetFileTrack is ------------
public class GetFileTrack : EntityDto { public string Filter { get; set; } public int Maxresultcount { get; set; } public int Skipcount { get; set; } }
Thanks
Hi, I am retrieving data from database and displaying using jtable. i am returing PagedResultDto which contaions 14188 records. So, I implemented paging on jtable. So it made 1419 pages . but it is not showing page number 1 and last page number 1419 in dropdown. It is displaying page number from 2 to 1418 in dropdown. Why it is not showing 1 and last page number.
This is jtable code -
_$EncumbranceListTable.jtable({ // title: app.localize('Builders List'), paging: true, sorting: true, multiSorting: true, actions: { listAction: { method: _EncumbranceListService.getEncumbranceList } },
fields: {
id: {
key: true,
list: false
},
actions: {
title: app.localize('Actions'),
width: '15%',
sorting: false,
display: function (data) {
var $span = $('<span></span>');
if (_permissions.edit) {
$('<button class="btn btn-icon btn-xs" title="' + app.localize('Edit') + '"><i class="fa fa-edit"></i></button>')
.appendTo($span)
.click(function () {
showhidedivs(0);
_EncumbranceListCompanies.html('<i class="fa fa-save"></i> Update');
updateEncumbranceListid = data.record.id;
getEncumbranceListinfo(data.record.id);
});
}
if (_permissions.delete) {
$('<button class="btn btn-icon btn-xs" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
.appendTo($span)
.click(function () {
deleteUser(data.record);
});
}
return $span;
}
},
encumbranceNumber: {
title: app.localize('EncumbranceNumber')
},
descriptionShort: {
title: app.localize('DescriptionShort')
}
}
});
Thanks
Hi, I am creating a menu tree as shown below.
->Main menu -> menu 1 -> menu 2 -> menu 3 -> sub menu 3a -> sub menu 3b -> sub menu 3c
When i click on menu 2 it is working fine showing selected menu 2. But when i select submenu (eg. sub menu 3a) it hides all menus and showing only Main menu as shown in fig.
-> Main menu
How to show selected sub menu (full tree view).
Thanks
Hi, I need a condition in which i can hide menus of left side.
Lets assume i have 7 menus of left side. i open first page and there is button on that page. On click of that button i want to hide first 5 menus and show only 6 and 7 menu item.
How can i achieve this?
Thanks