จัดทำรายงาน แบบแจ้งเตือนผลการเลื่อนเงินเดือน เสร็จ
This commit is contained in:
146
ApiControllers/rep_eva_self_reviewControllers.cs
Normal file
146
ApiControllers/rep_eva_self_reviewControllers.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
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;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
//[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/rep_eva_self_review")]
|
||||
public class rep_eva_self_reviewController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<rep_eva_self_reviewController> _logger;
|
||||
private Irep_eva_self_reviewService _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 rep_eva_self_reviewController(ILogger<rep_eva_self_reviewController> logger, Irep_eva_self_reviewService 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(rep_eva_self_reviewWithSelectionViewModel), 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("rep_eva_self_review_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult rep_eva_self_review_report(rep_eva_self_reviewReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
var temp = (from x in _repository.GetContext().eva_adjust_postponement_detail
|
||||
join y in _repository.GetContext().eva_adjust_postponement
|
||||
on x.adjust_postponement_id equals y.id
|
||||
where x.id == model.detail_id
|
||||
select y).FirstOrDefault();
|
||||
if(temp != null)
|
||||
{
|
||||
model.theround = temp.theRound.ToString();
|
||||
model.theyear = temp.fiscal_year.ToString();
|
||||
}
|
||||
|
||||
var temp2 = (from x in _repository.GetContext().eva_adjust_postponement_detail
|
||||
where x.id == model.detail_id
|
||||
select x).FirstOrDefault();
|
||||
|
||||
if(temp2 != null && temp2.promoted_percentage.HasValue)
|
||||
{
|
||||
model.x1 = temp2.promoted_percentage.Value > 0 ? "X" : "";
|
||||
model.x2 = temp2.promoted_percentage.Value <= 0 ? "X" : "";
|
||||
}
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_eva_self_review.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
if (model.filetype == "xlsx")
|
||||
{
|
||||
url += "&ignorePagination=true";
|
||||
}
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
BIN
EXCEL/eva_level_score@rep_eva_self_review.xlsx
Normal file
BIN
EXCEL/eva_level_score@rep_eva_self_review.xlsx
Normal file
Binary file not shown.
24
Models/rep_eva_self_review/Irep_eva_self_reviewService.cs
Normal file
24
Models/rep_eva_self_review/Irep_eva_self_reviewService.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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 Irep_eva_self_reviewService
|
||||
{
|
||||
|
||||
rep_eva_self_reviewWithSelectionViewModel GetBlankItem();
|
||||
|
||||
DataContext GetContext();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
24
Models/rep_eva_self_review/rep_eva_self_reviewInputModel.cs
Normal file
24
Models/rep_eva_self_review/rep_eva_self_reviewInputModel.cs
Normal file
@@ -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 rep_eva_self_reviewInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public int? detail_id { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
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 rep_eva_self_reviewReportRequestModel : rep_eva_self_reviewSearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
|
||||
public string theyear { get; set; }
|
||||
|
||||
public string theround { get; set; }
|
||||
|
||||
public string x1 { get; set; }
|
||||
|
||||
public string x2 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
23
Models/rep_eva_self_review/rep_eva_self_reviewSearchModel.cs
Normal file
23
Models/rep_eva_self_review/rep_eva_self_reviewSearchModel.cs
Normal file
@@ -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 rep_eva_self_reviewSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public int? detail_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
46
Models/rep_eva_self_review/rep_eva_self_reviewService.cs
Normal file
46
Models/rep_eva_self_review/rep_eva_self_reviewService.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
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 rep_eva_self_reviewService : Irep_eva_self_reviewService
|
||||
{
|
||||
private IBaseRepository<eva_level_scoreEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public rep_eva_self_reviewService(IBaseRepository<eva_level_scoreEntity, Guid> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
public rep_eva_self_reviewWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new rep_eva_self_reviewWithSelectionViewModel();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public DataContext GetContext()
|
||||
{
|
||||
return _repository.Context;
|
||||
}
|
||||
}
|
||||
}
|
||||
21
Models/rep_eva_self_review/rep_eva_self_reviewViewModel.cs
Normal file
21
Models/rep_eva_self_review/rep_eva_self_reviewViewModel.cs
Normal file
@@ -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 rep_eva_self_reviewViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public int? detail_id { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_eva_self_reviewWithSelectionViewModel: rep_eva_self_reviewViewModel
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,14 +22,14 @@
|
||||
"DB_PASSWORD": "project0*",
|
||||
"JasperReportServer_username": "tb@zd.co.th",
|
||||
"SiteInformation_mainsite": "http://tb320dev.zd.co.th",
|
||||
"JasperReportServer_password": "Be$m@rt",
|
||||
"JasperReportServer_password": "project0*",
|
||||
"DB_HOST": "192.168.2.233",
|
||||
"SiteInformation_modulename": "ระบบประวัติเงินเดือนและการเลื่อนเงินเดือน",
|
||||
"SiteInformation_chatsite": "http://chat.rmutto.ac.th",
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"MIGRATION": "true",
|
||||
"JasperReportServer_MainURL": "http://tb-320.zd.co.th/jasperserver/rest_v2/reports",
|
||||
"JasperReportServer_LoginURL": "http://tb-320.zd.co.th/jasperserver/rest_v2/reports",
|
||||
"JasperReportServer_MainURL": "https://hrm.thethaibar.or.th/jasperserver/rest_v2/reports",
|
||||
"JasperReportServer_LoginURL": "https://hrm.thethaibar.or.th/jasperserver/rest_v2/login",
|
||||
"SiteInformation_appsite": "/eva",
|
||||
"SiteInformation_sitename": "เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์"
|
||||
}
|
||||
|
||||
@@ -301,6 +301,8 @@ namespace Test01
|
||||
|
||||
services.AddScoped<Ieva_self_reviewService, eva_self_reviewService>();
|
||||
|
||||
services.AddScoped<Irep_eva_self_reviewService, rep_eva_self_reviewService>();
|
||||
|
||||
#endregion
|
||||
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
@@ -540,6 +542,11 @@ namespace Test01
|
||||
cfg.CreateMap<eva_adjust_postponement_detailEntity, eva_self_reviewViewModel>();
|
||||
cfg.CreateMap<eva_adjust_postponement_detailEntity, eva_self_reviewWithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<rep_eva_self_reviewInputModel, eva_level_scoreEntity>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, rep_eva_self_reviewViewModel>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, rep_eva_self_reviewWithSelectionViewModel>();
|
||||
|
||||
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
50
ViewControllers/rep_eva_self_reviewViewControllers.cs
Normal file
50
ViewControllers/rep_eva_self_reviewViewControllers.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
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 rep_eva_self_reviewViewController : Controller
|
||||
{
|
||||
private ILogger<rep_eva_self_reviewController> _logger;
|
||||
private Irep_eva_self_reviewService _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 rep_eva_self_reviewViewController(ILogger<rep_eva_self_reviewController> logger, Irep_eva_self_reviewService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
|
||||
public IActionResult rep_eva_self_review_report()
|
||||
{
|
||||
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,45 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "rep_eva_self_review";
|
||||
}
|
||||
|
||||
<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">แบบแจ้งเตือนผลการเลื่อนเงินเดือน</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>แบบแจ้งเตือนผลการเลื่อนเงินเดือน</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
<input class="form-control" type="hidden" id="s_rep_eva_self_review_detail_id" />
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info" onclick="javascript:rep_eva_self_review_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/rep_eva_self_review/rep_eva_self_review_report.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
rep_eva_self_review_InitialForm();
|
||||
SetupValidationRemark("s_rep_eva_self_review");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
"From": ""
|
||||
},
|
||||
"JasperReportServer": {
|
||||
"MainURL": "http://tb-320.zd.co.th/jasperserver/rest_v2/reports",
|
||||
"LoginURL": "http://tb-320.zd.co.th/jasperserver/rest_v2/login",
|
||||
"MainURL": "https://hrm.thethaibar.or.th/jasperserver/rest_v2/reports",
|
||||
"LoginURL": "https://hrm.thethaibar.or.th/jasperserver/rest_v2/login",
|
||||
"username": "tb@zd.co.th",
|
||||
"password": "Be$m@rt",
|
||||
"password": "project0*",
|
||||
"reportsite": "/tb320hr_site2"
|
||||
},
|
||||
"SiteInformation": {
|
||||
|
||||
@@ -72,10 +72,12 @@
|
||||
<None Include="Views\eva_adjust_postponement_migrationView\eva_adjust_postponement_migration.cshtml" />
|
||||
<None Include="Views\eva_adjust_postponement_migrationView\eva_adjust_postponement_migration_d.cshtml" />
|
||||
<None Include="Views\eva_self_reviewView\eva_self_review.cshtml" />
|
||||
<None Include="Views\rep_eva_self_reviewView\rep_eva_self_review_report.cshtml" />
|
||||
<None Include="wwwroot\js\eva_adjust_postponement_detail_migration\eva_adjust_postponement_detail_migration.js" />
|
||||
<None Include="wwwroot\js\eva_adjust_postponement_migration\eva_adjust_postponement_migration.js" />
|
||||
<None Include="wwwroot\js\eva_adjust_postponement_migration\eva_adjust_postponement_migration_d.js" />
|
||||
<None Include="wwwroot\js\eva_self_review\eva_self_review.js" />
|
||||
<None Include="wwwroot\js\rep_eva_self_review\rep_eva_self_review_report.js" />
|
||||
<Content Update="nlog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
36
tb320eva.xml
36
tb320eva.xml
@@ -3682,6 +3682,34 @@
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_eva_self_reviewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_eva_self_reviewController},TodoAPI2.Models.Irep_eva_self_reviewService,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.rep_eva_self_reviewController.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.rep_eva_self_reviewController.rep_eva_self_review_report(TodoAPI2.Models.rep_eva_self_reviewReportRequestModel)">
|
||||
<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.rep_eva_xController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_eva_xController},TodoAPI2.Models.Irep_eva_xService,Microsoft.Extensions.Configuration.IConfiguration,TodoAPI2.Models.Ieva_create_evaluation_detail_processService,TodoAPI2.Models.Iexternal_linkageService,TodoAPI2.Models.Iexternal_employeeService)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
@@ -4258,6 +4286,14 @@
|
||||
<param name="logger"></param>
|
||||
<param name="inemp"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_eva_self_reviewViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_eva_self_reviewController},TodoAPI2.Models.Irep_eva_self_reviewService,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.rep_eva_xViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_eva_xController},TodoAPI2.Models.Irep_eva_xService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
|
||||
@@ -79,7 +79,8 @@ function eva_self_review_GoEdit(a) {
|
||||
// Incase open new page
|
||||
//window_open(appsite + "/eva_self_reviewView/eva_self_review_d?id=" + a);
|
||||
|
||||
alert(a);
|
||||
//alert(a);
|
||||
window_open(appsite + "/rep_eva_self_reviewView/rep_eva_self_review_report?id=" + a);
|
||||
}
|
||||
|
||||
function eva_self_review_SetEditForm(a) {
|
||||
|
||||
59
wwwroot/js/rep_eva_self_review/rep_eva_self_review_report.js
Normal file
59
wwwroot/js/rep_eva_self_review/rep_eva_self_review_report.js
Normal file
@@ -0,0 +1,59 @@
|
||||
var rep_eva_self_review_API = "/api/rep_eva_self_review/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function rep_eva_self_review_GetSearchParameter(fileType) {
|
||||
var rep_eva_self_reviewSearchObject = new Object();
|
||||
rep_eva_self_reviewSearchObject.detail_id = getUrlParameter("id");
|
||||
|
||||
|
||||
rep_eva_self_reviewSearchObject.fileType = fileType;
|
||||
|
||||
console.log(rep_eva_self_reviewSearchObject);
|
||||
|
||||
return rep_eva_self_reviewSearchObject;
|
||||
}
|
||||
|
||||
function rep_eva_self_review_FeedDataToSearchForm(data) {
|
||||
$("#s_rep_eva_self_review_detail_id").val(data.detail_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function rep_eva_self_review_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
rep_eva_self_review_FeedDataToSearchForm(result);
|
||||
rep_eva_self_review_DoSearch('pdf');
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + rep_eva_self_review_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_rep_eva_self_review_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function rep_eva_self_review_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_rep_eva_self_review', s_rep_eva_self_review_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(rep_eva_self_review_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/rep_eva_self_review/rep_eva_self_review_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