You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.3 KiB
49 lines
2.3 KiB
@using Syncfusion.Blazor.Grids;
|
|
@using BlazorApp.Helper
|
|
@using BWPMModels;
|
|
|
|
<SfGrid ID="Grid6" DataSource="@GridDataZuteilung" @ref="GridZuteilung" AllowPaging="true" AllowSorting="true"
|
|
Toolbar="@(new List<string>() { "Add", "Edit", "Update", "Cancel" })"
|
|
ContextMenuItems="@(new List<Object>(){ new ContextMenuItemModel { Text = "Zuteilen", Target = ".e-content"} })">
|
|
<GridPageSettings PageCount="5" PageSizes="true"></GridPageSettings>
|
|
<GridEditSettings AllowAdding="false" AllowDeleting="false" AllowEditing="false" Mode="EditMode.Dialog"></GridEditSettings>
|
|
<GridEvents ContextMenuItemClicked="OnContextMenuClick" TValue="View_Offene_Plaetze"></GridEvents>
|
|
<GridColumns>
|
|
<GridColumn Field=@nameof(View_Offene_Plaetze.ID) HeaderText="Id" IsPrimaryKey="true" AllowAdding="false" Width="60" Visible="false"> </GridColumn>
|
|
<GridColumn Field=@nameof(View_Offene_Plaetze.nameZ1) HeaderText="Firma" Width="100" Visible="true"></GridColumn>
|
|
<GridColumn Field=@nameof(View_Offene_Plaetze.zeit) HeaderText="Zeit" Width="100" Visible="true"></GridColumn>
|
|
<GridColumn Field=@nameof(View_Offene_Plaetze.anzahl) HeaderText="Anzahl" Width="100" Visible="true"></GridColumn>
|
|
<GridColumn Field=@nameof(View_Offene_Plaetze.typ) HeaderText="Typ" Width="40" Visible="true"></GridColumn>
|
|
</GridColumns>
|
|
</SfGrid>
|
|
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
public EventCallback<string> OnGridChanged { get; set; }
|
|
public int SchuelerID { get; set; }
|
|
|
|
SfGrid<View_Offene_Plaetze> GridZuteilung { get; set; }
|
|
|
|
public List<BWPMModels.View_Offene_Plaetze> GridDataZuteilung { get; set; }
|
|
BWPMModels.Zuteilung NeuZuteilung { get; set; }
|
|
|
|
private Task OnContextMenuClick(ContextMenuClickEventArgs<View_Offene_Plaetze> args)
|
|
{
|
|
|
|
int s =0;
|
|
s = SchuelerID;
|
|
int b = 0;
|
|
b = GridDataZuteilung[Convert.ToInt32(args.RowInfo.RowIndex)].ID;
|
|
BlazorApp.Controller.ZuteilungController.insert_zuteilung(s, b);
|
|
return OnGridChanged.InvokeAsync(s.ToString());
|
|
}
|
|
|
|
public void ReloadData(int IBerufID, int IKlassentypID)
|
|
{
|
|
GridDataZuteilung = BlazorApp.Controller.ZuteilungController.GetOffenePlaetze(IBerufID, IKlassentypID);
|
|
GridZuteilung.Refresh();
|
|
}
|
|
}
|