...
This commit is contained in:
17
Shared/DTOs/Employee1.cs
Normal file
17
Shared/DTOs/Employee1.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Shared.DTOs
|
||||||
|
{
|
||||||
|
public class Employee1
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Designation { get; set; }
|
||||||
|
public DateOnly DOJ { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
}
|
||||||
|
}
|
67
TaxPayerFull/Layout/GridTest.razor
Normal file
67
TaxPayerFull/Layout/GridTest.razor
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
@using Shared.DTOs
|
||||||
|
@page "/GridTest"
|
||||||
|
<h3>GridTest</h3>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="signin-banner-area signin-banner-main-wrap d-flex align-items-center">
|
||||||
|
<div class="signin-banner-left-box signin-banner-bg p-relative">
|
||||||
|
<div class="signin-banner-bottom-shape">
|
||||||
|
<img src="img/login/login-shape-1.png" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="signin-banner-left-wrap">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="signin-banner-from d-flex justify-content-center align-items-center">
|
||||||
|
<div class="signin-banner-from-wrap">
|
||||||
|
<Grid TItem="Employee1" class="table table-hover table-bordered table-striped" DataProvider="EmployeesDataProvider" AllowFiltering="true" Responsive="true">
|
||||||
|
<GridColumn TItem="Employee1" HeaderText="Id" PropertyName="Id">
|
||||||
|
@context.Id
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="Employee1" HeaderText="Employee Name" PropertyName="Name" StringComparison="StringComparison.Ordinal">
|
||||||
|
@context.Name
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="Employee1" HeaderText="Designation" PropertyName="Designation">
|
||||||
|
@context.Designation
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="Employee1" HeaderText="DOJ" PropertyName="DOJ">
|
||||||
|
@context.DOJ
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="Employee1" HeaderText="Active" PropertyName="IsActive">
|
||||||
|
@context.IsActive
|
||||||
|
</GridColumn>
|
||||||
|
</Grid>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
@code {
|
||||||
|
private IEnumerable<Employee1>? employees;
|
||||||
|
|
||||||
|
private async Task<GridDataProviderResult<Employee1>> EmployeesDataProvider(GridDataProviderRequest<Employee1> request)
|
||||||
|
{
|
||||||
|
if (employees is null) // pull employees only one time for client-side filtering, sorting, and paging
|
||||||
|
employees = GetEmployees(); // call a service or an API to pull the employees
|
||||||
|
|
||||||
|
return await Task.FromResult(request.ApplyTo(employees));
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<Employee1> GetEmployees()
|
||||||
|
{
|
||||||
|
return new List<Employee1>
|
||||||
|
{
|
||||||
|
new Employee1 { Id = 107, Name = "Alice", Designation = "AI Engineer", DOJ = new DateOnly(1998, 11, 17), IsActive = true },
|
||||||
|
new Employee1 { Id = 103, Name = "Bob", Designation = "Senior DevOps Engineer", DOJ = new DateOnly(1985, 1, 5), IsActive = true },
|
||||||
|
new Employee1 { Id = 106, Name = "John", Designation = "Data Engineer", DOJ = new DateOnly(1995, 4, 17), IsActive = true },
|
||||||
|
new Employee1 { Id = 104, Name = "Pop", Designation = "Associate Architect", DOJ = new DateOnly(1985, 6, 8), IsActive = false },
|
||||||
|
new Employee1 { Id = 105, Name = "Ronald", Designation = "Senior Data Engineer", DOJ = new DateOnly(1991, 8, 23), IsActive = true },
|
||||||
|
new Employee1 { Id = 102, Name = "Line", Designation = "Architect", DOJ = new DateOnly(1977, 1, 12), IsActive = true },
|
||||||
|
new Employee1 { Id = 101, Name = "Daniel", Designation = "Architect", DOJ = new DateOnly(1977, 1, 12), IsActive = true },
|
||||||
|
new Employee1 { Id = 108, Name = "Zayne", Designation = "Data Analyst", DOJ = new DateOnly(1991, 1, 1), IsActive = true },
|
||||||
|
new Employee1 { Id = 109, Name = "Isha", Designation = "App Maker", DOJ = new DateOnly(1996, 7, 1), IsActive = true },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<main class="fix">
|
<main class="fix">
|
||||||
|
|
||||||
<!-- tp-slider-area-start -->
|
<!-- tp-slider-area-start -->
|
||||||
<div class="tp-hero__area tp-hero__pl-pr">
|
<div class="tp-hero__area tp-hero__pl-pr">
|
||||||
<div class="tp-hero__bg p-relative">
|
<div class="tp-hero__bg p-relative">
|
||||||
@@ -355,6 +355,10 @@
|
|||||||
<span>شروع کنید</span>
|
<span>شروع کنید</span>
|
||||||
<b></b>
|
<b></b>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
|
<NavLink class="tp-btn-orange" href="GridTest">
|
||||||
|
<span>GridTest </span>
|
||||||
|
<b></b>
|
||||||
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
<div class="tp-service__dashdboard-sm-img">
|
<div class="tp-service__dashdboard-sm-img">
|
||||||
<img class="wow tpfadeRight" data-wow-duration=".9s" data-wow-delay=".7s" src="img/service/sv-dashbord.png" alt="">
|
<img class="wow tpfadeRight" data-wow-duration=".9s" data-wow-delay=".7s" src="img/service/sv-dashbord.png" alt="">
|
||||||
|
Reference in New Issue
Block a user