kreta/KretaWeb/Areas/Alkalmazott/Views/Shared/Info_Elerhetosegek_Tab.cshtml
2024-03-13 00:33:46 +01:00

78 lines
No EOL
3.5 KiB
Text

@using Kreta.Web.Helpers.Grid;
@using Kreta.Resources
@using Kreta.Web.Areas.Alkalmazott.Models
@model AlkalmazottDetailModel
@{
List<FunctionCommand> ElerhetosegekFunctionCommandList = new List<FunctionCommand>();
ElerhetosegekFunctionCommandList.Add(new FunctionCommand
{
Name = ImportExportCommonResource.Export.ToUpper(),
NestedCommands = new List<FunctionCommand> {
new FunctionCommand { Name = "Cím adatok exportálása", ClientAction = "function() {ElerhetosegHelper.getExportElerhetosegCim(" + Model.Id.ToString() + "); }" },
new FunctionCommand { Name = "Telefonszám adatok exportálása", ClientAction = "function() {ElerhetosegHelper.getExportElerhetosegTelefon(" + Model.Id.ToString() + "); }" },
new FunctionCommand { Name = "E-mail cím adatok exportálása", ClientAction = "function() {ElerhetosegHelper.getExportElerhetosegEmail(" + Model.Id.ToString() + "); }" },
new FunctionCommand { Name = "Összes elérhetőség exportálása", ClientAction = "function() {ElerhetosegHelper.getExportElerhetosegOsszes(" + Model.Id.ToString() + "); }" },
}
});
}
<div class="container-fluid">
@(
Html.KretaGrid<AlkalmazottInfoModel.ElerhetosegCimModel>(
name: "ElerhetosegCimGrid",
getUrl: new GridApiUrl(Model.AlkalmazottApiControllerName, "GetElerhetosegCimGrid", new Dictionary<string, string> { { "Id", Model.Id.ToString() } })
)
.Columns(columns =>
{
columns.Bound(c => c.TIPUS_DNAME);
columns.Bound(c => c.Orszag_DNAME);
columns.Bound(c => c.IRANYITOSZAM).Width("10%");
columns.Bound(c => c.VAROS);
columns.Bound(c => c.Cim);
})
.CheckBoxColumn(AlkalmazottResource.Alapertelmezett, c => c.Alapertelmezett_BOOL, addHeaderTitle: true)
.FunctionCommand(Html, ElerhetosegekFunctionCommandList)
.Sortable(sortable => sortable
.AllowUnsort(true)
.SortMode(GridSortMode.MultipleColumn))
)
<br />
@(
Html.KretaGrid<AlkalmazottInfoModel.ElerhetosegTelefonModel>(
name: "ElerhetosegTelefonGrid",
getUrl: new GridApiUrl(Model.AlkalmazottApiControllerName, "GetElerhetosegTelefonGrid", new Dictionary<string, string> { { "Id", Model.Id.ToString() } })
)
.Columns(columns =>
{
columns.Bound(c => c.TYPE_DNAME);
columns.Bound(c => c.Phone).Width("15%");
})
.CheckBoxColumn(AlkalmazottResource.Alapertelmezett, c => c.ALAPERTELMEZETT_BOOL, addHeaderTitle: true)
.Sortable(sortable => sortable
.AllowUnsort(true)
.SortMode(GridSortMode.MultipleColumn))
)
<br />
@(
Html.KretaGrid<AlkalmazottInfoModel.ElerhetosegEmailModel>(
name: "ElerhetosegEmailGrid",
getUrl: new GridApiUrl(Model.AlkalmazottApiControllerName, "GetElerhetosegEmailGrid", new Dictionary<string, string> { { "Id", Model.Id.ToString() } })
)
.Columns(columns =>
{
columns.Bound(c => c.TYPE_DNAME);
columns.Bound(c => c.Email).Width("33%").ClientTemplate(@"
# if (Email != null ){# #: Email # # } #
# if (IsHibasanMegadva_BOOL == true) { #
<i class='fa fa-exclamation-triangle' title='Hibás email cím!'></i>
# }#");
})
.CheckBoxColumn(AlkalmazottResource.Alapertelmezett, c => c.ALAPERTELMEZETT_BOOL, addHeaderTitle: true)
.Sortable(sortable => sortable
.AllowUnsort(true)
.SortMode(GridSortMode.MultipleColumn))
)
</div>