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

Activities of "huntethan89"

Question

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

Question

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&lt;List&lt;BuilderListDto&gt;>();
        return new PagedResultDto&lt;BuilderListDto&gt;(
           userCount,
           builderListDto
           );
    }
Question

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 = $('&lt;span&gt;&lt;/span&gt;');
                    if (_permissions.open) {
                        $('&lt;a class=&quot;action-open&quot; data-toggle=&quot;tooltip&quot; data-placement=&quot;right&quot; title=&quot;Open File&quot; href=&quot;../Mpa/BuilderInformation/Index?jobid=&#39; + data.record.id + &#39;&quot; &gt;&lt;i class=&quot;fa fa-folder-open-o&quot;&gt;&lt;/a&gt;')
                            .appendTo($span)
                        .click(function () {
                            //$.ajax({
                            //    url: abp.appPath + 'Mpa/FileTracking/DMS', data: { FileID: "hide"}
                            //});
                        });
                    }
                    if (_permissions.edit) {
                        $('&lt;button class=&quot;btn btn-icon btn-xs&quot; data-toggle=&quot;tooltip&quot; data-placement=&quot;top&quot; title=&quot;Edit&quot; &gt;&lt;i class=&quot;fa fa-edit&quot;&gt;&lt;/i&gt;&lt;/button&gt;')
                            .appendTo($span)
                            .click(function () {
                                showhidedivs(0);
                                _addNewFile.html('&lt;i class=&quot;fa fa-save&quot;&gt;&lt;/i&gt; Update');
                                updateFileid = data.record.id;
                                getfileinfo(data.record.id);
                            });
                    }

                    if (_permissions.delete) {
                        $('&lt;button class=&quot;btn btn-icon btn-xs&quot; data-toggle=&quot;tooltip&quot; data-placement=&quot;top&quot; title=&quot;&#39; + app.localize(&#39;Delete&#39;) + &#39;&quot;&gt;&lt;i class=&quot;fa fa-trash-o&quot;&gt;&lt;/i&gt;&lt;/button&gt;')
                            .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 &lt; data.record.id) {
                            newJobId = data.record.id;
                        }

                    });
                    return moment(data.record.creationTime).format(&#39;L&#39;);
                }

            }
        },
    });

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

Question

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 = $('&lt;span&gt;&lt;/span&gt;');

                    if (_permissions.edit) {
                        $('&lt;button class=&quot;btn btn-icon btn-xs&quot; title=&quot;&#39; + app.localize(&#39;Edit&#39;) + &#39;&quot;&gt;&lt;i class=&quot;fa fa-edit&quot;&gt;&lt;/i&gt;&lt;/button&gt;')
                            .appendTo($span)
                            .click(function () {
                                showhidedivs(0);
                                _EncumbranceListCompanies.html('&lt;i class=&quot;fa fa-save&quot;&gt;&lt;/i&gt; Update');
                                updateEncumbranceListid = data.record.id;
                                getEncumbranceListinfo(data.record.id);
                            });
                    }

                    if (_permissions.delete) {
                        $('&lt;button class=&quot;btn btn-icon btn-xs&quot; title=&quot;&#39; + app.localize(&#39;Delete&#39;) + &#39;&quot;&gt;&lt;i class=&quot;fa fa-trash-o&quot;&gt;&lt;/i&gt;&lt;/button&gt;')
                            .appendTo($span)
                            .click(function () {
                                deleteUser(data.record);
                            });
                    }

                    return $span;
                }
            },

            encumbranceNumber: {
                title: app.localize('EncumbranceNumber')
            },
            descriptionShort: {
                title: app.localize('DescriptionShort')
            }
        }
    });

Thanks

Question

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

Question

Hi,

whenever I am loading page on browser i am getting some template error. Please check and tell me where is error. I am attaching the screenshot.

Question

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

Showing 61 to 70 of 80 entries