Update vor Clone
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
@using BlazorApp.Controller;
|
||||
|
||||
|
||||
<h1>AspNetUserRolle</h1>
|
||||
<h1>BenutzerListe</h1>
|
||||
|
||||
<div class="col-lg-12 control-section">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<SfGrid DataSource="@GridData" @ref="Grid" AllowPaging="true" AllowSelection="true" AllowSorting="true" Toolbar="@(new List<string>() { "Add", "Edit", "Update", "Cancel", "Passwort ändern" })">
|
||||
<SfGrid DataSource="@GridData" @ref="Grid" AllowPaging="true" AllowSelection="true" AllowSorting="true" Toolbar="@(new List<string>() { "Edit", "Update", "Cancel", "Passwort ändern","Benutzer erstellen" })">
|
||||
<GridPageSettings PageCount="5" PageSizes="true"></GridPageSettings>
|
||||
<GridEditSettings AllowAdding="false" AllowDeleting="false" AllowEditing="true" Mode="EditMode.Normal"></GridEditSettings>
|
||||
<GridEvents RowSelected="GetSelectedRecords" OnActionBegin="OnBeginHandler" OnActionComplete="OnCompletedHandler" TValue="BWPMModels.AspNetUserRolle" OnToolbarClick="ToolBarClickHandler" OnDataBound="RowDataBoundHandler"></GridEvents>
|
||||
@@ -86,14 +86,53 @@
|
||||
<DialogButton Content="Abbruch" OnClick="@CloseDialog" />
|
||||
</DialogButtons>
|
||||
</SfDialog>
|
||||
|
||||
<SfDialog Width="400px" IsModal="true" @bind-Visible="@NewUserIsVisible">
|
||||
<DialogEvents OnOverlayClick="@OnOverlayclick">
|
||||
</DialogEvents>
|
||||
<DialogTemplates>
|
||||
<Header>Neuer Benutzer erstellen</Header>
|
||||
<Content>
|
||||
|
||||
<label style="color:red">@ErrorMsg</label><br />
|
||||
<SfRadioButton Label="Administrator" Name="options" Value="Administrators" @bind-Checked="stringChecked"></SfRadioButton>
|
||||
<SfRadioButton Label="Firma" Name="options" Value="Firma" @bind-Checked="stringChecked"></SfRadioButton>
|
||||
<SfRadioButton Label="Lehrer" Name="options" Value="Lehrer" @bind-Checked="stringChecked"></SfRadioButton><BR /><BR />
|
||||
|
||||
<label>
|
||||
E-Mail (Benutzername):
|
||||
<input type="email" @bind-value="newusername" id="username" name="Required" class="e-input">
|
||||
Passwort
|
||||
<input type="password" @bind-value="newpassword" id="password" name="Required" class="e-input">
|
||||
Passwort-Bestätigung
|
||||
<input type="password" @bind-value="newpassword1" id="password1" name="Required" class="e-input">
|
||||
</label>
|
||||
|
||||
</Content>
|
||||
</DialogTemplates>
|
||||
<DialogButtons>
|
||||
<DialogButton Content="OK" IsPrimary="true" OnClick="@SaveNewUser" />
|
||||
<DialogButton Content="Abbruch" OnClick="@CloseDialog" />
|
||||
</DialogButtons>
|
||||
</SfDialog>
|
||||
@code{
|
||||
|
||||
|
||||
private bool IsVisible { get; set; } = false;
|
||||
private bool NewUserIsVisible { get; set; } = false;
|
||||
|
||||
private string Gridid = "";
|
||||
public List<BWPMModels.AspNetUserRolle> Temp { get; set; }
|
||||
public List<BWPMModels.AspNetUsers> TempUser { get; set; }
|
||||
public List<BWPMModels.AspNetRoles> TmpRolle { get; set; }
|
||||
public List<BWPMModels.AspNetUserRoles> TmpUserRoles { get; set; }
|
||||
private string newpassword { get; set; } = "";
|
||||
private string newusername { get; set; } = "";
|
||||
private string newpassword1 { get; set; } = "";
|
||||
private string ErrorMsg { get; set; } = "";
|
||||
private string Username { get; set; } = "";
|
||||
private string stringChecked { get; set; } = "Administrators";
|
||||
|
||||
|
||||
SfGrid<BWPMModels.AspNetUserRolle> Grid { get; set; }
|
||||
|
||||
@@ -101,14 +140,28 @@
|
||||
{
|
||||
this.IsVisible = false;
|
||||
}
|
||||
private void ShowDialog()
|
||||
private void ShowDialog(int dialognr)
|
||||
{
|
||||
|
||||
this.ErrorMsg = "";
|
||||
this.IsVisible = true; ;
|
||||
switch (dialognr)
|
||||
{
|
||||
case 1:
|
||||
this.IsVisible = true;
|
||||
break;
|
||||
case 2:
|
||||
this.NewUserIsVisible = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void CloseDialog()
|
||||
{
|
||||
this.IsVisible = false; ;
|
||||
this.IsVisible = false;
|
||||
this.NewUserIsVisible = false;
|
||||
}
|
||||
private void SavePasswort()
|
||||
{
|
||||
@@ -133,6 +186,73 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveNewUser()
|
||||
{
|
||||
ErrorMsg = "";
|
||||
if (newusername.Trim()=="")
|
||||
{
|
||||
ErrorMsg = "Benutzername fehlt.";
|
||||
return;
|
||||
}
|
||||
if ((newpassword.Trim()=="") && (newpassword1.Trim()=="" ))
|
||||
{
|
||||
ErrorMsg = "Passwort fehlt.";
|
||||
return;
|
||||
}
|
||||
if(newpassword != newpassword1)
|
||||
{
|
||||
ErrorMsg = "Passworte stimmen nicht überein";
|
||||
return;
|
||||
}
|
||||
|
||||
BlazorApp.Helper.Utils utl = new BlazorApp.Helper.Utils();
|
||||
if (utl.IsValidEmail(newusername) !=true){
|
||||
ErrorMsg = "Benutzername ist ungültig (E-Mail Adresse)";
|
||||
return;
|
||||
}
|
||||
|
||||
TempUser= BlazorApp.Controller.AspNetUsersController.GetByEMail(newusername);
|
||||
if (TempUser.Count !=0)
|
||||
{
|
||||
ErrorMsg = "Benutzer bereits vorhanden.";
|
||||
return;
|
||||
}
|
||||
|
||||
BWPMModels.AspNetUsers usr = new BWPMModels.AspNetUsers();
|
||||
usr.UserName=newusername;
|
||||
usr.NormalizedUserName=newusername.ToUpper();
|
||||
usr.NormalizedEmail = newusername.ToUpper();
|
||||
usr.Email=newusername;
|
||||
usr.EmailConfirmed=true;
|
||||
Guid g = Guid.NewGuid();
|
||||
usr.Id = g.ToString();
|
||||
|
||||
IdentityUser objUser = new IdentityUser();
|
||||
objUser.Id = g.ToString();
|
||||
var password = _UserManager.PasswordHasher.HashPassword(objUser,newpassword);
|
||||
usr.PasswordHash=password;
|
||||
usr.SecurityStamp = Guid.NewGuid().ToString();
|
||||
usr.ConcurrencyStamp = Guid.NewGuid().ToString();
|
||||
usr.PhoneNumber="";
|
||||
usr.PhoneNumberConfirmed=false;
|
||||
usr.TwoFactorEnabled = false;
|
||||
usr.LockoutEnabled=true;
|
||||
usr.AccessFailedCount = 0;
|
||||
BlazorApp.Controller.AspNetUsersController.POST(usr);
|
||||
|
||||
TmpRolle = BlazorApp.Controller.AspNetRolesController.GetByName(stringChecked);
|
||||
var _tmprolle = new BWPMModels.AspNetRoles();
|
||||
_tmprolle = TmpRolle.First<BWPMModels.AspNetRoles>();
|
||||
var usrrole = new BWPMModels.AspNetUserRoles();
|
||||
usrrole.UserId = g.ToString();
|
||||
usrrole.RoleId = _tmprolle.Id;
|
||||
BlazorApp.Controller.AspNetUserRolesController.POST(usrrole);
|
||||
|
||||
this.NewUserIsVisible=false;
|
||||
Grid.Refresh();
|
||||
|
||||
}
|
||||
|
||||
public async Task ToolBarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
|
||||
{
|
||||
if (args.Item.Text == "Passwort ändern")
|
||||
@@ -143,9 +263,13 @@
|
||||
{
|
||||
Username = temp[0].UserName;
|
||||
Gridid = temp[0].Id;
|
||||
ShowDialog();
|
||||
ShowDialog(1);
|
||||
}
|
||||
}
|
||||
if (args.Item.Text == "Benutzer erstellen")
|
||||
{
|
||||
ShowDialog(2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -155,8 +279,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<BWPMModels.AspNetUserRolle> GridData { get; set; }
|
||||
public List<BWPMModels.AspNetUserRolle> AspNetUserRolles { get; set; }
|
||||
public List<BWPMModels.AspNetRoles> AspNetRoles { get; set; }
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
|
||||
userid = await sessionStorage.GetItemAsync<string>("UserID");
|
||||
|
||||
if (userid == null)
|
||||
@@ -90,8 +89,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
private async Task OnBeginHandler(ActionEventArgs<BWPMModels.Schulhaus> Args)
|
||||
|
||||
private async Task OnBeginHandler(ActionEventArgs<BWPMModels.Schulhaus> Args)
|
||||
{
|
||||
if (Args.RequestType == Syncfusion.Blazor.Grids.Action.Save)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
293
BlazorApp/Pages/Admin/Teacher/Teacher.razor
Normal file
293
BlazorApp/Pages/Admin/Teacher/Teacher.razor
Normal file
@@ -0,0 +1,293 @@
|
||||
@page "/Admin/Teacher/Teacher"
|
||||
|
||||
@inject Blazored.SessionStorage.ISessionStorageService sessionStorage
|
||||
@inherits ListBase
|
||||
@using Syncfusion.Blazor.Grids;
|
||||
@using Syncfusion.Blazor.Buttons;
|
||||
@using Syncfusion.Blazor.Spinner;
|
||||
@using Syncfusion.Blazor.Notifications;
|
||||
@using BlazorApp.Helper
|
||||
@using BWPMModels;
|
||||
|
||||
@using BlazorApp.Controller;
|
||||
|
||||
|
||||
<h1>Lehrer</h1>
|
||||
|
||||
<div class="col-lg-12 control-section">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<SfGrid ID="Grid" DataSource="@GridData" @ref="Grid" AllowPaging="true" AllowSorting="true" >
|
||||
<GridPageSettings PageCount="5" PageSizes="true"></GridPageSettings>
|
||||
<GridEditSettings AllowAdding="false" AllowDeleting="false" AllowEditing="false" Mode="EditMode.Dialog" Dialog="DialogParams"></GridEditSettings>
|
||||
<GridEvents OnActionBegin="OnBeginHandler" OnActionComplete="OnCompletedHandler" TValue="Lehrer" OnDataBound="RowDataBoundHandler" CommandClicked="CommandClickHandler"></GridEvents>
|
||||
<GridColumns>
|
||||
<GridColumn Type="ColumnType.CheckBox" AllowFiltering="false" AllowSorting="false" Width="60"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.ID) HeaderText="Id" IsPrimaryKey="true" AllowAdding="false" Width="60"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.anredeID) HeaderText="Anredeid" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.name) HeaderText="Name" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.vorname) HeaderText="Vorname" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.tel) HeaderText="Tel" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.handy) HeaderText="Handy" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.email) HeaderText="Email" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.schulhausID) HeaderText="Schulhausid" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
@*<GridColumn Field=@nameof(Lehrer.briefanrede) HeaderText="Briefanrede" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.mandantnr) HeaderText="Mandantnr" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.aktiv) HeaderText="Aktiv" Width="100" Visible="true" DisplayAsCheckBox="true"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.erstellt_am) HeaderText="Erstellt_am" Width="100" Visible="true" Format="d" Type="ColumnType.Date"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.mutiert_am) HeaderText="Mutiert_am" Width="100" Visible="true" Format="d" Type="ColumnType.Date"></GridColumn>
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.mutierer) HeaderText="Mutierer" Width="100" Visible="true"></GridColumn>*@
|
||||
|
||||
<GridColumn Field=@nameof(Lehrer.userid) HeaderText="Userid" Width="100" Visible="true"></GridColumn>
|
||||
|
||||
<GridColumn HeaderText="Funktionen" Width="150">
|
||||
<GridCommandColumns>
|
||||
<GridCommandColumn Title="Lehrer-Daten" Type="CommandButtonType.None" ButtonOption="@(new CommandButtonOptions() {IconCss="fas fa-pen", CssClass="e-flat" })"></GridCommandColumn>
|
||||
<GridCommandColumn Title="Schüler-Daten" Type="CommandButtonType.None" ButtonOption="@(new CommandButtonOptions() {IconCss="fas fa-user", CssClass="e-flat" })"></GridCommandColumn>
|
||||
|
||||
<GridCommandColumn Title="Löschen" Type="CommandButtonType.None" ButtonOption="@(new CommandButtonOptions() {IconCss="e-icons e-delete", CssClass="e-flat" })"></GridCommandColumn>
|
||||
<GridCommandColumn Title="EMail" Type="CommandButtonType.None" ButtonOption="@(new CommandButtonOptions() {IconCss="e-icons e-mail", CssClass="e-flat" })"></GridCommandColumn>
|
||||
</GridCommandColumns>
|
||||
</GridColumn>
|
||||
|
||||
</GridColumns>
|
||||
</SfGrid>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 control-section toast-default-section">
|
||||
<SfToast ID="toast_default" @ref="ToastObj" Content="@ToastContent" Timeout="5000" Icon="e-meeting">
|
||||
<ToastPosition X="Right" Y="Bottom"></ToastPosition>
|
||||
<ToastAnimationSettings>
|
||||
<ToastShowAnimationSettings Effect="@ShowAnimation"></ToastShowAnimationSettings>
|
||||
<ToastHideAnimationSettings Effect="@HideAnimation"></ToastHideAnimationSettings>
|
||||
</ToastAnimationSettings>
|
||||
</SfToast>
|
||||
</div>
|
||||
<style>
|
||||
.bootstrap4 #toast_default .e-meeting::before {
|
||||
content: "\e763";
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.e-toast-container .e-toast {
|
||||
background-color: lightgreen;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<style>
|
||||
|
||||
div#Grid_dialogEdit_wrapper {
|
||||
max-height: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@code {
|
||||
SfToast ToastObj;
|
||||
private string ToastPosition = "Right";
|
||||
private string ToastContent = "Daten erfolgreich gespeichert";
|
||||
private ToastEffect ShowAnimation = ToastEffect.FadeIn;
|
||||
private ToastEffect HideAnimation = ToastEffect.FadeOut;
|
||||
}
|
||||
|
||||
@code{
|
||||
private DialogSettings DialogParams = new DialogSettings { Width = "450px", Height = "750px" };
|
||||
|
||||
SfGrid<Lehrer> Grid { get; set; }
|
||||
public List<BWPMModels.Lehrer> GridData { get; set; }
|
||||
public List<BWPMModels.Lehrer> Lehrers { get; set; }
|
||||
public List<BWPMModels.Lehrer> TmpLehrer { get; set; }
|
||||
public List<BWPMModels.AspNetUsers> Users { get; set; }
|
||||
string userid = "";
|
||||
public static int? pkey { get; set; }
|
||||
public bool Initial { get; set; } = true;
|
||||
|
||||
public bool ContinuePaging = true;
|
||||
public bool InitialRender { get; set; }
|
||||
public int Value = 0; // consider that value your querystring contains
|
||||
public int foundrow = 0;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
/// GridData = OrdersDetails.GetAllRecords();
|
||||
GridData = BlazorApp.Controller.LehrerController.GetAllData();
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
|
||||
userid = await sessionStorage.GetItemAsync<string>("UserID");
|
||||
|
||||
if (userid == null)
|
||||
{
|
||||
var authState = await authenticationStateTask;
|
||||
var userId = authState.User.Claims.FirstOrDefault().Value;
|
||||
var user = authState.User;
|
||||
|
||||
if (user.Identity.IsAuthenticated)
|
||||
|
||||
{
|
||||
await sessionStorage.SetItemAsync("UserID", userId);
|
||||
}
|
||||
else
|
||||
{
|
||||
await sessionStorage.SetItemAsync("UserID", userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
private async Task OnBeginHandler(ActionEventArgs<BWPMModels.Lehrer> Args)
|
||||
|
||||
{
|
||||
if (Args.RequestType == Syncfusion.Blazor.Grids.Action.Save)
|
||||
{
|
||||
if (Args.Action == "Add")
|
||||
{
|
||||
|
||||
Users = BlazorApp.Controller.AspNetUsersController.GetByUserName(Args.Data.email);
|
||||
if (Users.Count !=0)
|
||||
{
|
||||
Args.Cancel = true;
|
||||
ToastObj.CssClass = "e-toast-danger";
|
||||
ToastContent = "Ein Benutzer mit der gleichen E-Mailadresse ist bereits vorhanden.";
|
||||
StateHasChanged();
|
||||
ToastObj.ShowAsync();
|
||||
// Grid.Refresh();
|
||||
return;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Args.Data.erstellt_am = DateTime.Now;
|
||||
Args.Data.mutierer = userid;
|
||||
Args.Data.mutiert_am = DateTime.Now;
|
||||
Args.Data.aktiv = true;
|
||||
Args.Data.ID = BlazorApp.Controller.LehrerController.POST(Args.Data);
|
||||
Value = Args.Data.ID;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TmpLehrer = BlazorApp.Controller.LehrerController.GetByEMail(Args.Data.email);
|
||||
if (TmpLehrer.Count > 1)
|
||||
{
|
||||
Args.Cancel = true;
|
||||
ToastObj.CssClass = "e-toast-danger";
|
||||
ToastContent = "Die eingegebene Mail-Aadresse wird bereits verwendet.";
|
||||
StateHasChanged();
|
||||
ToastObj.ShowAsync();
|
||||
// Grid.Refresh();
|
||||
return;
|
||||
}
|
||||
Args.Data.mutierer = userid.ToString();
|
||||
Args.Data.mutiert_am = DateTime.Now;
|
||||
BlazorApp.Controller.LehrerController.PUT(Args.Data);
|
||||
ToastObj.CssClass = "e-toast-success";
|
||||
ToastContent = "Daten erfolgreich gespeichert";
|
||||
StateHasChanged();
|
||||
ToastObj.ShowAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task OnCompletedHandler(ActionEventArgs<BWPMModels.Lehrer> Args)
|
||||
|
||||
{
|
||||
if (Args.RequestType == Syncfusion.Blazor.Grids.Action.Save)
|
||||
{
|
||||
await Grid.SetRowData(Args.Data.ID, Args.Data);
|
||||
double xx = 0;
|
||||
Value = Args.Data.ID;
|
||||
xx = await DataHandler();
|
||||
await Grid.SelectRow(xx);
|
||||
|
||||
}
|
||||
}
|
||||
public async void RowDataBoundHandler(BeforeDataBoundArgs<BWPMModels.Lehrer> args)
|
||||
{
|
||||
if (!Initial)
|
||||
{
|
||||
//await Task.Delay(100);
|
||||
//var Idx = await this.Grid.GetRowIndexByPrimaryKey(Convert.ToDouble(Value)); //get index value
|
||||
//this.Grid.SelectRow(Convert.ToDouble(Idx));
|
||||
}
|
||||
Initial = false;
|
||||
}
|
||||
|
||||
public async Task<double> DataHandler()
|
||||
{
|
||||
var PageCount = (GridData.Count / Grid.PageSettings.PageSize) + 1;
|
||||
ContinuePaging = true;
|
||||
var CurrentPage = 1;
|
||||
Grid.Refresh();
|
||||
await Grid.GoToPage(1);
|
||||
|
||||
for (int i = 1; i <= PageCount; i++)
|
||||
|
||||
{
|
||||
List<Lehrer> Rows = await Grid.GetCurrentViewRecords(); // returns the current view data
|
||||
for (int j = 0; j < Grid.PageSettings.PageSize; j++)
|
||||
{
|
||||
if (j < Rows.Count && Rows[j].ID == Value)
|
||||
{
|
||||
foundrow = j;
|
||||
|
||||
ContinuePaging = false; // prevent the default navigation
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ContinuePaging)
|
||||
{
|
||||
if (i >= PageCount)
|
||||
{
|
||||
i = 0;
|
||||
}
|
||||
await Grid.GoToPage(i + 1);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return foundrow;
|
||||
}
|
||||
}
|
||||
return foundrow;
|
||||
}
|
||||
|
||||
public void CommandClickHandler(CommandClickEventArgs<Lehrer> args)
|
||||
{
|
||||
if (args.CommandColumn.Title == "Lehrer-Daten")
|
||||
{
|
||||
NavigationManager.NavigateTo("/Teacher/TeacherContact/" + args.RowData.ID.ToString());
|
||||
|
||||
}
|
||||
if (args.CommandColumn.Title == "Schüler-Daten")
|
||||
{
|
||||
NavigationManager.NavigateTo("/Teacher/TeacherStudent/" + args.RowData.ID.ToString());
|
||||
|
||||
}
|
||||
if (args.CommandColumn.Title=="Berufsangebot"){
|
||||
NavigationManager.NavigateTo("/Company/Berufsangebot/" + args.RowData.ID.ToString());
|
||||
|
||||
}
|
||||
if (args.CommandColumn.Title=="Ansprechperson"){
|
||||
NavigationManager.NavigateTo("/Company/CompanyContact/" + args.RowData.ID.ToString());
|
||||
|
||||
}
|
||||
//Perform your custom command button click operation here. And also with the value in “args” you can differentiate the buttons, if having multiple custom command buttons.
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<div id="container">
|
||||
|
||||
<SfGrid DataSource="@users" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" Height="315" AllowSelection="true" AllowSorting="true" AllowFiltering="true" EnableVirtualization="true">
|
||||
<SfGrid DataSource="@users" Toolbar="@(new List<string>() { "Add","Edit", "Delete", "Update", "Cancel" })" Height="315" AllowSelection="true" AllowSorting="true" AllowFiltering="true" EnableVirtualization="true">
|
||||
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Menu"></GridFilterSettings>
|
||||
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="EditMode.Dialog"></GridEditSettings>
|
||||
<GridEvents OnActionBegin="OnBeginHandler" TValue="User"></GridEvents>
|
||||
|
||||
Reference in New Issue
Block a user