สร้างรายงานใหม่
This commit is contained in:
147
ApiControllers/core_permission_listControllers.cs
Normal file
147
ApiControllers/core_permission_listControllers.cs
Normal file
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using TTSW.Controllers;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
using System.Data;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using OfficeOpenXml;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
//[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/core_permission_list")]
|
||||
public class core_permission_listController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<core_permission_listController> _logger;
|
||||
private Icore_permission_listService _repository;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Default constructure for dependency injection
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="logger"></param>
|
||||
public core_permission_listController(ILogger<core_permission_listController> logger, Icore_permission_listService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Blank Item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return a blank item</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("GetBlankItem")]
|
||||
[ProducesResponseType(typeof(core_permission_listWithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetBlankItem()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.GetBlankItem();
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetBlankItem.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("core_permission_list_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult core_permission_list_report(core_permission_listReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
|
||||
var stream = new MemoryStream();
|
||||
|
||||
using (ExcelPackage excel = new ExcelPackage(stream))
|
||||
{
|
||||
excel.Workbook.Worksheets.Add("Sheet1");
|
||||
|
||||
var headerRow = new List<string[]>()
|
||||
{
|
||||
new string[] { "Column Name", "Data Type", "Size", "Primary Key", "FK", "UI", "MultiSelectionTable", "Desc", "Desc EN", "row", "column", "length" }
|
||||
};
|
||||
|
||||
// Determine the header range (e.g. A1:D1)
|
||||
string headerRange = "A1:" + Char.ConvertFromUtf32(headerRow[0].Length + 64) + "1";
|
||||
|
||||
// Target a worksheet
|
||||
var worksheet = excel.Workbook.Worksheets["Sheet1"];
|
||||
|
||||
// Popular header row data
|
||||
worksheet.Cells[headerRange].LoadFromArrays(headerRow);
|
||||
|
||||
//convert the excel package to a byte array
|
||||
byte[] bin = excel.GetAsByteArray();
|
||||
|
||||
return File(new MemoryStream(bin), model.contentType);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] ReadFully(Stream input)
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
input.CopyTo(ms);
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
BIN
EXCEL/eva_level_score@core_permission_list.xlsx
Normal file
BIN
EXCEL/eva_level_score@core_permission_list.xlsx
Normal file
Binary file not shown.
18
Models/core_permission_list/Icore_permission_listService.cs
Normal file
18
Models/core_permission_list/Icore_permission_listService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public interface Icore_permission_listService
|
||||
{
|
||||
core_permission_listWithSelectionViewModel GetBlankItem();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class core_permission_listInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class core_permission_listReportRequestModel : core_permission_listSearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class core_permission_listSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
44
Models/core_permission_list/core_permission_listService.cs
Normal file
44
Models/core_permission_list/core_permission_listService.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Net;
|
||||
using TTSW.Configure;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Data;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class core_permission_listService : Icore_permission_listService
|
||||
{
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public core_permission_listService(IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
|
||||
public core_permission_listWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new core_permission_listWithSelectionViewModel();
|
||||
i.item_org_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
Models/core_permission_list/core_permission_listViewModel.cs
Normal file
22
Models/core_permission_list/core_permission_listViewModel.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class core_permission_listViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public string org_id_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class core_permission_listWithSelectionViewModel: core_permission_listViewModel
|
||||
{
|
||||
public List<external_linkageViewModel> item_org_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -293,6 +293,8 @@ namespace Test01
|
||||
|
||||
services.AddScoped<Irep_kp7Service, rep_kp7Service>();
|
||||
|
||||
services.AddScoped<Icore_permission_listService, core_permission_listService>();
|
||||
|
||||
#endregion
|
||||
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
@@ -515,6 +517,11 @@ namespace Test01
|
||||
cfg.CreateMap<rep_eva_xInputModel, eva_level_scoreEntity>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, rep_eva_xViewModel>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, rep_eva_xWithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<core_permission_listInputModel, eva_level_scoreEntity>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, core_permission_listViewModel>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, core_permission_listWithSelectionViewModel>();
|
||||
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
66
ViewControllers/core_permission_listViewControllers.cs
Normal file
66
ViewControllers/core_permission_listViewControllers.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using TodoAPI2.Models;
|
||||
using STAFF_API.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using TodoAPI2.Controllers;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
public class core_permission_listViewController : Controller
|
||||
{
|
||||
private ILogger<core_permission_listController> _logger;
|
||||
private Icore_permission_listService _repository;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructure for dependency injection
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="logger"></param>
|
||||
public core_permission_listViewController(ILogger<core_permission_listController> logger, Icore_permission_listService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
// public IActionResult core_permission_list()
|
||||
// {
|
||||
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
// }
|
||||
|
||||
// public IActionResult core_permission_list_d()
|
||||
// {
|
||||
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
// }
|
||||
|
||||
public IActionResult core_permission_list_report()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
//public IActionResult core_permission_list_inline()
|
||||
//{
|
||||
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
//}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "core_permission_list";
|
||||
}
|
||||
|
||||
<div class="row page-title">
|
||||
<div class="col-md-5">
|
||||
<div class="page-title">
|
||||
@Configuration["SiteInformation:modulename"]
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<ol class="breadcrumb" style="">
|
||||
<li class="breadcrumb-item "><a href="javascript:window_open_from_root('@Configuration["SiteInformation:mainsite"]');">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="javascript:window_open_from_root('@Configuration["SiteInformation:modulesite"]');">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">รายงาน core_permission_list</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>รายงาน core_permission_list</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_core_permission_list_org_id' for='s_core_permission_list_org_id'>หน่วยงาน</label>
|
||||
<select class="form-control" id="s_core_permission_list_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="s_core_permission_list" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info" onclick="javascript:core_permission_list_DoSearch('pdf');">แสดงรายงาน</button>
|
||||
<button class="btn btn-info" onclick="javascript:core_permission_list_DoSearch('xlsx');">ดาวน์โหลดเป็น Excel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<br/>
|
||||
<iframe id="report_result" style="display:none; height:500px; width:100%;"></iframe>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/core_permission_list/core_permission_list_report.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
core_permission_list_InitialForm();
|
||||
SetupValidationRemark("s_core_permission_list");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"connectionStrings": {
|
||||
//"mainDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;",
|
||||
//"externalDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;"
|
||||
"mainDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;",
|
||||
"externalDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;"
|
||||
"mainDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;",
|
||||
"externalDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;"
|
||||
//"mainDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;",
|
||||
//"externalDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;"
|
||||
},
|
||||
"IdentityServer": {
|
||||
"url": "",
|
||||
|
||||
36
tb320eva.xml
36
tb320eva.xml
@@ -23,6 +23,34 @@
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.core_permission_listController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.core_permission_listController},TodoAPI2.Models.Icore_permission_listService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
</summary>
|
||||
<param name="repository"></param>
|
||||
<param name="configuration"></param>
|
||||
<param name="logger"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.core_permission_listController.GetBlankItem">
|
||||
<summary>
|
||||
Get Blank Item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return a blank item</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.core_permission_listController.core_permission_list_report(TodoAPI2.Models.core_permission_listReportRequestModel)">
|
||||
<summary>
|
||||
Download Report
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return list of items by specifced keyword</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_adjust_postponement_detail_normalController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_adjust_postponement_detail_normalController},TodoAPI2.Models.Ieva_adjust_postponement_detail_normalService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
@@ -3726,6 +3754,14 @@
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.core_permission_listViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.core_permission_listController},TodoAPI2.Models.Icore_permission_listService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
</summary>
|
||||
<param name="repository"></param>
|
||||
<param name="configuration"></param>
|
||||
<param name="logger"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_adjust_postponement_normalViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_adjust_postponement_normalController},TodoAPI2.Models.Ieva_adjust_postponement_normalService,Microsoft.Extensions.Configuration.IConfiguration,TodoAPI2.Models.Iexternal_employeeService)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
var core_permission_list_API = "/api/core_permission_list/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function core_permission_list_GetSearchParameter(fileType) {
|
||||
var core_permission_listSearchObject = new Object();
|
||||
core_permission_listSearchObject.org_id = $("#s_core_permission_list_org_id").val();
|
||||
|
||||
|
||||
core_permission_listSearchObject.fileType = fileType;
|
||||
|
||||
console.log(core_permission_listSearchObject);
|
||||
|
||||
return core_permission_listSearchObject;
|
||||
}
|
||||
|
||||
function core_permission_list_FeedDataToSearchForm(data) {
|
||||
DropDownClearFormAndFeedWithData($("#s_core_permission_list_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function core_permission_list_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
core_permission_list_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + core_permission_list_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_core_permission_list_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function core_permission_list_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_core_permission_list', s_core_permission_list_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(core_permission_list_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/core_permission_list/core_permission_list_report?" + p;
|
||||
|
||||
if (fileType === "pdf") {
|
||||
$("#report_result").attr("src", report_url);
|
||||
$("#report_result").show();
|
||||
//window.open(report_url);
|
||||
} else {
|
||||
$("#report_result").hide();
|
||||
window.open(report_url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user