Files
Backend-Api/ServiceHost/Areas/AdminNew/Pages/Company/FileBackup/Index.cshtml
2024-12-23 17:31:09 +03:30

269 lines
11 KiB
Plaintext

@page
@model ServiceHost.Areas.AdminNew.Pages.Company.FileBackup.IndexModel
@inject _0_Framework.Application.IAuthHelper AuthHelper;
@{
string versionAdmin = _0_Framework.Application.Version.AdminVersion;
ViewData["Title"] = " - " + "گروهبندی";
int indexDb = 1;
int indexfastDb = 1;
int indexInsurance = 1;
}
@section Styles {
<link href="~/AssetsClient/css/table-style.css?ver=?ver=@versionAdmin" rel="stylesheet" />
<link href="~/AssetsClient/css/table-responsive.css?ver=@versionAdmin" rel="stylesheet" />
<style>
/* Start Select2 */
.select2.select2-container .select2-selection {
display: flex !important;
height: 0 !important;
padding: 0px;
}
.select2.select2-container .select2-selection--multiple .select2-selection__rendered {
margin: 0;
}
.select2-container--default .select2-search--inline .select2-search__field {
line-height: 32px;
padding: 0 0;
font-family: 'IRANYekanX';
}
/* End Select2 */
.sweet-alert {
font-family: 'IranSans' !important
}
</style>
}
<div class="row p-0 mb-3">
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center">
<img src="~/assetsclient/images/icons/backup-system.png" style="width: 45px"/>
<h4 class="ms-3 title d-flex align-items-center">بکاپ گیری</h4>
<button class="ms-1 btn-search btn-rounded d-flex align-items-center" onclick="Fast()">
<span>بکاپ سریع</span>
</button>
<button class="ms-2 btn-search d-flex align-items-center" onclick="EveryHour()">
<span>بکاپ ساعتی</span>
</button>
</div>
<div>
<a asp-area="Admin" asp-page="/Index" class="back-btn" type="button">
<span>بازگشت</span>
</a>
</div>
</div>
</div>
<div class="row p-0">
<div class="col-12 col-md-6 p-0 pe-1">
<div class="wrapper list-box w-100 card pt-2">
<div class="Rtable Rtable--5cols Rtable--collapse" id="everyHourBackup">
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-1 px-2">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">عنوان</div>
<div class="Rtable-cell column-heading text-end">عملیات</div>
</div>
@foreach (var item in Model.DbBackupList)
{
<div class="Rtable-row align-items-center position-relative">
<div class="Rtable-cell d-md-block d-none width1">
<div class="Rtable-cell--heading">
ردیف
</div>
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center align-items-center justify-content-center">
@(indexDb++)
</span>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width2">
<div class="Rtable-cell--heading">
عنوان
</div>
<div class="Rtable-cell--content">
<p class="d-flex align-items-center m-0">
@item.FileName
</p>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width3">
<div class="Rtable-cell--heading">
عنوان
</div>
<div class="Rtable-cell--content">
<div class="d-flex align-items-center justify-content-end">
<a href="@Url.Page("./Index", "DownloadFile", new { path = @item.FullPath, fileName = @item.FileName })" class="btn-delete1">
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" />
</svg>
</a>
</div>
</div>
</div>
</div>
}
</div>
<div class="Rtable Rtable--5cols Rtable--collapse" style="display: none" id="fastBackup">
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-1 px-2">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">عنوان</div>
<div class="Rtable-cell column-heading text-end">عملیات</div>
</div>
@foreach (var item in Model.FastDbBackupList)
{
<div class="Rtable-row align-items-center position-relative">
<div class="Rtable-cell d-md-block d-none width1">
<div class="Rtable-cell--heading">
ردیف
</div>
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center align-items-center justify-content-center">
@(indexfastDb++)
</span>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width2">
<div class="Rtable-cell--heading">
عنوان
</div>
<div class="Rtable-cell--content">
<p class="d-flex align-items-center m-0">
@item.FileName
</p>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width3">
<div class="Rtable-cell--heading">
عنوان
</div>
<div class="Rtable-cell--content">
<div class="d-flex align-items-center justify-content-end">
<a href="@Url.Page("./Index", "DownloadFile", new { path = @item.FullPath, fileName = @item.FileName })" class="btn-delete1">
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" />
</svg>
</a>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
<div class="col-12 col-md-6 p-0 ps-1">
<div class="wrapper list-box w-100 card pt-2">
<div class="Rtable Rtable--5cols Rtable--collapse">
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-1 px-2">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">عنوان</div>
<div class="Rtable-cell column-heading text-end">عملیات</div>
</div>
@foreach (var item in Model.InsuranceBackupList)
{
<div class="Rtable-row align-items-center position-relative">
<div class="Rtable-cell d-md-block d-none width1">
<div class="Rtable-cell--heading">
ردیف
</div>
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center align-items-center justify-content-center">
@(indexInsurance++)
</span>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width2">
<div class="Rtable-cell--heading">
عنوان
</div>
<div class="Rtable-cell--content">
<p class="d-flex align-items-center m-0">
@item.FileName
</p>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width3">
<div class="Rtable-cell--heading">
عنوان
</div>
<div class="Rtable-cell--content">
<div class="d-flex align-items-center justify-content-end">
<a href="@Url.Page("./Index", "DownloadFile", new { path = @item.FullPath, fileName = @item.FileName })" class="btn-delete1">
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" />
</svg>
</a>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
</div>
<!-- مودال -->
<div id="MainModal" class="modal fade createNewGroup" aria-labelledby="myModalLabel" data-bs-backdrop="static" aria-hidden="true" tabindex="-1" style="display: none;">
<div class="modal-dialog modal-xl-taskTime modal-dialog-centered">
<div class="modal-content" id="ModalContent">
</div>
</div>
</div>
<!-- مودال -->
@section Script {
<script src="~/AssetsClient/js/jquery-ui.js"></script>
<script src="~/assetsclient/js/site.js?ver=@versionAdmin"></script>
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
<script>
var hasDeletePermission = '@AuthHelper.GetPermissions().Any(x => x == 90213)';
function Fast() {
console.log("fast");
document.getElementById('fastBackup').style.display = 'block';
document.getElementById('everyHourBackup').style.display = 'none';
}
function EveryHour() {
document.getElementById('fastBackup').style.display = 'none';
document.getElementById('everyHourBackup').style.display = 'block';
}
</script>
}