ปรับปรุงรายงานกรอบวงเงิน
This commit is contained in:
403
ApiControllers/eva_limit_frame_employeeControllers.cs
Normal file
403
ApiControllers/eva_limit_frame_employeeControllers.cs
Normal file
@@ -0,0 +1,403 @@
|
||||
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/eva_limit_frame_employee")]
|
||||
public class eva_limit_frame_employeeController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<eva_limit_frame_employeeController> _logger;
|
||||
private Ieva_limit_frame_employeeService _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 eva_limit_frame_employeeController(ILogger<eva_limit_frame_employeeController> logger, Ieva_limit_frame_employeeService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get specific item by id
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return Get specific item by id</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("{id}")]
|
||||
[ProducesResponseType(typeof(eva_limit_frame_employeeWithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Get(Guid id)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.GetWithSelection(id);
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult Get.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <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(eva_limit_frame_employeeWithSelectionViewModel), 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>
|
||||
/// Get list items by employee_id
|
||||
/// </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("")]
|
||||
[ProducesResponseType(typeof(List<eva_limit_frame_employeeViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetList(int? employee_id)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListByemployee_id(employee_id));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetList.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list items by search
|
||||
/// </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("GetListBySearch")]
|
||||
[ProducesResponseType(typeof(List<eva_limit_frame_employeeViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetListBySearch(eva_limit_frame_employeeSearchModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListBySearch(model));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetListBySearch.", 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("eva_limit_frame_employee_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_limit_frame_employee_report(eva_limit_frame_employeeReportRequestModel 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");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/xxใส่ชื่อรายงานตรงนี้xx.{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}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPost("")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Insert([FromBody] eva_limit_frame_employeeInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Insert(model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"เพิ่มข้อมูล เรียบร้อย";
|
||||
message.data = result;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while insert.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("{id}")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Update(Guid id, [FromBody] eva_limit_frame_employeeInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Update(id, model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"แก้ไขข้อมูล เรียบร้อย";
|
||||
message.data = result;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while update {id.ToString()}.", ex);
|
||||
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpDelete("{id}")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Delete(Guid id)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
_repository.Delete(id);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"ลบข้อมูล เรียบร้อย";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
|
||||
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update multiple item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("UpdateMultiple")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult UpdateMultiple([FromBody] List<eva_limit_frame_employeeInputModel> model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
string rowCount = _repository.UpdateMultiple(model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = "ปรับปรุงข้อมูลเรียบร้อย จำนวน "+rowCount+" รายการ";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while UpdateMultiple.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refresh AutoField of all items
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("RefreshAutoField")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult RefreshAutoField()
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
_repository.RefreshAutoFieldOfAllData();
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"ปรับปรุง Auto Field ของทุก record เรียบร้อย";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while RefreshAutoField.", ex);
|
||||
return StatusCode(500, $"มีปัญหาระหว่างการปรับปรุง Auto Field. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
403
ApiControllers/eva_limit_frame_groupControllers.cs
Normal file
403
ApiControllers/eva_limit_frame_groupControllers.cs
Normal file
@@ -0,0 +1,403 @@
|
||||
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/eva_limit_frame_group")]
|
||||
public class eva_limit_frame_groupController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<eva_limit_frame_groupController> _logger;
|
||||
private Ieva_limit_frame_groupService _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 eva_limit_frame_groupController(ILogger<eva_limit_frame_groupController> logger, Ieva_limit_frame_groupService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get specific item by id
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return Get specific item by id</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("{id}")]
|
||||
[ProducesResponseType(typeof(eva_limit_frame_groupWithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Get(Guid id)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.GetWithSelection(id);
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult Get.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <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(eva_limit_frame_groupWithSelectionViewModel), 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>
|
||||
/// Get list items by group_guid
|
||||
/// </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("")]
|
||||
[ProducesResponseType(typeof(List<eva_limit_frame_groupViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetList(Guid? group_guid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListBygroup_guid(group_guid));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetList.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list items by search
|
||||
/// </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("GetListBySearch")]
|
||||
[ProducesResponseType(typeof(List<eva_limit_frame_groupViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetListBySearch(eva_limit_frame_groupSearchModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListBySearch(model));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetListBySearch.", 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("eva_limit_frame_group_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_limit_frame_group_report(eva_limit_frame_groupReportRequestModel 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");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/xxใส่ชื่อรายงานตรงนี้xx.{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}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPost("")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Insert([FromBody] eva_limit_frame_groupInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Insert(model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"เพิ่มข้อมูล เรียบร้อย";
|
||||
message.data = result;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while insert.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("{id}")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Update(Guid id, [FromBody] eva_limit_frame_groupInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Update(id, model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"แก้ไขข้อมูล เรียบร้อย";
|
||||
message.data = result;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while update {id.ToString()}.", ex);
|
||||
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpDelete("{id}")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Delete(Guid id)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
_repository.Delete(id);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"ลบข้อมูล เรียบร้อย";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
|
||||
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update multiple item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("UpdateMultiple")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult UpdateMultiple([FromBody] List<eva_limit_frame_groupInputModel> model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
string rowCount = _repository.UpdateMultiple(model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = "ปรับปรุงข้อมูลเรียบร้อย จำนวน "+rowCount+" รายการ";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while UpdateMultiple.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refresh AutoField of all items
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("RefreshAutoField")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult RefreshAutoField()
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
_repository.RefreshAutoFieldOfAllData();
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"ปรับปรุง Auto Field ของทุก record เรียบร้อย";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while RefreshAutoField.", ex);
|
||||
return StatusCode(500, $"มีปัญหาระหว่างการปรับปรุง Auto Field. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
403
ApiControllers/eva_limit_frame_planControllers.cs
Normal file
403
ApiControllers/eva_limit_frame_planControllers.cs
Normal file
@@ -0,0 +1,403 @@
|
||||
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/eva_limit_frame_plan")]
|
||||
public class eva_limit_frame_planController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<eva_limit_frame_planController> _logger;
|
||||
private Ieva_limit_frame_planService _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 eva_limit_frame_planController(ILogger<eva_limit_frame_planController> logger, Ieva_limit_frame_planService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get specific item by id
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return Get specific item by id</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("{id}")]
|
||||
[ProducesResponseType(typeof(eva_limit_frame_planWithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Get(Guid id)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.GetWithSelection(id);
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult Get.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <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(eva_limit_frame_planWithSelectionViewModel), 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>
|
||||
/// Get list items by executed_date
|
||||
/// </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("")]
|
||||
[ProducesResponseType(typeof(List<eva_limit_frame_planViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetList(DateTime? executed_date)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListByexecuted_date(executed_date));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetList.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list items by search
|
||||
/// </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("GetListBySearch")]
|
||||
[ProducesResponseType(typeof(List<eva_limit_frame_planViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetListBySearch(eva_limit_frame_planSearchModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListBySearch(model));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetListBySearch.", 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("eva_limit_frame_plan_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_limit_frame_plan_report(eva_limit_frame_planReportRequestModel 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");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/xxใส่ชื่อรายงานตรงนี้xx.{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}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPost("")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Insert([FromBody] eva_limit_frame_planInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Insert(model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"เพิ่มข้อมูล เรียบร้อย";
|
||||
message.data = result;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while insert.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("{id}")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Update(Guid id, [FromBody] eva_limit_frame_planInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Update(id, model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"แก้ไขข้อมูล เรียบร้อย";
|
||||
message.data = result;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while update {id.ToString()}.", ex);
|
||||
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpDelete("{id}")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Delete(Guid id)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
_repository.Delete(id);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"ลบข้อมูล เรียบร้อย";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
|
||||
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update multiple item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="model"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("UpdateMultiple")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult UpdateMultiple([FromBody] List<eva_limit_frame_planInputModel> model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
string rowCount = _repository.UpdateMultiple(model, true);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = "ปรับปรุงข้อมูลเรียบร้อย จำนวน "+rowCount+" รายการ";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while UpdateMultiple.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refresh AutoField of all items
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("RefreshAutoField")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult RefreshAutoField()
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
_repository.RefreshAutoFieldOfAllData();
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"ปรับปรุง Auto Field ของทุก record เรียบร้อย";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while RefreshAutoField.", ex);
|
||||
return StatusCode(500, $"มีปัญหาระหว่างการปรับปรุง Auto Field. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,9 @@ namespace TTSW.EF {
|
||||
//public DbSet<eva_adjust_postponement_detail_normalEntity> eva_adjust_postponement_detail_normal { get; set; }
|
||||
|
||||
public DbSet<eva_evaluation_operating_agreementEntity> eva_evaluation_operating_agreement { get; set; }
|
||||
public DbSet<eva_limit_frame_employeeEntity> eva_limit_frame_employee { get; set; }
|
||||
public DbSet<eva_limit_frame_groupEntity> eva_limit_frame_group { get; set; }
|
||||
public DbSet<eva_limit_frame_planEntity> eva_limit_frame_plan { get; set; }
|
||||
|
||||
public DbSet<eva_idp_planEntity> eva_idp_plan { get; set; }
|
||||
protected override void OnModelCreating (ModelBuilder modelBuilder) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
905
Migrations/25640301044832_AddLimitFrame.Designer.cs
generated
Normal file
905
Migrations/25640301044832_AddLimitFrame.Designer.cs
generated
Normal file
@@ -0,0 +1,905 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using TTSW.EF;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("25640301044832_AddLimitFrame")]
|
||||
partial class AddLimitFrame
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<DateTime?>("imported_date");
|
||||
|
||||
b.Property<string>("imported_file")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit");
|
||||
|
||||
b.Property<decimal?>("limit_frame");
|
||||
|
||||
b.Property<decimal?>("limit_frame_quota");
|
||||
|
||||
b.Property<decimal?>("limit_quota");
|
||||
|
||||
b.Property<int?>("managed_by");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
b.Property<string>("report_type")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("theDate");
|
||||
|
||||
b.Property<int?>("theRound");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<string>("migration_eva_result")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("migration_total_score");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<int?>("order_at_this_time");
|
||||
|
||||
b.Property<int?>("org_at_this_time");
|
||||
|
||||
b.Property<decimal?>("other_money_at_this_time");
|
||||
|
||||
b.Property<decimal?>("position_allowance_at_this_time");
|
||||
|
||||
b.Property<string>("position_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("total_promote");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("adjust_postponement_id");
|
||||
|
||||
b.HasIndex("adjust_postponement_quota_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<decimal?>("score1");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_create_evaluation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("Final_summary_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_reject_reason")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_chief")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_chief_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_self_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor1A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor1A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor2A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<int?>("supervisor1A");
|
||||
|
||||
b.Property<DateTime?>("supervisor1A_date");
|
||||
|
||||
b.Property<string>("supervisor1A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor2");
|
||||
|
||||
b.Property<int?>("supervisor2A");
|
||||
|
||||
b.Property<DateTime?>("supervisor2A_date");
|
||||
|
||||
b.Property<string>("supervisor2A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor2_date");
|
||||
|
||||
b.Property<string>("supervisor2_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_summary_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("thefile")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_achievement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("behavior")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_behavior");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("thegroup")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_evaluation_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.ToTable("eva_evaluation_group_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("indicators")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("mission_detail")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("mission_no");
|
||||
|
||||
b.Property<string>("target")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_operating_agreement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("develop")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("development_method")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_idp_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("frame_group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("level_id");
|
||||
|
||||
b.Property<decimal?>("monthly_remuneration");
|
||||
|
||||
b.Property<int?>("org_id");
|
||||
|
||||
b.Property<decimal?>("position_allowance");
|
||||
|
||||
b.Property<int?>("position_id");
|
||||
|
||||
b.Property<decimal?>("salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("frame_plan_guid");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_295");
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit_rounded");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_plan_guid");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("executed_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005");
|
||||
|
||||
b.Property<Guid?>("plan_guid");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("plan_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_performance_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("list_no");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<string>("step")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_performance_plan_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_promoted_percentage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<int?>("position_level");
|
||||
|
||||
b.Property<int?>("position_type");
|
||||
|
||||
b.Property<decimal?>("temporary_min");
|
||||
|
||||
b.Property<decimal?>("themax");
|
||||
|
||||
b.Property<decimal?>("themin");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_salary_cylinder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_quota_id")
|
||||
.HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_frame_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_planEntity", "eva_limit_frame_plan_frame_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_plan_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("plan_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score")
|
||||
.WithMany()
|
||||
.HasForeignKey("level_score_id");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
132
Migrations/25640301044832_AddLimitFrame.cs
Normal file
132
Migrations/25640301044832_AddLimitFrame.cs
Normal file
@@ -0,0 +1,132 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddLimitFrame : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_limit_frame_plan",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
plan_guid = table.Column<Guid>(nullable: true),
|
||||
executed_date = table.Column<DateTime>(nullable: true),
|
||||
limit_frame_005 = table.Column<decimal>(nullable: true),
|
||||
status_self = table.Column<string>(maxLength: 1, nullable: true),
|
||||
status_chief = table.Column<string>(maxLength: 1, nullable: true),
|
||||
supervisor1 = table.Column<int>(nullable: true),
|
||||
supervisor1_result = table.Column<string>(maxLength: 1, nullable: true),
|
||||
supervisor1_remark = table.Column<string>(maxLength: 1000, nullable: true),
|
||||
supervisor1_date = table.Column<DateTime>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_limit_frame_plan", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_plan_eva_performance_plan_plan_guid",
|
||||
column: x => x.plan_guid,
|
||||
principalTable: "eva_performance_plan",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_limit_frame_group",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
frame_plan_guid = table.Column<Guid>(nullable: true),
|
||||
group_guid = table.Column<Guid>(nullable: true),
|
||||
limit_frame_295 = table.Column<decimal>(nullable: true),
|
||||
total_salary = table.Column<decimal>(nullable: true),
|
||||
total_salary_limit = table.Column<decimal>(nullable: true),
|
||||
total_salary_limit_rounded = table.Column<decimal>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_limit_frame_group", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_group_eva_limit_frame_plan_frame_plan_guid",
|
||||
column: x => x.frame_plan_guid,
|
||||
principalTable: "eva_limit_frame_plan",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_group_eva_evaluation_group_group_guid",
|
||||
column: x => x.group_guid,
|
||||
principalTable: "eva_evaluation_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_limit_frame_employee",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
frame_group_guid = table.Column<Guid>(nullable: true),
|
||||
employee_id = table.Column<int>(nullable: true),
|
||||
org_id = table.Column<int>(nullable: true),
|
||||
position_id = table.Column<int>(nullable: true),
|
||||
level_id = table.Column<int>(nullable: true),
|
||||
salary = table.Column<decimal>(nullable: true),
|
||||
position_allowance = table.Column<decimal>(nullable: true),
|
||||
monthly_remuneration = table.Column<decimal>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_limit_frame_employee", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_frame_group_~",
|
||||
column: x => x.frame_group_guid,
|
||||
principalTable: "eva_limit_frame_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_employee_frame_group_guid",
|
||||
table: "eva_limit_frame_employee",
|
||||
column: "frame_group_guid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_group_frame_plan_guid",
|
||||
table: "eva_limit_frame_group",
|
||||
column: "frame_plan_guid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_group_group_guid",
|
||||
table: "eva_limit_frame_group",
|
||||
column: "group_guid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_plan_plan_guid",
|
||||
table: "eva_limit_frame_plan",
|
||||
column: "plan_guid");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_limit_frame_employee");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_limit_frame_group");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_limit_frame_plan");
|
||||
}
|
||||
}
|
||||
}
|
||||
913
Migrations/25640302035125_AddLimitFrameGroupColumn.Designer.cs
generated
Normal file
913
Migrations/25640302035125_AddLimitFrameGroupColumn.Designer.cs
generated
Normal file
@@ -0,0 +1,913 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using TTSW.EF;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("25640302035125_AddLimitFrameGroupColumn")]
|
||||
partial class AddLimitFrameGroupColumn
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<DateTime?>("imported_date");
|
||||
|
||||
b.Property<string>("imported_file")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit");
|
||||
|
||||
b.Property<decimal?>("limit_frame");
|
||||
|
||||
b.Property<decimal?>("limit_frame_quota");
|
||||
|
||||
b.Property<decimal?>("limit_quota");
|
||||
|
||||
b.Property<int?>("managed_by");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
b.Property<string>("report_type")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("theDate");
|
||||
|
||||
b.Property<int?>("theRound");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<string>("migration_eva_result")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("migration_total_score");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<int?>("order_at_this_time");
|
||||
|
||||
b.Property<int?>("org_at_this_time");
|
||||
|
||||
b.Property<decimal?>("other_money_at_this_time");
|
||||
|
||||
b.Property<decimal?>("position_allowance_at_this_time");
|
||||
|
||||
b.Property<string>("position_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("total_promote");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("adjust_postponement_id");
|
||||
|
||||
b.HasIndex("adjust_postponement_quota_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<decimal?>("score1");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_create_evaluation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("Final_summary_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_reject_reason")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_chief")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_chief_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_self_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor1A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor1A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor2A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<int?>("supervisor1A");
|
||||
|
||||
b.Property<DateTime?>("supervisor1A_date");
|
||||
|
||||
b.Property<string>("supervisor1A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor2");
|
||||
|
||||
b.Property<int?>("supervisor2A");
|
||||
|
||||
b.Property<DateTime?>("supervisor2A_date");
|
||||
|
||||
b.Property<string>("supervisor2A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor2_date");
|
||||
|
||||
b.Property<string>("supervisor2_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_summary_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("thefile")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_achievement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("behavior")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_behavior");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("thegroup")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_evaluation_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.ToTable("eva_evaluation_group_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("indicators")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("mission_detail")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("mission_no");
|
||||
|
||||
b.Property<string>("target")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_operating_agreement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("develop")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("development_method")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_idp_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("frame_group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("level_id");
|
||||
|
||||
b.Property<Guid?>("limit_frame_group_id");
|
||||
|
||||
b.Property<decimal?>("monthly_remuneration");
|
||||
|
||||
b.Property<int?>("org_id");
|
||||
|
||||
b.Property<decimal?>("position_allowance");
|
||||
|
||||
b.Property<int?>("position_id");
|
||||
|
||||
b.Property<decimal?>("salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_group_guid");
|
||||
|
||||
b.HasIndex("limit_frame_group_id");
|
||||
|
||||
b.ToTable("eva_limit_frame_employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("frame_plan_guid");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_295");
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit_rounded");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_plan_guid");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("executed_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005");
|
||||
|
||||
b.Property<Guid?>("plan_guid");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("plan_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_performance_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("list_no");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<string>("step")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_performance_plan_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_promoted_percentage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<int?>("position_level");
|
||||
|
||||
b.Property<int?>("position_type");
|
||||
|
||||
b.Property<decimal?>("temporary_min");
|
||||
|
||||
b.Property<decimal?>("themax");
|
||||
|
||||
b.Property<decimal?>("themin");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_salary_cylinder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_quota_id")
|
||||
.HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_frame_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_group_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_limit_frame_group_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("limit_frame_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_planEntity", "eva_limit_frame_plan_frame_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_plan_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("plan_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score")
|
||||
.WithMany()
|
||||
.HasForeignKey("level_score_id");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Migrations/25640302035125_AddLimitFrameGroupColumn.cs
Normal file
44
Migrations/25640302035125_AddLimitFrameGroupColumn.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddLimitFrameGroupColumn : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_employee_limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee",
|
||||
column: "limit_frame_group_id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_limit_frame_~",
|
||||
table: "eva_limit_frame_employee",
|
||||
column: "limit_frame_group_id",
|
||||
principalTable: "eva_limit_frame_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_limit_frame_~",
|
||||
table: "eva_limit_frame_employee");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_eva_limit_frame_employee_limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee");
|
||||
}
|
||||
}
|
||||
}
|
||||
905
Migrations/25640302040600_RemoveLimitFrameGroupColumn.Designer.cs
generated
Normal file
905
Migrations/25640302040600_RemoveLimitFrameGroupColumn.Designer.cs
generated
Normal file
@@ -0,0 +1,905 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using TTSW.EF;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("25640302040600_RemoveLimitFrameGroupColumn")]
|
||||
partial class RemoveLimitFrameGroupColumn
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<DateTime?>("imported_date");
|
||||
|
||||
b.Property<string>("imported_file")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit");
|
||||
|
||||
b.Property<decimal?>("limit_frame");
|
||||
|
||||
b.Property<decimal?>("limit_frame_quota");
|
||||
|
||||
b.Property<decimal?>("limit_quota");
|
||||
|
||||
b.Property<int?>("managed_by");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
b.Property<string>("report_type")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("theDate");
|
||||
|
||||
b.Property<int?>("theRound");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<string>("migration_eva_result")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("migration_total_score");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<int?>("order_at_this_time");
|
||||
|
||||
b.Property<int?>("org_at_this_time");
|
||||
|
||||
b.Property<decimal?>("other_money_at_this_time");
|
||||
|
||||
b.Property<decimal?>("position_allowance_at_this_time");
|
||||
|
||||
b.Property<string>("position_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("total_promote");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("adjust_postponement_id");
|
||||
|
||||
b.HasIndex("adjust_postponement_quota_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<decimal?>("score1");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_create_evaluation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("Final_summary_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_reject_reason")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_chief")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_chief_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_self_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor1A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor1A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor2A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<int?>("supervisor1A");
|
||||
|
||||
b.Property<DateTime?>("supervisor1A_date");
|
||||
|
||||
b.Property<string>("supervisor1A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor2");
|
||||
|
||||
b.Property<int?>("supervisor2A");
|
||||
|
||||
b.Property<DateTime?>("supervisor2A_date");
|
||||
|
||||
b.Property<string>("supervisor2A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor2_date");
|
||||
|
||||
b.Property<string>("supervisor2_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_summary_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("thefile")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_achievement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("behavior")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_behavior");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("thegroup")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_evaluation_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.ToTable("eva_evaluation_group_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("indicators")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("mission_detail")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("mission_no");
|
||||
|
||||
b.Property<string>("target")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_operating_agreement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("develop")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("development_method")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_idp_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("frame_group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("level_id");
|
||||
|
||||
b.Property<decimal?>("monthly_remuneration");
|
||||
|
||||
b.Property<int?>("org_id");
|
||||
|
||||
b.Property<decimal?>("position_allowance");
|
||||
|
||||
b.Property<int?>("position_id");
|
||||
|
||||
b.Property<decimal?>("salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("frame_plan_guid");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_295");
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit_rounded");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_plan_guid");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("executed_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005");
|
||||
|
||||
b.Property<Guid?>("plan_guid");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("plan_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_performance_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("list_no");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<string>("step")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_performance_plan_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_promoted_percentage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<int?>("position_level");
|
||||
|
||||
b.Property<int?>("position_type");
|
||||
|
||||
b.Property<decimal?>("temporary_min");
|
||||
|
||||
b.Property<decimal?>("themax");
|
||||
|
||||
b.Property<decimal?>("themin");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_salary_cylinder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_quota_id")
|
||||
.HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_frame_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_planEntity", "eva_limit_frame_plan_frame_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_plan_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("plan_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score")
|
||||
.WithMany()
|
||||
.HasForeignKey("level_score_id");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Migrations/25640302040600_RemoveLimitFrameGroupColumn.cs
Normal file
44
Migrations/25640302040600_RemoveLimitFrameGroupColumn.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class RemoveLimitFrameGroupColumn : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_limit_frame_~",
|
||||
table: "eva_limit_frame_employee");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_eva_limit_frame_employee_limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_employee_limit_frame_group_id",
|
||||
table: "eva_limit_frame_employee",
|
||||
column: "limit_frame_group_id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_limit_frame_~",
|
||||
table: "eva_limit_frame_employee",
|
||||
column: "limit_frame_group_id",
|
||||
principalTable: "eva_limit_frame_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
907
Migrations/25640302050315_FixMissingColumn.Designer.cs
generated
Normal file
907
Migrations/25640302050315_FixMissingColumn.Designer.cs
generated
Normal file
@@ -0,0 +1,907 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using TTSW.EF;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("25640302050315_FixMissingColumn")]
|
||||
partial class FixMissingColumn
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<DateTime?>("imported_date");
|
||||
|
||||
b.Property<string>("imported_file")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit");
|
||||
|
||||
b.Property<decimal?>("limit_frame");
|
||||
|
||||
b.Property<decimal?>("limit_frame_quota");
|
||||
|
||||
b.Property<decimal?>("limit_quota");
|
||||
|
||||
b.Property<int?>("managed_by");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
b.Property<string>("report_type")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("theDate");
|
||||
|
||||
b.Property<int?>("theRound");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<string>("migration_eva_result")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("migration_total_score");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<int?>("order_at_this_time");
|
||||
|
||||
b.Property<int?>("org_at_this_time");
|
||||
|
||||
b.Property<decimal?>("other_money_at_this_time");
|
||||
|
||||
b.Property<decimal?>("position_allowance_at_this_time");
|
||||
|
||||
b.Property<string>("position_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("total_promote");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("adjust_postponement_id");
|
||||
|
||||
b.HasIndex("adjust_postponement_quota_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<decimal?>("score1");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_create_evaluation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("Final_summary_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_reject_reason")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_chief")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_chief_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_self_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor1A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor1A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor2A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<int?>("supervisor1A");
|
||||
|
||||
b.Property<DateTime?>("supervisor1A_date");
|
||||
|
||||
b.Property<string>("supervisor1A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor2");
|
||||
|
||||
b.Property<int?>("supervisor2A");
|
||||
|
||||
b.Property<DateTime?>("supervisor2A_date");
|
||||
|
||||
b.Property<string>("supervisor2A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor2_date");
|
||||
|
||||
b.Property<string>("supervisor2_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_summary_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("thefile")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_achievement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("behavior")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_behavior");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("thegroup")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_evaluation_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.ToTable("eva_evaluation_group_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("indicators")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("mission_detail")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("mission_no");
|
||||
|
||||
b.Property<string>("target")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_operating_agreement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("develop")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("development_method")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_idp_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("frame_group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("level_id");
|
||||
|
||||
b.Property<decimal?>("monthly_remuneration");
|
||||
|
||||
b.Property<int?>("org_id");
|
||||
|
||||
b.Property<decimal?>("position_allowance");
|
||||
|
||||
b.Property<int?>("position_id");
|
||||
|
||||
b.Property<decimal?>("salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("frame_plan_guid");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_295");
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit_rounded");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_plan_guid");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("executed_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005");
|
||||
|
||||
b.Property<Guid?>("plan_guid");
|
||||
|
||||
b.Property<DateTime?>("salary_adjustment_date");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("plan_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_performance_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("list_no");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<string>("step")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_performance_plan_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_promoted_percentage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<int?>("position_level");
|
||||
|
||||
b.Property<int?>("position_type");
|
||||
|
||||
b.Property<decimal?>("temporary_min");
|
||||
|
||||
b.Property<decimal?>("themax");
|
||||
|
||||
b.Property<decimal?>("themin");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_salary_cylinder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_quota_id")
|
||||
.HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_frame_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_planEntity", "eva_limit_frame_plan_frame_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_plan_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("plan_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score")
|
||||
.WithMany()
|
||||
.HasForeignKey("level_score_id");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Migrations/25640302050315_FixMissingColumn.cs
Normal file
23
Migrations/25640302050315_FixMissingColumn.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class FixMissingColumn : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "salary_adjustment_date",
|
||||
table: "eva_limit_frame_plan",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "salary_adjustment_date",
|
||||
table: "eva_limit_frame_plan");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -585,6 +585,111 @@ namespace tb320eva.Migrations
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("frame_group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("level_id");
|
||||
|
||||
b.Property<decimal?>("monthly_remuneration");
|
||||
|
||||
b.Property<int?>("org_id");
|
||||
|
||||
b.Property<decimal?>("position_allowance");
|
||||
|
||||
b.Property<int?>("position_id");
|
||||
|
||||
b.Property<decimal?>("salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("frame_plan_guid");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_295");
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit_rounded");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_plan_guid");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("executed_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005");
|
||||
|
||||
b.Property<Guid?>("plan_guid");
|
||||
|
||||
b.Property<DateTime?>("salary_adjustment_date");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("plan_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
@@ -756,6 +861,31 @@ namespace tb320eva.Migrations
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_frame_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_planEntity", "eva_limit_frame_plan_frame_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_plan_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("plan_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
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 Ieva_limit_frame_employeeService : IBaseService2<Guid, eva_limit_frame_employeeInputModel, eva_limit_frame_employeeViewModel>
|
||||
{
|
||||
new eva_limit_frame_employeeViewModel Insert(eva_limit_frame_employeeInputModel model, bool is_force_save);
|
||||
new eva_limit_frame_employeeViewModel Update(Guid id, eva_limit_frame_employeeInputModel model, bool is_force_save);
|
||||
List<eva_limit_frame_employeeViewModel> GetListByemployee_id(int? employee_id);
|
||||
List<eva_limit_frame_employeeViewModel> GetListBySearch(eva_limit_frame_employeeSearchModel model);
|
||||
|
||||
string UpdateMultiple(List<eva_limit_frame_employeeInputModel> model, bool is_force_save);
|
||||
eva_limit_frame_employeeWithSelectionViewModel GetWithSelection(Guid id);
|
||||
eva_limit_frame_employeeWithSelectionViewModel GetBlankItem();
|
||||
|
||||
void RefreshAutoFieldOfAllData();
|
||||
eva_limit_frame_employeeEntity GetEntity(Guid id);
|
||||
DataContext GetContext();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
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;
|
||||
using System.IO;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_limit_frame_employeeEntity : BaseEntity2<Guid>
|
||||
{
|
||||
|
||||
|
||||
[ForeignKey("frame_group_guid")]
|
||||
public eva_limit_frame_groupEntity eva_limit_frame_group_frame_group_guid { get; set; }
|
||||
public Guid? frame_group_guid { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public int? position_id { get; set; }
|
||||
|
||||
public int? level_id { get; set; }
|
||||
|
||||
public decimal? salary { get; set; }
|
||||
|
||||
public decimal? position_allowance { get; set; }
|
||||
|
||||
public decimal? monthly_remuneration { get; set; }
|
||||
|
||||
|
||||
public void SetAutoField(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void DoAfterInsertUpdate(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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 eva_limit_frame_employeeInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public Guid? frame_group_guid { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public int? position_id { get; set; }
|
||||
|
||||
public int? level_id { get; set; }
|
||||
|
||||
public decimal? salary { get; set; }
|
||||
|
||||
public decimal? position_allowance { get; set; }
|
||||
|
||||
public decimal? monthly_remuneration { 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 eva_limit_frame_employeeReportRequestModel : eva_limit_frame_employeeSearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
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 eva_limit_frame_employeeSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public Guid? frame_group_guid { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,338 @@
|
||||
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 eva_limit_frame_employeeService : Ieva_limit_frame_employeeService
|
||||
{
|
||||
private IBaseRepository2<eva_limit_frame_employeeEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private Iexternal_employeeService emp;
|
||||
|
||||
public eva_limit_frame_employeeService(IBaseRepository2<eva_limit_frame_employeeEntity, Guid> repository, IMyDatabase mydb, Iexternal_linkageService inext,
|
||||
Iexternal_employeeService inemp)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
private eva_limit_frame_employeeEntity GetEntity(eva_limit_frame_employeeInputModel model)
|
||||
{
|
||||
return Mapper.Map<eva_limit_frame_employeeEntity>(model);
|
||||
}
|
||||
private List<eva_limit_frame_employeeEntity> GetEntityList(List<eva_limit_frame_employeeInputModel> models)
|
||||
{
|
||||
return Mapper.Map<List<eva_limit_frame_employeeEntity>>(models);
|
||||
}
|
||||
private eva_limit_frame_employeeViewModel GetDto(eva_limit_frame_employeeEntity entity)
|
||||
{
|
||||
return Mapper.Map<eva_limit_frame_employeeViewModel>(entity);
|
||||
}
|
||||
private List<eva_limit_frame_employeeViewModel> GetDtoList(List<eva_limit_frame_employeeEntity> entities)
|
||||
{
|
||||
return Mapper.Map<List<eva_limit_frame_employeeViewModel>>(entities);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
#region Query Functions
|
||||
|
||||
public eva_limit_frame_employeeViewModel Get(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return GetDto(entity);
|
||||
}
|
||||
|
||||
public eva_limit_frame_employeeEntity GetEntity(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
public DataContext GetContext()
|
||||
{
|
||||
return _repository.Context;
|
||||
}
|
||||
|
||||
public eva_limit_frame_employeeWithSelectionViewModel GetWithSelection(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_limit_frame_employeeWithSelectionViewModel>(entity);
|
||||
i.item_employee_id = (from x in emp.GetAllEmployee() select x).ToList();
|
||||
i.item_org_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
i.item_position_id = (from x in ext.GetPositionForReport() select x).ToList();
|
||||
i.item_level_id = (from x in ext.Gethrm_position_levels() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_limit_frame_employeeWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_limit_frame_employeeWithSelectionViewModel();
|
||||
i.item_employee_id = (from x in emp.GetAllEmployee() select x).ToList();
|
||||
i.item_org_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
i.item_position_id = (from x in ext.GetPositionForReport() select x).ToList();
|
||||
i.item_level_id = (from x in ext.Gethrm_position_levels() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public List<eva_limit_frame_employeeViewModel> GetListByemployee_id(int? employee_id)
|
||||
{
|
||||
var model = new eva_limit_frame_employeeSearchModel();
|
||||
model.employee_id = employee_id;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_limit_frame_employeeViewModel> GetListBySearch(eva_limit_frame_employeeSearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_limit_frame_employee in _repository.Context.eva_limit_frame_employee
|
||||
|
||||
join fk_eva_limit_frame_group1 in _repository.Context.eva_limit_frame_group on m_eva_limit_frame_employee.frame_group_guid equals fk_eva_limit_frame_group1.id
|
||||
into eva_limit_frame_groupResult1
|
||||
from fk_eva_limit_frame_groupResult1 in eva_limit_frame_groupResult1.DefaultIfEmpty()
|
||||
|
||||
join fk_external_linkage2 in emp.GetAllEmployee() on m_eva_limit_frame_employee.employee_id equals fk_external_linkage2.id
|
||||
into external_linkageResult2
|
||||
from fk_external_linkageResult2 in external_linkageResult2.DefaultIfEmpty()
|
||||
|
||||
join fk_external_linkage3 in ext.GetSortingDep() on m_eva_limit_frame_employee.org_id equals fk_external_linkage3.id
|
||||
into external_linkageResult3
|
||||
from fk_external_linkageResult3 in external_linkageResult3.DefaultIfEmpty()
|
||||
|
||||
join fk_external_linkage4 in ext.GetPositionForReport() on m_eva_limit_frame_employee.position_id equals fk_external_linkage4.id
|
||||
into external_linkageResult4
|
||||
from fk_external_linkageResult4 in external_linkageResult4.DefaultIfEmpty()
|
||||
|
||||
join fk_external_linkage5 in ext.Gethrm_position_levels() on m_eva_limit_frame_employee.level_id equals fk_external_linkage5.id
|
||||
into external_linkageResult5
|
||||
from fk_external_linkageResult5 in external_linkageResult5.DefaultIfEmpty()
|
||||
|
||||
|
||||
where
|
||||
1 == 1
|
||||
&& (!model.frame_group_guid.HasValue || m_eva_limit_frame_employee.frame_group_guid == model.frame_group_guid)
|
||||
&& (!model.employee_id.HasValue || m_eva_limit_frame_employee.employee_id == model.employee_id)
|
||||
|
||||
|
||||
orderby m_eva_limit_frame_employee.created descending
|
||||
select new eva_limit_frame_employeeViewModel()
|
||||
{
|
||||
id = m_eva_limit_frame_employee.id,
|
||||
frame_group_guid = m_eva_limit_frame_employee.frame_group_guid,
|
||||
employee_id = m_eva_limit_frame_employee.employee_id,
|
||||
org_id = m_eva_limit_frame_employee.org_id,
|
||||
position_id = m_eva_limit_frame_employee.position_id,
|
||||
level_id = m_eva_limit_frame_employee.level_id,
|
||||
salary = m_eva_limit_frame_employee.salary,
|
||||
position_allowance = m_eva_limit_frame_employee.position_allowance,
|
||||
monthly_remuneration = m_eva_limit_frame_employee.monthly_remuneration,
|
||||
|
||||
frame_group_guid_eva_limit_frame_group_group_guid = fk_eva_limit_frame_groupResult1.group_guid,
|
||||
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
|
||||
org_id_external_linkage_external_name = fk_external_linkageResult3.external_name,
|
||||
position_id_external_linkage_external_name = fk_external_linkageResult4.external_name,
|
||||
level_id_external_linkage_external_name = fk_external_linkageResult5.external_name,
|
||||
|
||||
isActive = m_eva_limit_frame_employee.isActive,
|
||||
Created = m_eva_limit_frame_employee.created,
|
||||
Updated = m_eva_limit_frame_employee.updated
|
||||
}
|
||||
).Take(1000).ToList();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Manipulation Functions
|
||||
|
||||
|
||||
|
||||
public eva_limit_frame_employeeViewModel Insert(eva_limit_frame_employeeInputModel model, bool is_force_save)
|
||||
{
|
||||
var entity = GetEntity(model);
|
||||
entity.id = Guid.NewGuid();
|
||||
|
||||
|
||||
entity.SetAutoField(_repository.Context);
|
||||
|
||||
if (is_force_save)
|
||||
{
|
||||
var inserted = _repository.Insert(entity);
|
||||
entity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Get(inserted.id);
|
||||
}
|
||||
else
|
||||
{
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
entity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Mapper.Map<eva_limit_frame_employeeViewModel>(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public eva_limit_frame_employeeViewModel Update(Guid id, eva_limit_frame_employeeInputModel model, bool is_force_save)
|
||||
{
|
||||
var existingEntity = _repository.Get(id);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.frame_group_guid = model.frame_group_guid;
|
||||
existingEntity.employee_id = model.employee_id;
|
||||
existingEntity.org_id = model.org_id;
|
||||
existingEntity.position_id = model.position_id;
|
||||
existingEntity.level_id = model.level_id;
|
||||
existingEntity.salary = model.salary;
|
||||
existingEntity.position_allowance = model.position_allowance;
|
||||
existingEntity.monthly_remuneration = model.monthly_remuneration;
|
||||
|
||||
existingEntity.SetAutoField(_repository.Context);
|
||||
|
||||
if (is_force_save)
|
||||
{
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
{
|
||||
_repository.UpdateWithoutCommit(id, existingEntity);
|
||||
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Mapper.Map<eva_limit_frame_employeeViewModel>(existingEntity);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_limit_frame_employeeInputModel> model, bool is_force_save)
|
||||
{
|
||||
foreach (var i in model)
|
||||
{
|
||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||
{
|
||||
var existingEntity = _repository.Get(i.id.Value);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.frame_group_guid = i.frame_group_guid;
|
||||
existingEntity.employee_id = i.employee_id;
|
||||
existingEntity.org_id = i.org_id;
|
||||
existingEntity.position_id = i.position_id;
|
||||
existingEntity.level_id = i.level_id;
|
||||
existingEntity.salary = i.salary;
|
||||
existingEntity.position_allowance = i.position_allowance;
|
||||
existingEntity.monthly_remuneration = i.monthly_remuneration;
|
||||
|
||||
existingEntity.SetAutoField(_repository.Context);
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
}
|
||||
else if (i.active_mode == "1" && !i.id.HasValue) // add
|
||||
{
|
||||
var entity = GetEntity(i);
|
||||
entity.id = Guid.NewGuid();
|
||||
entity.SetAutoField(_repository.Context);
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
}
|
||||
else if (i.active_mode == "0" && i.id.HasValue) // remove
|
||||
{
|
||||
_repository.DeleteWithoutCommit(i.id.Value);
|
||||
}
|
||||
else if (i.active_mode == "0" && !i.id.HasValue)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
if (is_force_save)
|
||||
{
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
public eva_limit_frame_employeeViewModel SetAsActive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public eva_limit_frame_employeeViewModel SetAsInactive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsInActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public void Delete(Guid id)
|
||||
{
|
||||
_repository.Delete(id);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void RefreshAutoFieldOfAllData()
|
||||
{
|
||||
var all_items = from i in _repository.Context.eva_limit_frame_employee
|
||||
select i;
|
||||
foreach (var item in all_items)
|
||||
{
|
||||
item.SetAutoField(_repository.Context);
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
|
||||
private Dictionary<string, string> GetLookupForLog()
|
||||
{
|
||||
var i = new Dictionary<string, string>();
|
||||
|
||||
|
||||
i.Add("frame_group_guid", "frame_plan_guid");
|
||||
i.Add("frame_group_guid_eva_limit_frame_group_group_guid", "frame_plan_guid");
|
||||
i.Add("employee_id", "พนักงาน");
|
||||
i.Add("employee_id_external_linkage_external_name", "พนักงาน");
|
||||
i.Add("org_id", "หน่วยงาน");
|
||||
i.Add("org_id_external_linkage_external_name", "หน่วยงาน");
|
||||
i.Add("position_id", "ตำแหน่ง");
|
||||
i.Add("position_id_external_linkage_external_name", "ตำแหน่ง");
|
||||
i.Add("level_id", "ระดับ");
|
||||
i.Add("level_id_external_linkage_external_name", "ระดับ");
|
||||
i.Add("salary", "เงินเดือน");
|
||||
i.Add("position_allowance", "เงินประจำตำแหน่ง");
|
||||
i.Add("monthly_remuneration", "ค่าตอบแทนรายเดือน");
|
||||
i.Add("limit_frame_group_id", "limit_frame_group_id");
|
||||
i.Add("limit_frame_group_id_eva_limit_frame_group_group_guid", "limit_frame_group_id");
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Match Item
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
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 eva_limit_frame_employeeViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public Guid? frame_group_guid { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public int? position_id { get; set; }
|
||||
|
||||
public int? level_id { get; set; }
|
||||
|
||||
public decimal? salary { get; set; }
|
||||
|
||||
public decimal? position_allowance { get; set; }
|
||||
|
||||
public decimal? monthly_remuneration { get; set; }
|
||||
|
||||
public Guid? frame_group_guid_eva_limit_frame_group_group_guid { get; set; }
|
||||
public string employee_id_external_linkage_external_name { get; set; }
|
||||
public string org_id_external_linkage_external_name { get; set; }
|
||||
public string position_id_external_linkage_external_name { get; set; }
|
||||
public string level_id_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_limit_frame_employeeWithSelectionViewModel: eva_limit_frame_employeeViewModel
|
||||
{
|
||||
public List<external_employeeViewModel> item_employee_id { get; set; }
|
||||
public List<external_linkageViewModel> item_org_id { get; set; }
|
||||
public List<external_linkageViewModel> item_position_id { get; set; }
|
||||
public List<external_linkageViewModel> item_level_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
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 Ieva_limit_frame_groupService : IBaseService2<Guid, eva_limit_frame_groupInputModel, eva_limit_frame_groupViewModel>
|
||||
{
|
||||
new eva_limit_frame_groupViewModel Insert(eva_limit_frame_groupInputModel model, bool is_force_save);
|
||||
new eva_limit_frame_groupViewModel Update(Guid id, eva_limit_frame_groupInputModel model, bool is_force_save);
|
||||
List<eva_limit_frame_groupViewModel> GetListBygroup_guid(Guid? group_guid);
|
||||
List<eva_limit_frame_groupViewModel> GetListBySearch(eva_limit_frame_groupSearchModel model);
|
||||
|
||||
string UpdateMultiple(List<eva_limit_frame_groupInputModel> model, bool is_force_save);
|
||||
eva_limit_frame_groupWithSelectionViewModel GetWithSelection(Guid id);
|
||||
eva_limit_frame_groupWithSelectionViewModel GetBlankItem();
|
||||
|
||||
void RefreshAutoFieldOfAllData();
|
||||
eva_limit_frame_groupEntity GetEntity(Guid id);
|
||||
DataContext GetContext();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
47
Models/eva_limit_frame_group/eva_limit_frame_groupEntity.cs
Normal file
47
Models/eva_limit_frame_group/eva_limit_frame_groupEntity.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
using System.IO;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_limit_frame_groupEntity : BaseEntity2<Guid>
|
||||
{
|
||||
|
||||
|
||||
[ForeignKey("frame_plan_guid")]
|
||||
public eva_limit_frame_planEntity eva_limit_frame_plan_frame_plan_guid { get; set; }
|
||||
public Guid? frame_plan_guid { get; set; }
|
||||
|
||||
[ForeignKey("group_guid")]
|
||||
public eva_evaluation_groupEntity eva_evaluation_group_group_guid { get; set; }
|
||||
public Guid? group_guid { get; set; }
|
||||
|
||||
public decimal? limit_frame_295 { get; set; }
|
||||
|
||||
public decimal? total_salary { get; set; }
|
||||
|
||||
public decimal? total_salary_limit { get; set; }
|
||||
|
||||
public decimal? total_salary_limit_rounded { get; set; }
|
||||
|
||||
|
||||
public void SetAutoField(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void DoAfterInsertUpdate(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
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 eva_limit_frame_groupInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public Guid? frame_plan_guid { get; set; }
|
||||
|
||||
public Guid? group_guid { get; set; }
|
||||
|
||||
public decimal? limit_frame_295 { get; set; }
|
||||
|
||||
public decimal? total_salary { get; set; }
|
||||
|
||||
public decimal? total_salary_limit { get; set; }
|
||||
|
||||
public decimal? total_salary_limit_rounded { 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 eva_limit_frame_groupReportRequestModel : eva_limit_frame_groupSearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
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 eva_limit_frame_groupSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public Guid? frame_plan_guid { get; set; }
|
||||
|
||||
public Guid? group_guid { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
301
Models/eva_limit_frame_group/eva_limit_frame_groupService.cs
Normal file
301
Models/eva_limit_frame_group/eva_limit_frame_groupService.cs
Normal file
@@ -0,0 +1,301 @@
|
||||
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 eva_limit_frame_groupService : Ieva_limit_frame_groupService
|
||||
{
|
||||
private IBaseRepository2<eva_limit_frame_groupEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_limit_frame_groupService(IBaseRepository2<eva_limit_frame_groupEntity, Guid> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
private eva_limit_frame_groupEntity GetEntity(eva_limit_frame_groupInputModel model)
|
||||
{
|
||||
return Mapper.Map<eva_limit_frame_groupEntity>(model);
|
||||
}
|
||||
private List<eva_limit_frame_groupEntity> GetEntityList(List<eva_limit_frame_groupInputModel> models)
|
||||
{
|
||||
return Mapper.Map<List<eva_limit_frame_groupEntity>>(models);
|
||||
}
|
||||
private eva_limit_frame_groupViewModel GetDto(eva_limit_frame_groupEntity entity)
|
||||
{
|
||||
return Mapper.Map<eva_limit_frame_groupViewModel>(entity);
|
||||
}
|
||||
private List<eva_limit_frame_groupViewModel> GetDtoList(List<eva_limit_frame_groupEntity> entities)
|
||||
{
|
||||
return Mapper.Map<List<eva_limit_frame_groupViewModel>>(entities);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
#region Query Functions
|
||||
|
||||
public eva_limit_frame_groupViewModel Get(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return GetDto(entity);
|
||||
}
|
||||
|
||||
public eva_limit_frame_groupEntity GetEntity(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
public DataContext GetContext()
|
||||
{
|
||||
return _repository.Context;
|
||||
}
|
||||
|
||||
public eva_limit_frame_groupWithSelectionViewModel GetWithSelection(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_limit_frame_groupWithSelectionViewModel>(entity);
|
||||
i.item_group_guid = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_limit_frame_groupWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_limit_frame_groupWithSelectionViewModel();
|
||||
i.item_group_guid = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public List<eva_limit_frame_groupViewModel> GetListBygroup_guid(Guid? group_guid)
|
||||
{
|
||||
var model = new eva_limit_frame_groupSearchModel();
|
||||
model.group_guid = group_guid;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_limit_frame_groupViewModel> GetListBySearch(eva_limit_frame_groupSearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_limit_frame_group in _repository.Context.eva_limit_frame_group
|
||||
|
||||
join fk_eva_limit_frame_plan1 in _repository.Context.eva_limit_frame_plan on m_eva_limit_frame_group.frame_plan_guid equals fk_eva_limit_frame_plan1.id
|
||||
into eva_limit_frame_planResult1
|
||||
from fk_eva_limit_frame_planResult1 in eva_limit_frame_planResult1.DefaultIfEmpty()
|
||||
|
||||
join fk_eva_evaluation_group2 in _repository.Context.eva_evaluation_group on m_eva_limit_frame_group.group_guid equals fk_eva_evaluation_group2.id
|
||||
into eva_evaluation_groupResult2
|
||||
from fk_eva_evaluation_groupResult2 in eva_evaluation_groupResult2.DefaultIfEmpty()
|
||||
|
||||
|
||||
where
|
||||
1 == 1
|
||||
&& (!model.frame_plan_guid.HasValue || m_eva_limit_frame_group.frame_plan_guid == model.frame_plan_guid)
|
||||
&& (!model.group_guid.HasValue || m_eva_limit_frame_group.group_guid == model.group_guid)
|
||||
|
||||
|
||||
orderby m_eva_limit_frame_group.created descending
|
||||
select new eva_limit_frame_groupViewModel()
|
||||
{
|
||||
id = m_eva_limit_frame_group.id,
|
||||
frame_plan_guid = m_eva_limit_frame_group.frame_plan_guid,
|
||||
group_guid = m_eva_limit_frame_group.group_guid,
|
||||
limit_frame_295 = m_eva_limit_frame_group.limit_frame_295,
|
||||
total_salary = m_eva_limit_frame_group.total_salary,
|
||||
total_salary_limit = m_eva_limit_frame_group.total_salary_limit,
|
||||
total_salary_limit_rounded = m_eva_limit_frame_group.total_salary_limit_rounded,
|
||||
|
||||
frame_plan_guid_eva_limit_frame_plan_executed_date = fk_eva_limit_frame_planResult1.executed_date,
|
||||
group_guid_eva_evaluation_group_code = fk_eva_evaluation_groupResult2.code,
|
||||
|
||||
isActive = m_eva_limit_frame_group.isActive,
|
||||
Created = m_eva_limit_frame_group.created,
|
||||
Updated = m_eva_limit_frame_group.updated
|
||||
}
|
||||
).Take(1000).ToList();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Manipulation Functions
|
||||
|
||||
|
||||
|
||||
public eva_limit_frame_groupViewModel Insert(eva_limit_frame_groupInputModel model, bool is_force_save)
|
||||
{
|
||||
var entity = GetEntity(model);
|
||||
entity.id = Guid.NewGuid();
|
||||
|
||||
|
||||
entity.SetAutoField(_repository.Context);
|
||||
|
||||
if (is_force_save)
|
||||
{
|
||||
var inserted = _repository.Insert(entity);
|
||||
entity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Get(inserted.id);
|
||||
}
|
||||
else
|
||||
{
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
entity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Mapper.Map<eva_limit_frame_groupViewModel>(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public eva_limit_frame_groupViewModel Update(Guid id, eva_limit_frame_groupInputModel model, bool is_force_save)
|
||||
{
|
||||
var existingEntity = _repository.Get(id);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.frame_plan_guid = model.frame_plan_guid;
|
||||
existingEntity.group_guid = model.group_guid;
|
||||
existingEntity.limit_frame_295 = model.limit_frame_295;
|
||||
existingEntity.total_salary = model.total_salary;
|
||||
existingEntity.total_salary_limit = model.total_salary_limit;
|
||||
existingEntity.total_salary_limit_rounded = model.total_salary_limit_rounded;
|
||||
|
||||
existingEntity.SetAutoField(_repository.Context);
|
||||
|
||||
if (is_force_save)
|
||||
{
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
{
|
||||
_repository.UpdateWithoutCommit(id, existingEntity);
|
||||
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Mapper.Map<eva_limit_frame_groupViewModel>(existingEntity);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_limit_frame_groupInputModel> model, bool is_force_save)
|
||||
{
|
||||
foreach(var i in model)
|
||||
{
|
||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||
{
|
||||
var existingEntity = _repository.Get(i.id.Value);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.frame_plan_guid = i.frame_plan_guid;
|
||||
existingEntity.group_guid = i.group_guid;
|
||||
existingEntity.limit_frame_295 = i.limit_frame_295;
|
||||
existingEntity.total_salary = i.total_salary;
|
||||
existingEntity.total_salary_limit = i.total_salary_limit;
|
||||
existingEntity.total_salary_limit_rounded = i.total_salary_limit_rounded;
|
||||
|
||||
existingEntity.SetAutoField(_repository.Context);
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
}
|
||||
else if (i.active_mode == "1" && !i.id.HasValue) // add
|
||||
{
|
||||
var entity = GetEntity(i);
|
||||
entity.id = Guid.NewGuid();
|
||||
entity.SetAutoField(_repository.Context);
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
}
|
||||
else if (i.active_mode == "0" && i.id.HasValue) // remove
|
||||
{
|
||||
_repository.DeleteWithoutCommit(i.id.Value);
|
||||
}
|
||||
else if (i.active_mode == "0" && !i.id.HasValue)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
if (is_force_save)
|
||||
{
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
public eva_limit_frame_groupViewModel SetAsActive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public eva_limit_frame_groupViewModel SetAsInactive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsInActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public void Delete(Guid id)
|
||||
{
|
||||
_repository.Delete(id);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void RefreshAutoFieldOfAllData()
|
||||
{
|
||||
var all_items = from i in _repository.Context.eva_limit_frame_group
|
||||
select i;
|
||||
foreach (var item in all_items)
|
||||
{
|
||||
item.SetAutoField(_repository.Context);
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
|
||||
private Dictionary<string,string> GetLookupForLog()
|
||||
{
|
||||
var i = new Dictionary<string, string>();
|
||||
|
||||
|
||||
i.Add("frame_plan_guid", "frame_plan_guid");
|
||||
i.Add("frame_plan_guid_eva_limit_frame_plan_executed_date", "frame_plan_guid");
|
||||
i.Add("group_guid", "กลุ่มการประเมิน");
|
||||
i.Add("group_guid_eva_evaluation_group_code", "กลุ่มการประเมิน");
|
||||
i.Add("limit_frame_295", "กรอบวงเงินที่กันไว้");
|
||||
i.Add("total_salary", "อัตราเงินเดือนรวม");
|
||||
i.Add("total_salary_limit", "วงเงินในการเลื่อนเงินเดือน");
|
||||
i.Add("total_salary_limit_rounded", "วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง");
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Match Item
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
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 eva_limit_frame_groupViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public Guid? frame_plan_guid { get; set; }
|
||||
|
||||
public Guid? group_guid { get; set; }
|
||||
|
||||
public decimal? limit_frame_295 { get; set; }
|
||||
|
||||
public decimal? total_salary { get; set; }
|
||||
|
||||
public decimal? total_salary_limit { get; set; }
|
||||
|
||||
public decimal? total_salary_limit_rounded { get; set; }
|
||||
|
||||
public DateTime? frame_plan_guid_eva_limit_frame_plan_executed_date { get; set; }
|
||||
public string group_guid_eva_evaluation_group_code { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_limit_frame_groupWithSelectionViewModel: eva_limit_frame_groupViewModel
|
||||
{
|
||||
public List<eva_evaluation_groupEntity> item_group_guid { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
32
Models/eva_limit_frame_plan/Ieva_limit_frame_planService.cs
Normal file
32
Models/eva_limit_frame_plan/Ieva_limit_frame_planService.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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 Ieva_limit_frame_planService : IBaseService2<Guid, eva_limit_frame_planInputModel, eva_limit_frame_planViewModel>
|
||||
{
|
||||
new eva_limit_frame_planViewModel Insert(eva_limit_frame_planInputModel model, bool is_force_save);
|
||||
new eva_limit_frame_planViewModel Update(Guid id, eva_limit_frame_planInputModel model, bool is_force_save);
|
||||
List<eva_limit_frame_planViewModel> GetListByexecuted_date(DateTime? executed_date);
|
||||
List<eva_limit_frame_planViewModel> GetListBySearch(eva_limit_frame_planSearchModel model);
|
||||
|
||||
string UpdateMultiple(List<eva_limit_frame_planInputModel> model, bool is_force_save);
|
||||
eva_limit_frame_planWithSelectionViewModel GetWithSelection(Guid id);
|
||||
eva_limit_frame_planWithSelectionViewModel GetBlankItem();
|
||||
|
||||
void RefreshAutoFieldOfAllData();
|
||||
eva_limit_frame_planEntity GetEntity(Guid id);
|
||||
DataContext GetContext();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
57
Models/eva_limit_frame_plan/eva_limit_frame_planEntity.cs
Normal file
57
Models/eva_limit_frame_plan/eva_limit_frame_planEntity.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
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;
|
||||
using System.IO;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_limit_frame_planEntity : BaseEntity2<Guid>
|
||||
{
|
||||
|
||||
|
||||
[ForeignKey("plan_guid")]
|
||||
public eva_performance_planEntity eva_performance_plan_plan_guid { get; set; }
|
||||
public Guid? plan_guid { get; set; }
|
||||
|
||||
public DateTime? executed_date { get; set; }
|
||||
|
||||
public decimal? limit_frame_005 { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_self { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_chief { get; set; }
|
||||
|
||||
public int? supervisor1 { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string supervisor1_result { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string supervisor1_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor1_date { get; set; }
|
||||
|
||||
public DateTime? salary_adjustment_date { get; set; }
|
||||
|
||||
|
||||
public void SetAutoField(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void DoAfterInsertUpdate(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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 eva_limit_frame_planInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public Guid? plan_guid { get; set; }
|
||||
|
||||
public DateTime? executed_date { get; set; }
|
||||
|
||||
public decimal? limit_frame_005 { get; set; }
|
||||
|
||||
public string status_self { get; set; }
|
||||
|
||||
public string status_chief { get; set; }
|
||||
|
||||
public int? supervisor1 { get; set; }
|
||||
|
||||
public string supervisor1_result { get; set; }
|
||||
|
||||
public string supervisor1_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor1_date { get; set; }
|
||||
|
||||
public DateTime? salary_adjustment_date { 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 eva_limit_frame_planReportRequestModel : eva_limit_frame_planSearchModel
|
||||
{
|
||||
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 eva_limit_frame_planSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public DateTime? executed_date { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
320
Models/eva_limit_frame_plan/eva_limit_frame_planService.cs
Normal file
320
Models/eva_limit_frame_plan/eva_limit_frame_planService.cs
Normal file
@@ -0,0 +1,320 @@
|
||||
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 eva_limit_frame_planService : Ieva_limit_frame_planService
|
||||
{
|
||||
private IBaseRepository2<eva_limit_frame_planEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_limit_frame_planService(IBaseRepository2<eva_limit_frame_planEntity, Guid> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
private eva_limit_frame_planEntity GetEntity(eva_limit_frame_planInputModel model)
|
||||
{
|
||||
return Mapper.Map<eva_limit_frame_planEntity>(model);
|
||||
}
|
||||
private List<eva_limit_frame_planEntity> GetEntityList(List<eva_limit_frame_planInputModel> models)
|
||||
{
|
||||
return Mapper.Map<List<eva_limit_frame_planEntity>>(models);
|
||||
}
|
||||
private eva_limit_frame_planViewModel GetDto(eva_limit_frame_planEntity entity)
|
||||
{
|
||||
return Mapper.Map<eva_limit_frame_planViewModel>(entity);
|
||||
}
|
||||
private List<eva_limit_frame_planViewModel> GetDtoList(List<eva_limit_frame_planEntity> entities)
|
||||
{
|
||||
return Mapper.Map<List<eva_limit_frame_planViewModel>>(entities);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
#region Query Functions
|
||||
|
||||
public eva_limit_frame_planViewModel Get(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return GetDto(entity);
|
||||
}
|
||||
|
||||
public eva_limit_frame_planEntity GetEntity(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
public DataContext GetContext()
|
||||
{
|
||||
return _repository.Context;
|
||||
}
|
||||
|
||||
public eva_limit_frame_planWithSelectionViewModel GetWithSelection(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_limit_frame_planWithSelectionViewModel>(entity);
|
||||
i.item_plan_guid = (from x in _repository.Context.eva_performance_plan select x).ToList();
|
||||
//i.item_supervisor1_result = (from x in ext.GetDemoItem() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_limit_frame_planWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_limit_frame_planWithSelectionViewModel();
|
||||
i.item_plan_guid = (from x in _repository.Context.eva_performance_plan select x).ToList();
|
||||
//i.item_supervisor1_result = (from x in ext.GetDemoItem() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public List<eva_limit_frame_planViewModel> GetListByexecuted_date(DateTime? executed_date)
|
||||
{
|
||||
var model = new eva_limit_frame_planSearchModel();
|
||||
model.executed_date = executed_date;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_limit_frame_planViewModel> GetListBySearch(eva_limit_frame_planSearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_limit_frame_plan in _repository.Context.eva_limit_frame_plan
|
||||
|
||||
join fk_eva_performance_plan1 in _repository.Context.eva_performance_plan on m_eva_limit_frame_plan.plan_guid equals fk_eva_performance_plan1.id
|
||||
into eva_performance_planResult1
|
||||
from fk_eva_performance_planResult1 in eva_performance_planResult1.DefaultIfEmpty()
|
||||
|
||||
//join fk_external_linkage7 in ext.GetDemoItem() on m_eva_limit_frame_plan.supervisor1_result equals fk_external_linkage7.external_code
|
||||
//into external_linkageResult7
|
||||
//from fk_external_linkageResult7 in external_linkageResult7.DefaultIfEmpty()
|
||||
|
||||
|
||||
where
|
||||
1 == 1
|
||||
&& (!model.executed_date.HasValue || m_eva_limit_frame_plan.executed_date == model.executed_date)
|
||||
|
||||
|
||||
orderby m_eva_limit_frame_plan.created descending
|
||||
select new eva_limit_frame_planViewModel()
|
||||
{
|
||||
id = m_eva_limit_frame_plan.id,
|
||||
plan_guid = m_eva_limit_frame_plan.plan_guid,
|
||||
executed_date = m_eva_limit_frame_plan.executed_date,
|
||||
limit_frame_005 = m_eva_limit_frame_plan.limit_frame_005,
|
||||
status_self = m_eva_limit_frame_plan.status_self,
|
||||
status_chief = m_eva_limit_frame_plan.status_chief,
|
||||
supervisor1 = m_eva_limit_frame_plan.supervisor1,
|
||||
supervisor1_result = m_eva_limit_frame_plan.supervisor1_result,
|
||||
supervisor1_remark = m_eva_limit_frame_plan.supervisor1_remark,
|
||||
supervisor1_date = m_eva_limit_frame_plan.supervisor1_date,
|
||||
salary_adjustment_date = m_eva_limit_frame_plan.salary_adjustment_date,
|
||||
|
||||
plan_guid_eva_performance_plan_fiscal_year = fk_eva_performance_planResult1.fiscal_year,
|
||||
//supervisor1_result_external_linkage_external_name = fk_external_linkageResult7.external_name,
|
||||
|
||||
isActive = m_eva_limit_frame_plan.isActive,
|
||||
Created = m_eva_limit_frame_plan.created,
|
||||
Updated = m_eva_limit_frame_plan.updated
|
||||
}
|
||||
).Take(1000).ToList();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Manipulation Functions
|
||||
|
||||
|
||||
|
||||
public eva_limit_frame_planViewModel Insert(eva_limit_frame_planInputModel model, bool is_force_save)
|
||||
{
|
||||
var entity = GetEntity(model);
|
||||
entity.id = Guid.NewGuid();
|
||||
|
||||
|
||||
entity.SetAutoField(_repository.Context);
|
||||
|
||||
if (is_force_save)
|
||||
{
|
||||
var inserted = _repository.Insert(entity);
|
||||
entity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Get(inserted.id);
|
||||
}
|
||||
else
|
||||
{
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
entity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Mapper.Map<eva_limit_frame_planViewModel>(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public eva_limit_frame_planViewModel Update(Guid id, eva_limit_frame_planInputModel model, bool is_force_save)
|
||||
{
|
||||
var existingEntity = _repository.Get(id);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.plan_guid = model.plan_guid;
|
||||
existingEntity.executed_date = model.executed_date;
|
||||
existingEntity.limit_frame_005 = model.limit_frame_005;
|
||||
existingEntity.status_self = model.status_self;
|
||||
existingEntity.status_chief = model.status_chief;
|
||||
existingEntity.supervisor1 = model.supervisor1;
|
||||
existingEntity.supervisor1_result = model.supervisor1_result;
|
||||
existingEntity.supervisor1_remark = model.supervisor1_remark;
|
||||
existingEntity.supervisor1_date = model.supervisor1_date;
|
||||
existingEntity.salary_adjustment_date = model.salary_adjustment_date;
|
||||
|
||||
existingEntity.SetAutoField(_repository.Context);
|
||||
|
||||
if (is_force_save)
|
||||
{
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
{
|
||||
_repository.UpdateWithoutCommit(id, existingEntity);
|
||||
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||
return Mapper.Map<eva_limit_frame_planViewModel>(existingEntity);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_limit_frame_planInputModel> model, bool is_force_save)
|
||||
{
|
||||
foreach(var i in model)
|
||||
{
|
||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||
{
|
||||
var existingEntity = _repository.Get(i.id.Value);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.plan_guid = i.plan_guid;
|
||||
existingEntity.executed_date = i.executed_date;
|
||||
existingEntity.limit_frame_005 = i.limit_frame_005;
|
||||
existingEntity.status_self = i.status_self;
|
||||
existingEntity.status_chief = i.status_chief;
|
||||
existingEntity.supervisor1 = i.supervisor1;
|
||||
existingEntity.supervisor1_result = i.supervisor1_result;
|
||||
existingEntity.supervisor1_remark = i.supervisor1_remark;
|
||||
existingEntity.supervisor1_date = i.supervisor1_date;
|
||||
existingEntity.salary_adjustment_date = i.salary_adjustment_date;
|
||||
|
||||
existingEntity.SetAutoField(_repository.Context);
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
}
|
||||
else if (i.active_mode == "1" && !i.id.HasValue) // add
|
||||
{
|
||||
var entity = GetEntity(i);
|
||||
entity.id = Guid.NewGuid();
|
||||
entity.SetAutoField(_repository.Context);
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
}
|
||||
else if (i.active_mode == "0" && i.id.HasValue) // remove
|
||||
{
|
||||
_repository.DeleteWithoutCommit(i.id.Value);
|
||||
}
|
||||
else if (i.active_mode == "0" && !i.id.HasValue)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
if (is_force_save)
|
||||
{
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
public eva_limit_frame_planViewModel SetAsActive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public eva_limit_frame_planViewModel SetAsInactive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsInActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public void Delete(Guid id)
|
||||
{
|
||||
_repository.Delete(id);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void RefreshAutoFieldOfAllData()
|
||||
{
|
||||
var all_items = from i in _repository.Context.eva_limit_frame_plan
|
||||
select i;
|
||||
foreach (var item in all_items)
|
||||
{
|
||||
item.SetAutoField(_repository.Context);
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
|
||||
private Dictionary<string,string> GetLookupForLog()
|
||||
{
|
||||
var i = new Dictionary<string, string>();
|
||||
|
||||
|
||||
i.Add("plan_guid", "แผนการประเมิน");
|
||||
i.Add("plan_guid_eva_performance_plan_fiscal_year", "แผนการประเมิน");
|
||||
i.Add("executed_date", "วันที่ตั้งกรอบวงเงิน");
|
||||
i.Add("txt_executed_date", "วันที่ตั้งกรอบวงเงิน");
|
||||
i.Add("limit_frame_005", "กรอบวงเงินที่กันไว้");
|
||||
i.Add("status_self", "สถานะการส่ง กรอบวงเงิน");
|
||||
i.Add("status_chief", "สถานะการตรวจ กรอบวงเงิน");
|
||||
i.Add("supervisor1", "ผู้ตรวจกรอบวงเงิน");
|
||||
i.Add("supervisor1_result", "ผลการตรวจ");
|
||||
i.Add("supervisor1_result_external_linkage_external_name", "ผลการตรวจ");
|
||||
i.Add("supervisor1_remark", "ความเห็นผู้ประเมิน");
|
||||
i.Add("supervisor1_date", "วันที่ประเมิน");
|
||||
i.Add("txt_supervisor1_date", "วันที่ประเมิน");
|
||||
i.Add("txt_salary_adjustment_date", "เลื่อนเงินเดือนวันที่");
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Match Item
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
47
Models/eva_limit_frame_plan/eva_limit_frame_planViewModel.cs
Normal file
47
Models/eva_limit_frame_plan/eva_limit_frame_planViewModel.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
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 eva_limit_frame_planViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public Guid? plan_guid { get; set; }
|
||||
|
||||
public DateTime? executed_date { get; set; }
|
||||
|
||||
public string txt_executed_date { get { return MyHelper.GetDateStringForReport(this.executed_date); } }
|
||||
|
||||
public decimal? limit_frame_005 { get; set; }
|
||||
|
||||
public string status_self { get; set; }
|
||||
|
||||
public string status_chief { get; set; }
|
||||
|
||||
public int? supervisor1 { get; set; }
|
||||
|
||||
public string supervisor1_result { get; set; }
|
||||
|
||||
public string supervisor1_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor1_date { get; set; }
|
||||
|
||||
public string txt_supervisor1_date { get { return MyHelper.GetDateStringForReport(this.supervisor1_date); } }
|
||||
|
||||
public DateTime? salary_adjustment_date { get; set; }
|
||||
|
||||
public string txt_salary_adjustment_date { get { return MyHelper.GetDateStringForReport(this.salary_adjustment_date); } }
|
||||
|
||||
public int? plan_guid_eva_performance_plan_fiscal_year { get; set; }
|
||||
public string supervisor1_result_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_limit_frame_planWithSelectionViewModel: eva_limit_frame_planViewModel
|
||||
{
|
||||
public List<eva_performance_planEntity> item_plan_guid { get; set; }
|
||||
public List<external_linkageViewModel> item_supervisor1_result { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
21
Startup.cs
21
Startup.cs
@@ -312,6 +312,15 @@ namespace Test01
|
||||
|
||||
services.AddScoped<Ieva_create_evaluation_detail_review0AService, eva_create_evaluation_detail_review0AService>();
|
||||
|
||||
services.AddScoped<IBaseRepository2<eva_limit_frame_employeeEntity, Guid>, BaseRepository2<eva_limit_frame_employeeEntity, Guid>>();
|
||||
services.AddScoped<Ieva_limit_frame_employeeService, eva_limit_frame_employeeService>();
|
||||
|
||||
services.AddScoped<IBaseRepository2<eva_limit_frame_groupEntity, Guid>, BaseRepository2<eva_limit_frame_groupEntity, Guid>>();
|
||||
services.AddScoped<Ieva_limit_frame_groupService, eva_limit_frame_groupService>();
|
||||
|
||||
services.AddScoped<IBaseRepository2<eva_limit_frame_planEntity, Guid>, BaseRepository2<eva_limit_frame_planEntity, Guid>>();
|
||||
services.AddScoped<Ieva_limit_frame_planService, eva_limit_frame_planService>();
|
||||
|
||||
#endregion
|
||||
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
@@ -571,6 +580,18 @@ namespace Test01
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review0AViewModel>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review0AWithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<eva_limit_frame_employeeInputModel, eva_limit_frame_employeeEntity>();
|
||||
cfg.CreateMap<eva_limit_frame_employeeEntity, eva_limit_frame_employeeViewModel>();
|
||||
cfg.CreateMap<eva_limit_frame_employeeEntity, eva_limit_frame_employeeWithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<eva_limit_frame_groupInputModel, eva_limit_frame_groupEntity>();
|
||||
cfg.CreateMap<eva_limit_frame_groupEntity, eva_limit_frame_groupViewModel>();
|
||||
cfg.CreateMap<eva_limit_frame_groupEntity, eva_limit_frame_groupWithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<eva_limit_frame_planInputModel, eva_limit_frame_planEntity>();
|
||||
cfg.CreateMap<eva_limit_frame_planEntity, eva_limit_frame_planViewModel>();
|
||||
cfg.CreateMap<eva_limit_frame_planEntity, eva_limit_frame_planWithSelectionViewModel>();
|
||||
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
66
ViewControllers/eva_limit_frame_employeeViewControllers.cs
Normal file
66
ViewControllers/eva_limit_frame_employeeViewControllers.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 eva_limit_frame_employeeViewController : Controller
|
||||
{
|
||||
private ILogger<eva_limit_frame_employeeController> _logger;
|
||||
private Ieva_limit_frame_employeeService _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 eva_limit_frame_employeeViewController(ILogger<eva_limit_frame_employeeController> logger, Ieva_limit_frame_employeeService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IActionResult eva_limit_frame_employee()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult eva_limit_frame_employee_d()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
//public IActionResult eva_limit_frame_employee_report()
|
||||
//{
|
||||
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
//}
|
||||
|
||||
//public IActionResult eva_limit_frame_employee_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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
66
ViewControllers/eva_limit_frame_groupViewControllers.cs
Normal file
66
ViewControllers/eva_limit_frame_groupViewControllers.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 eva_limit_frame_groupViewController : Controller
|
||||
{
|
||||
private ILogger<eva_limit_frame_groupController> _logger;
|
||||
private Ieva_limit_frame_groupService _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 eva_limit_frame_groupViewController(ILogger<eva_limit_frame_groupController> logger, Ieva_limit_frame_groupService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IActionResult eva_limit_frame_group()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult eva_limit_frame_group_d()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
//public IActionResult eva_limit_frame_group_report()
|
||||
//{
|
||||
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
//}
|
||||
|
||||
//public IActionResult eva_limit_frame_group_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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
66
ViewControllers/eva_limit_frame_planViewControllers.cs
Normal file
66
ViewControllers/eva_limit_frame_planViewControllers.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 eva_limit_frame_planViewController : Controller
|
||||
{
|
||||
private ILogger<eva_limit_frame_planController> _logger;
|
||||
private Ieva_limit_frame_planService _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 eva_limit_frame_planViewController(ILogger<eva_limit_frame_planController> logger, Ieva_limit_frame_planService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IActionResult eva_limit_frame_plan()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult eva_limit_frame_plan_d()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
//public IActionResult eva_limit_frame_plan_report()
|
||||
//{
|
||||
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
//}
|
||||
|
||||
//public IActionResult eva_limit_frame_plan_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,146 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_employee";
|
||||
}
|
||||
|
||||
<div class="modal fade" id="eva_limit_frame_employeeModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_limit_frame_employeeModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="eva_limit_frame_employeeModelLabel">บันทึกข้อมูล eva_limit_frame_employee</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_employee_id" for="eva_limit_frame_employee_employee_id">พนักงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_org_id" for="eva_limit_frame_employee_org_id">หน่วยงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_id" for="eva_limit_frame_employee_position_id">ตำแหน่ง</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_position_id" iLabel="ตำแหน่ง" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_level_id" for="eva_limit_frame_employee_level_id">ระดับ</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_level_id" iLabel="ระดับ" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_salary" for="eva_limit_frame_employee_salary">เงินเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_salary" iLabel="เงินเดือน" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_allowance" for="eva_limit_frame_employee_position_allowance">เงินประจำตำแหน่ง</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance" iLabel="เงินประจำตำแหน่ง" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_monthly_remuneration" for="eva_limit_frame_employee_monthly_remuneration">ค่าตอบแทนรายเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration" iLabel="ค่าตอบแทนรายเดือน" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-primary" onclick="javascript:eva_limit_frame_employee_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">eva_limit_frame_employee</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>ค้นหา eva_limit_frame_employee</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_employee_frame_group_guid' for='s_eva_limit_frame_employee_frame_group_guid'>frame_plan_guid</label>
|
||||
<input class="form-control" type="hidden" id="s_eva_limit_frame_employee_frame_group_guid" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_employee_employee_id' for='s_eva_limit_frame_employee_employee_id'>พนักงาน</label>
|
||||
<select class="form-control" id="s_eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="true" iGroup="s_eva_limit_frame_employee" title='พนักงาน' placeholder='พนักงาน'></select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_employee_DoSearch();">ค้นหา</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_employee_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
<button style="display:none;" class="btn btn-info" onclick="javascript:eva_limit_frame_employee_GetSelect('id');">ดึงตัวเลือก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_employeeTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th>เลือก</th>-->
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_limit_frame_employee_id'>id</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_frame_group_guid'>frame_plan_guid</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_employee_id'>พนักงาน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_org_id'>หน่วยงาน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_position_id'>ตำแหน่ง</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_level_id'>ระดับ</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_salary'>เงินเดือน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_position_allowance'>เงินประจำตำแหน่ง</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_monthly_remuneration'>ค่าตอบแทนรายเดือน</label></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_employee/eva_limit_frame_employee.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
eva_limit_frame_employee_InitiateDataTable();
|
||||
eva_limit_frame_employee_InitialForm();
|
||||
SetupValidationRemark("eva_limit_frame_employee");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_employee";
|
||||
Layout = "_LayoutDirect";
|
||||
}
|
||||
|
||||
<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="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">eva_limit_frame_employee</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_limit_frame_employee</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_employee_id" for="eva_limit_frame_employee_employee_id">พนักงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_org_id" for="eva_limit_frame_employee_org_id">หน่วยงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_id" for="eva_limit_frame_employee_position_id">ตำแหน่ง</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_position_id" iLabel="ตำแหน่ง" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_level_id" for="eva_limit_frame_employee_level_id">ระดับ</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_level_id" iLabel="ระดับ" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_salary" for="eva_limit_frame_employee_salary">เงินเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_salary" iLabel="เงินเดือน" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_allowance" for="eva_limit_frame_employee_position_allowance">เงินประจำตำแหน่ง</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance" iLabel="เงินประจำตำแหน่ง" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_monthly_remuneration" for="eva_limit_frame_employee_monthly_remuneration">ค่าตอบแทนรายเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration" iLabel="ค่าตอบแทนรายเดือน" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_employee_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_employee/eva_limit_frame_employee_d.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
if (id) {
|
||||
eva_limit_frame_employee_SetEditForm(id);
|
||||
} else {
|
||||
eva_limit_frame_employee_SetCreateForm();
|
||||
}
|
||||
SetupValidationRemark("eva_limit_frame_employee");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
ViewData["Title"] = "eva_limit_frame_employee";
|
||||
}
|
||||
|
||||
<section class="wrapper">
|
||||
|
||||
<div class="title col-md-12"><div class="line"></div>จัดการ eva_limit_frame_employee</div>
|
||||
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_employee_Add()">
|
||||
<i class="fa fa-plus"></i> เพิ่มรายการ
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_employeeTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ลำดับ</th>
|
||||
<th><label id='h_eva_limit_frame_employee_employee_id'>พนักงาน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_org_id'>หน่วยงาน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_position_id'>ตำแหน่ง</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_level_id'>ระดับ</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_salary'>เงินเดือน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_position_allowance'>เงินประจำตำแหน่ง</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_monthly_remuneration'>ค่าตอบแทนรายเดือน</label></th>
|
||||
|
||||
<th>กิจกรรม</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="thin-border-bottom" id="eva_limit_frame_employeeBody"></tbody>
|
||||
</table>
|
||||
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-outline" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_employee_Save(getUrlParameter('id'))">บันทึก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_employee/eva_limit_frame_employee_inline.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
//var id = getUrlParameter("id");
|
||||
//if (id) {
|
||||
// eva_limit_frame_employee_InitialForm(id);
|
||||
//}
|
||||
eva_limit_frame_employee_InitialForm('');
|
||||
});
|
||||
|
||||
$(document).on("change", ".input_score", function () {
|
||||
eva_limit_frame_employee_Summary();
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_employee";
|
||||
}
|
||||
|
||||
<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">รายงาน eva_limit_frame_employee</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>รายงาน eva_limit_frame_employee</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_eva_limit_frame_employee_employee_id' for='s_eva_limit_frame_employee_employee_id'>พนักงาน</label>
|
||||
<select class="form-control" id="s_eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="true" iGroup="s_eva_limit_frame_employee" title='พนักงาน' placeholder='พนักงาน'></select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_employee_DoSearch('pdf');">แสดงรายงาน</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_employee_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/eva_limit_frame_employee/eva_limit_frame_employee_report.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
eva_limit_frame_employee_InitialForm();
|
||||
SetupValidationRemark("s_eva_limit_frame_employee");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_employee_id" />
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_employee_employee_id" for="eva_limit_frame_employee_employee_id">พนักงาน</label>
|
||||
<div class="inpt-group">
|
||||
<select class="inpt-control" id="eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_employee_org_id" for="eva_limit_frame_employee_org_id">หน่วยงาน</label>
|
||||
<div class="inpt-group">
|
||||
<select class="inpt-control" id="eva_limit_frame_employee_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_employee_position_id" for="eva_limit_frame_employee_position_id">ตำแหน่ง</label>
|
||||
<div class="inpt-group">
|
||||
<select class="inpt-control" id="eva_limit_frame_employee_position_id" iLabel="ตำแหน่ง" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_employee_level_id" for="eva_limit_frame_employee_level_id">ระดับ</label>
|
||||
<div class="inpt-group">
|
||||
<select class="inpt-control" id="eva_limit_frame_employee_level_id" iLabel="ระดับ" iRequire="true" iGroup="eva_limit_frame_employee" ></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_employee_salary" for="eva_limit_frame_employee_salary">เงินเดือน</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_employee_salary" iLabel="เงินเดือน" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_employee_position_allowance" for="eva_limit_frame_employee_position_allowance">เงินประจำตำแหน่ง</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_employee_position_allowance" iLabel="เงินประจำตำแหน่ง" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_employee_monthly_remuneration" for="eva_limit_frame_employee_monthly_remuneration">ค่าตอบแทนรายเดือน</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_employee_monthly_remuneration" iLabel="ค่าตอบแทนรายเดือน" iRequire="true" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
133
Views/eva_limit_frame_groupView/eva_limit_frame_group.cshtml
Normal file
133
Views/eva_limit_frame_groupView/eva_limit_frame_group.cshtml
Normal file
@@ -0,0 +1,133 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_group";
|
||||
}
|
||||
|
||||
<div class="modal fade" id="eva_limit_frame_groupModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_limit_frame_groupModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="eva_limit_frame_groupModelLabel">บันทึกข้อมูล eva_limit_frame_group</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_group_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_group_frame_plan_guid" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_group_guid" for="eva_limit_frame_group_group_guid">กลุ่มการประเมิน</label>
|
||||
<select class="form-control" id="eva_limit_frame_group_group_guid" iLabel="กลุ่มการประเมิน" iRequire="true" iGroup="eva_limit_frame_group" ></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_limit_frame_295" for="eva_limit_frame_group_limit_frame_295">กรอบวงเงินที่กันไว้</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_limit_frame_295" iLabel="กรอบวงเงินที่กันไว้" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary" for="eva_limit_frame_group_total_salary">อัตราเงินเดือนรวม</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary" iLabel="อัตราเงินเดือนรวม" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit" for="eva_limit_frame_group_total_salary_limit">วงเงินในการเลื่อนเงินเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit" iLabel="วงเงินในการเลื่อนเงินเดือน" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit_rounded" for="eva_limit_frame_group_total_salary_limit_rounded">วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded" iLabel="วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-primary" onclick="javascript:eva_limit_frame_group_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">eva_limit_frame_group</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>ค้นหา eva_limit_frame_group</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_group_frame_plan_guid' for='s_eva_limit_frame_group_frame_plan_guid'>frame_plan_guid</label>
|
||||
<input class="form-control" type="hidden" id="s_eva_limit_frame_group_frame_plan_guid" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_group_group_guid' for='s_eva_limit_frame_group_group_guid'>กลุ่มการประเมิน</label>
|
||||
<select class="form-control" id="s_eva_limit_frame_group_group_guid" iLabel="กลุ่มการประเมิน" iRequire="true" iGroup="s_eva_limit_frame_group" title='กลุ่มการประเมิน' placeholder='กลุ่มการประเมิน'></select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_group_DoSearch();">ค้นหา</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_group_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
<button style="display:none;" class="btn btn-info" onclick="javascript:eva_limit_frame_group_GetSelect('id');">ดึงตัวเลือก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_groupTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th>เลือก</th>-->
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_limit_frame_group_id'>รหัสอ้างอิง</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_frame_plan_guid'>frame_plan_guid</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_group_guid'>กลุ่มการประเมิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_limit_frame_295'>กรอบวงเงินที่กันไว้</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary'>อัตราเงินเดือนรวม</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary_limit'>วงเงินในการเลื่อนเงินเดือน</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary_limit_rounded'>วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง</label></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_group/eva_limit_frame_group.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
eva_limit_frame_group_InitiateDataTable();
|
||||
eva_limit_frame_group_InitialForm();
|
||||
SetupValidationRemark("eva_limit_frame_group");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
286
Views/eva_limit_frame_groupView/eva_limit_frame_group_d.cshtml
Normal file
286
Views/eva_limit_frame_groupView/eva_limit_frame_group_d.cshtml
Normal file
@@ -0,0 +1,286 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_group";
|
||||
Layout = "_LayoutDirect";
|
||||
}
|
||||
|
||||
<div class="modal fade" id="eva_limit_frame_employeeModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_limit_frame_employeeModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="eva_limit_frame_employeeModelLabel">บันทึกข้อมูล eva_limit_frame_employee</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid" />
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_employee_id" for="eva_limit_frame_employee_employee_id">พนักงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_org_id" for="eva_limit_frame_employee_org_id">หน่วยงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_org_id" iLabel="หน่วยงาน" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_id" for="eva_limit_frame_employee_position_id">ตำแหน่ง</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_position_id" iLabel="ตำแหน่ง" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_level_id" for="eva_limit_frame_employee_level_id">ระดับ</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_level_id" iLabel="ระดับ" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_salary" for="eva_limit_frame_employee_salary">เงินเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_salary" iLabel="เงินเดือน" iRequire="false" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_allowance" for="eva_limit_frame_employee_position_allowance">เงินประจำตำแหน่ง</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance" iLabel="เงินประจำตำแหน่ง" iRequire="false" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_monthly_remuneration" for="eva_limit_frame_employee_monthly_remuneration">ค่าตอบแทนรายเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration" iLabel="ค่าตอบแทนรายเดือน" iRequire="false" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-primary" onclick="javascript:eva_limit_frame_employee_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="eva_limit_frame_employeeModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_limit_frame_employeeModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="eva_limit_frame_employeeModelLabel">บันทึกข้อมูล eva_limit_frame_employee</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_employee_id" for="eva_limit_frame_employee_employee_id">พนักงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_org_id" for="eva_limit_frame_employee_org_id">หน่วยงาน</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_org_id" iLabel="หน่วยงาน" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_id" for="eva_limit_frame_employee_position_id">ตำแหน่ง</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_position_id" iLabel="ตำแหน่ง" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_level_id" for="eva_limit_frame_employee_level_id">ระดับ</label>
|
||||
<select class="form-control" id="eva_limit_frame_employee_level_id" iLabel="ระดับ" iRequire="false" iGroup="eva_limit_frame_employee"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_salary" for="eva_limit_frame_employee_salary">เงินเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_salary" iLabel="เงินเดือน" iRequire="false" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_position_allowance" for="eva_limit_frame_employee_position_allowance">เงินประจำตำแหน่ง</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance" iLabel="เงินประจำตำแหน่ง" iRequire="false" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_employee_monthly_remuneration" for="eva_limit_frame_employee_monthly_remuneration">ค่าตอบแทนรายเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration" iLabel="ค่าตอบแทนรายเดือน" iRequire="false" iGroup="eva_limit_frame_employee" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-primary" onclick="javascript:eva_limit_frame_employee_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">eva_limit_frame_group</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_limit_frame_group</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_group_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_group_frame_plan_guid" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_group_guid" for="eva_limit_frame_group_group_guid">กลุ่มการประเมิน</label>
|
||||
<select class="form-control" id="eva_limit_frame_group_group_guid" iLabel="กลุ่มการประเมิน" iRequire="false" iGroup="eva_limit_frame_group"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_limit_frame_295" for="eva_limit_frame_group_limit_frame_295">กรอบวงเงินที่กันไว้</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_limit_frame_295" iLabel="กรอบวงเงินที่กันไว้" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary" for="eva_limit_frame_group_total_salary">อัตราเงินเดือนรวม</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary" iLabel="อัตราเงินเดือนรวม" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit" for="eva_limit_frame_group_total_salary_limit">วงเงินในการเลื่อนเงินเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit" iLabel="วงเงินในการเลื่อนเงินเดือน" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit_rounded" for="eva_limit_frame_group_total_salary_limit_rounded">วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded" iLabel="วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_group_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>ค้นหา eva_limit_frame_employee</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_employee_frame_group_guid' for='s_eva_limit_frame_employee_frame_group_guid'>frame_plan_guid</label>
|
||||
<input class="form-control" type="hidden" id="s_eva_limit_frame_employee_frame_group_guid" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_employee_employee_id' for='s_eva_limit_frame_employee_employee_id'>พนักงาน</label>
|
||||
<select class="form-control" id="s_eva_limit_frame_employee_employee_id" iLabel="พนักงาน" iRequire="true" iGroup="s_eva_limit_frame_employee" title='พนักงาน' placeholder='พนักงาน'></select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_employee_DoSearch();">ค้นหา</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_employee_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
<button style="display:none;" class="btn btn-info" onclick="javascript:eva_limit_frame_employee_GetSelect('id');">ดึงตัวเลือก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_employeeTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th>เลือก</th>-->
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_limit_frame_employee_id'>id</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_frame_group_guid'>frame_plan_guid</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_employee_id'>พนักงาน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_org_id'>หน่วยงาน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_position_id'>ตำแหน่ง</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_level_id'>ระดับ</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_salary'>เงินเดือน</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_position_allowance'>เงินประจำตำแหน่ง</label></th>
|
||||
<th><label id='h_eva_limit_frame_employee_monthly_remuneration'>ค่าตอบแทนรายเดือน</label></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_group/eva_limit_frame_group_d.js"></script>
|
||||
<script src="~/js/eva_limit_frame_employee/eva_limit_frame_employee.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
if (id) {
|
||||
eva_limit_frame_group_SetEditForm(id);
|
||||
eva_limit_frame_employee_InitiateDataTable();
|
||||
eva_limit_frame_employee_InitialForm();
|
||||
} else {
|
||||
eva_limit_frame_group_SetCreateForm();
|
||||
}
|
||||
SetupValidationRemark("eva_limit_frame_group");
|
||||
SetupValidationRemark("eva_limit_frame_employee");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
ViewData["Title"] = "eva_limit_frame_group";
|
||||
}
|
||||
|
||||
<section class="wrapper">
|
||||
|
||||
<div class="title col-md-12"><div class="line"></div>จัดการ eva_limit_frame_group</div>
|
||||
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_group_Add()">
|
||||
<i class="fa fa-plus"></i> เพิ่มรายการ
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_groupTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ลำดับ</th>
|
||||
<th><label id='h_eva_limit_frame_group_group_guid'>กลุ่มการประเมิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_limit_frame_295'>กรอบวงเงินที่กันไว้</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary'>อัตราเงินเดือนรวม</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary_limit'>วงเงินในการเลื่อนเงินเดือน</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary_limit_rounded'>วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง</label></th>
|
||||
|
||||
<th>กิจกรรม</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="thin-border-bottom" id="eva_limit_frame_groupBody"></tbody>
|
||||
</table>
|
||||
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-outline" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_group_Save(getUrlParameter('id'))">บันทึก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_group/eva_limit_frame_group_inline.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
//var id = getUrlParameter("id");
|
||||
//if (id) {
|
||||
// eva_limit_frame_group_InitialForm(id);
|
||||
//}
|
||||
eva_limit_frame_group_InitialForm('');
|
||||
});
|
||||
|
||||
$(document).on("change", ".input_score", function () {
|
||||
eva_limit_frame_group_Summary();
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_group";
|
||||
}
|
||||
|
||||
<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">รายงาน eva_limit_frame_group</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>รายงาน eva_limit_frame_group</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_eva_limit_frame_group_frame_plan_guid' for='s_eva_limit_frame_group_frame_plan_guid'>frame_plan_guid</label>
|
||||
<input class="form-control" type="hidden" id="s_eva_limit_frame_group_frame_plan_guid" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_group_group_guid' for='s_eva_limit_frame_group_group_guid'>กลุ่มการประเมิน</label>
|
||||
<select class="form-control" id="s_eva_limit_frame_group_group_guid" iLabel="กลุ่มการประเมิน" iRequire="true" iGroup="s_eva_limit_frame_group" title='กลุ่มการประเมิน' placeholder='กลุ่มการประเมิน'></select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_group_DoSearch('pdf');">แสดงรายงาน</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_group_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/eva_limit_frame_group/eva_limit_frame_group_report.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
eva_limit_frame_group_InitialForm();
|
||||
SetupValidationRemark("s_eva_limit_frame_group");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_group_id" />
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_group_frame_plan_guid" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_group_group_guid" for="eva_limit_frame_group_group_guid">กลุ่มการประเมิน</label>
|
||||
<div class="inpt-group">
|
||||
<select class="inpt-control" id="eva_limit_frame_group_group_guid" iLabel="กลุ่มการประเมิน" iRequire="true" iGroup="eva_limit_frame_group" ></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_group_limit_frame_295" for="eva_limit_frame_group_limit_frame_295">กรอบวงเงินที่กันไว้</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_group_limit_frame_295" iLabel="กรอบวงเงินที่กันไว้" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_group_total_salary" for="eva_limit_frame_group_total_salary">อัตราเงินเดือนรวม</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_group_total_salary" iLabel="อัตราเงินเดือนรวม" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit" for="eva_limit_frame_group_total_salary_limit">วงเงินในการเลื่อนเงินเดือน</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_group_total_salary_limit" iLabel="วงเงินในการเลื่อนเงินเดือน" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit_rounded" for="eva_limit_frame_group_total_salary_limit_rounded">วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded" iLabel="วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง" iRequire="true" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
145
Views/eva_limit_frame_planView/eva_limit_frame_plan.cshtml
Normal file
145
Views/eva_limit_frame_planView/eva_limit_frame_plan.cshtml
Normal file
@@ -0,0 +1,145 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_plan";
|
||||
}
|
||||
|
||||
|
||||
<div class="modal fade" id="eva_limit_frame_planModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_limit_frame_planModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="eva_limit_frame_planModelLabel">บันทึกข้อมูล eva_limit_frame_plan</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_status_self" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_status_chief" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_supervisor1" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-8">
|
||||
<label id="lab_eva_limit_frame_plan_plan_guid" for="eva_limit_frame_plan_plan_guid">แผนการประเมิน</label>
|
||||
<select class="form-control" id="eva_limit_frame_plan_plan_guid" iLabel="แผนการประเมิน" iRequire="false" iGroup="eva_limit_frame_plan"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_executed_date" for="eva_limit_frame_plan_executed_date">วันที่ตั้งกรอบวงเงิน</label>
|
||||
<input class="form-control" type="text" id="eva_limit_frame_plan_executed_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ตั้งกรอบวงเงิน" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_limit_frame_005" for="eva_limit_frame_plan_limit_frame_005">กรอบวงเงินที่กันไว้</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005" iLabel="กรอบวงเงินที่กันไว้" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_result" for="eva_limit_frame_plan_supervisor1_result">ผลการตรวจ</label>
|
||||
<select class="form-control" id="eva_limit_frame_plan_supervisor1_result" iLabel="ผลการตรวจ" iRequire="false" iGroup="eva_limit_frame_plan"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_date" for="eva_limit_frame_plan_supervisor1_date">วันที่ประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_limit_frame_plan_supervisor1_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_remark" for="eva_limit_frame_plan_supervisor1_remark">ความเห็นผู้ประเมิน</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_limit_frame_plan_supervisor1_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="false" iGroup="eva_limit_frame_plan"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_salary_adjustment_date" for="eva_limit_frame_plan_salary_adjustment_date">เลื่อนเงินเดือนวันที่</label>
|
||||
<input class="form-control" type="text" id="eva_limit_frame_plan_salary_adjustment_date" data-provide="datepicker" data-date-language="th-th" iLabel="เลื่อนเงินเดือนวันที่" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-primary" onclick="javascript:eva_limit_frame_plan_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">eva_limit_frame_plan</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>ค้นหา eva_limit_frame_plan</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_plan_executed_date' for='s_eva_limit_frame_plan_executed_date'>วันที่ตั้งกรอบวงเงิน</label>
|
||||
<input class="form-control" type="text" id="s_eva_limit_frame_plan_executed_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ตั้งกรอบวงเงิน" iRequire="false" iGroup="s_eva_limit_frame_plan" title='วันที่ตั้งกรอบวงเงิน' placeholder='วันที่ตั้งกรอบวงเงิน' />
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_plan_DoSearch();">ค้นหา</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_plan_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
<button style="display:none;" class="btn btn-info" onclick="javascript:eva_limit_frame_plan_GetSelect('id');">ดึงตัวเลือก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_planTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th>เลือก</th>-->
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_limit_frame_plan_id'>รหัสอ้างอิง</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_plan_guid'>แผนการประเมิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_executed_date'>วันที่ตั้งกรอบวงเงิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_limit_frame_005'>กรอบวงเงินที่กันไว้</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_status_self'>สถานะการส่ง กรอบวงเงิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_status_chief'>สถานะการตรวจ กรอบวงเงิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_supervisor1'>ผู้ตรวจกรอบวงเงิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_supervisor1_result'>ผลการตรวจ</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_supervisor1_remark'>ความเห็นผู้ประเมิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_supervisor1_date'>วันที่ประเมิน</label></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_plan/eva_limit_frame_plan.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
eva_limit_frame_plan_InitiateDataTable();
|
||||
eva_limit_frame_plan_InitialForm();
|
||||
SetupValidationRemark("eva_limit_frame_plan");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
221
Views/eva_limit_frame_planView/eva_limit_frame_plan_d.cshtml
Normal file
221
Views/eva_limit_frame_planView/eva_limit_frame_plan_d.cshtml
Normal file
@@ -0,0 +1,221 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_plan";
|
||||
Layout = "_LayoutDirect";
|
||||
}
|
||||
|
||||
<div class="modal fade" id="eva_limit_frame_groupModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_limit_frame_groupModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="eva_limit_frame_groupModelLabel">บันทึกข้อมูล eva_limit_frame_group</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_group_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_group_frame_plan_guid" />
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_group_guid" for="eva_limit_frame_group_group_guid">กลุ่มการประเมิน</label>
|
||||
<select class="form-control" id="eva_limit_frame_group_group_guid" iLabel="กลุ่มการประเมิน" iRequire="false" iGroup="eva_limit_frame_group"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_limit_frame_295" for="eva_limit_frame_group_limit_frame_295">กรอบวงเงินที่กันไว้</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_limit_frame_295" iLabel="กรอบวงเงินที่กันไว้" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary" for="eva_limit_frame_group_total_salary">อัตราเงินเดือนรวม</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary" iLabel="อัตราเงินเดือนรวม" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit" for="eva_limit_frame_group_total_salary_limit">วงเงินในการเลื่อนเงินเดือน</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit" iLabel="วงเงินในการเลื่อนเงินเดือน" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_group_total_salary_limit_rounded" for="eva_limit_frame_group_total_salary_limit_rounded">วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded" iLabel="วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง" iRequire="false" iGroup="eva_limit_frame_group" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-primary" onclick="javascript:eva_limit_frame_group_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">eva_limit_frame_plan</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_limit_frame_plan</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_id" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_status_self" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_status_chief" />
|
||||
<input class="form-control" type="hidden" id="eva_limit_frame_plan_supervisor1" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-8">
|
||||
<label id="lab_eva_limit_frame_plan_plan_guid" for="eva_limit_frame_plan_plan_guid">แผนการประเมิน</label>
|
||||
<select class="form-control" id="eva_limit_frame_plan_plan_guid" iLabel="แผนการประเมิน" iRequire="false" iGroup="eva_limit_frame_plan"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_executed_date" for="eva_limit_frame_plan_executed_date">วันที่ตั้งกรอบวงเงิน</label>
|
||||
<input class="form-control" type="text" id="eva_limit_frame_plan_executed_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ตั้งกรอบวงเงิน" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_limit_frame_005" for="eva_limit_frame_plan_limit_frame_005">กรอบวงเงินที่กันไว้</label>
|
||||
<input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005" iLabel="กรอบวงเงินที่กันไว้" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_result" for="eva_limit_frame_plan_supervisor1_result">ผลการตรวจ</label>
|
||||
<select class="form-control" id="eva_limit_frame_plan_supervisor1_result" iLabel="ผลการตรวจ" iRequire="false" iGroup="eva_limit_frame_plan"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_date" for="eva_limit_frame_plan_supervisor1_date">วันที่ประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_limit_frame_plan_supervisor1_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_remark" for="eva_limit_frame_plan_supervisor1_remark">ความเห็นผู้ประเมิน</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_limit_frame_plan_supervisor1_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="false" iGroup="eva_limit_frame_plan"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_limit_frame_plan_salary_adjustment_date" for="eva_limit_frame_plan_salary_adjustment_date">เลื่อนเงินเดือนวันที่</label>
|
||||
<input class="form-control" type="text" id="eva_limit_frame_plan_salary_adjustment_date" data-provide="datepicker" data-date-language="th-th" iLabel="เลื่อนเงินเดือนวันที่" iRequire="false" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_plan_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>ค้นหา eva_limit_frame_group</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_group_frame_plan_guid' for='s_eva_limit_frame_group_frame_plan_guid'>frame_plan_guid</label>
|
||||
<input class="form-control" type="hidden" id="s_eva_limit_frame_group_frame_plan_guid" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_limit_frame_group_group_guid' for='s_eva_limit_frame_group_group_guid'>กลุ่มการประเมิน</label>
|
||||
<select class="form-control" id="s_eva_limit_frame_group_group_guid" iLabel="กลุ่มการประเมิน" iRequire="false" iGroup="s_eva_limit_frame_group" title='กลุ่มการประเมิน' placeholder='กลุ่มการประเมิน'></select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_group_DoSearch();">ค้นหา</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_group_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
<button style="display:none;" class="btn btn-info" onclick="javascript:eva_limit_frame_group_GetSelect('id');">ดึงตัวเลือก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_groupTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th>เลือก</th>-->
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_limit_frame_group_id'>รหัสอ้างอิง</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_frame_plan_guid'>frame_plan_guid</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_group_guid'>กลุ่มการประเมิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_limit_frame_295'>กรอบวงเงินที่กันไว้</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary'>อัตราเงินเดือนรวม</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary_limit'>วงเงินในการเลื่อนเงินเดือน</label></th>
|
||||
<th><label id='h_eva_limit_frame_group_total_salary_limit_rounded'>วงเงินในการเลื่อนเงินเดือน ที่ใช้จริง</label></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<br />
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_plan/eva_limit_frame_plan_d.js"></script>
|
||||
<script src="~/js/eva_limit_frame_group/eva_limit_frame_group.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
if (id) {
|
||||
eva_limit_frame_plan_SetEditForm(id);
|
||||
|
||||
eva_limit_frame_group_InitiateDataTable();
|
||||
eva_limit_frame_group_InitialForm();
|
||||
|
||||
} else {
|
||||
eva_limit_frame_plan_SetCreateForm();
|
||||
}
|
||||
SetupValidationRemark("eva_limit_frame_plan");
|
||||
SetupValidationRemark("eva_limit_frame_group");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
ViewData["Title"] = "eva_limit_frame_plan";
|
||||
}
|
||||
|
||||
<section class="wrapper">
|
||||
|
||||
<div class="title col-md-12"><div class="line"></div>จัดการ eva_limit_frame_plan</div>
|
||||
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_plan_Add()">
|
||||
<i class="fa fa-plus"></i> เพิ่มรายการ
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_limit_frame_planTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ลำดับ</th>
|
||||
<th><label id='h_eva_limit_frame_plan_plan_guid'>แผนการประเมิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_executed_date'>วันที่ตั้งกรอบวงเงิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_limit_frame_005'>กรอบวงเงินที่กันไว้</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_supervisor1_result'>ผลการตรวจ</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_supervisor1_remark'>ความเห็นผู้ประเมิน</label></th>
|
||||
<th><label id='h_eva_limit_frame_plan_supervisor1_date'>วันที่ประเมิน</label></th>
|
||||
|
||||
<th>กิจกรรม</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="thin-border-bottom" id="eva_limit_frame_planBody"></tbody>
|
||||
</table>
|
||||
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-outline" data-dismiss="modal">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_limit_frame_plan_Save(getUrlParameter('id'))">บันทึก</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_limit_frame_plan/eva_limit_frame_plan_inline.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
//var id = getUrlParameter("id");
|
||||
//if (id) {
|
||||
// eva_limit_frame_plan_InitialForm(id);
|
||||
//}
|
||||
eva_limit_frame_plan_InitialForm('');
|
||||
});
|
||||
|
||||
$(document).on("change", ".input_score", function () {
|
||||
eva_limit_frame_plan_Summary();
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_limit_frame_plan";
|
||||
}
|
||||
|
||||
<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">รายงาน eva_limit_frame_plan</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>รายงาน eva_limit_frame_plan</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_eva_limit_frame_plan_executed_date' for='s_eva_limit_frame_plan_executed_date'>วันที่ตั้งกรอบวงเงิน</label>
|
||||
<input class="form-control" type="text" id="s_eva_limit_frame_plan_executed_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ตั้งกรอบวงเงิน" iRequire="true" iGroup="s_eva_limit_frame_plan" title='วันที่ตั้งกรอบวงเงิน' placeholder='วันที่ตั้งกรอบวงเงิน' />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_plan_DoSearch('pdf');">แสดงรายงาน</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_limit_frame_plan_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/eva_limit_frame_plan/eva_limit_frame_plan_report.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
eva_limit_frame_plan_InitialForm();
|
||||
SetupValidationRemark("s_eva_limit_frame_plan");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_plan_id" />
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_plan_status_self" />
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_plan_status_chief" />
|
||||
<input class="inpt-control" type="hidden" id="eva_limit_frame_plan_supervisor1" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="col-md-8">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_plan_plan_guid" for="eva_limit_frame_plan_plan_guid">แผนการประเมิน</label>
|
||||
<div class="inpt-group">
|
||||
<select class="inpt-control" id="eva_limit_frame_plan_plan_guid" iLabel="แผนการประเมิน" iRequire="true" iGroup="eva_limit_frame_plan" ></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_plan_executed_date" for="eva_limit_frame_plan_executed_date">วันที่ตั้งกรอบวงเงิน</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="text" id="eva_limit_frame_plan_executed_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ตั้งกรอบวงเงิน" iRequire="true" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_plan_limit_frame_005" for="eva_limit_frame_plan_limit_frame_005">กรอบวงเงินที่กันไว้</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="number" id="eva_limit_frame_plan_limit_frame_005" iLabel="กรอบวงเงินที่กันไว้" iRequire="true" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_result" for="eva_limit_frame_plan_supervisor1_result">ผลการตรวจ</label>
|
||||
<div class="inpt-group">
|
||||
<select class="inpt-control" id="eva_limit_frame_plan_supervisor1_result" iLabel="ผลการตรวจ" iRequire="true" iGroup="eva_limit_frame_plan" ></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_date" for="eva_limit_frame_plan_supervisor1_date">วันที่ประเมิน</label>
|
||||
<div class="inpt-group">
|
||||
<input class="inpt-control" type="text" id="eva_limit_frame_plan_supervisor1_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_limit_frame_plan" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="col-md-12">
|
||||
<div class="inpt-form-group">
|
||||
<label id="lab_eva_limit_frame_plan_supervisor1_remark" for="eva_limit_frame_plan_supervisor1_remark">ความเห็นผู้ประเมิน</label>
|
||||
<div class="inpt-group">
|
||||
<textarea class="inpt-control" rows="4" cols="50" id="eva_limit_frame_plan_supervisor1_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="true" iGroup="eva_limit_frame_plan" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,6 +30,9 @@
|
||||
<ul>
|
||||
<li><a href="~/eva_performance_planView/eva_performance_plan"><div style="display: flex;align-items: center;"><span class="menu-dot">·</span>กำหนดแผนการประเมินเพื่อปรับเลื่อนเงินเดือน</div></a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="~/eva_limit_frame_planView/eva_limit_frame_plan"><div style="display: flex;align-items: center;"><span class="menu-dot">·</span>กำหนดกรอบวงเงิน</div></a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="~/eva_level_score_basicView/eva_level_score_basic"><div style="display: flex;align-items: center;"><span class="menu-dot">·</span>กำหนดระดับผลการประเมิน</div></a>
|
||||
</ul>
|
||||
|
||||
@@ -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": "",
|
||||
|
||||
@@ -70,6 +70,21 @@
|
||||
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc.cshtml" />
|
||||
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc_d.cshtml" />
|
||||
<None Include="Views\eva_evaluation_operating_agreementView\eva_evaluation_operating_agreement.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_employeeView\eva_limit_frame_employee.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_employeeView\eva_limit_frame_employee_d.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_employeeView\eva_limit_frame_employee_inline.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_employeeView\eva_limit_frame_employee_report.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_employeeView\eva_limit_frame_employee_wizardform.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_groupView\eva_limit_frame_group.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_groupView\eva_limit_frame_group_d.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_groupView\eva_limit_frame_group_inline.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_groupView\eva_limit_frame_group_report.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_groupView\eva_limit_frame_group_wizardform.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_planView\eva_limit_frame_plan.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_planView\eva_limit_frame_plan_d.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_planView\eva_limit_frame_plan_inline.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_planView\eva_limit_frame_plan_report.cshtml" />
|
||||
<None Include="Views\eva_limit_frame_planView\eva_limit_frame_plan_wizardform.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" />
|
||||
@@ -77,6 +92,18 @@
|
||||
<None Include="wwwroot\js\eva_create_evaluation_detail_firstdoc\eva_create_evaluation_detail_firstdoc_d.js" />
|
||||
<None Include="wwwroot\js\eva_create_evaluation_detail_review0A\eva_create_evaluation_detail_review0A_d.js" />
|
||||
<None Include="wwwroot\js\eva_evaluation_operating_agreement\eva_evaluation_operating_agreement.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_employee\eva_limit_frame_employee.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_employee\eva_limit_frame_employee_d.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_employee\eva_limit_frame_employee_inline.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_employee\eva_limit_frame_employee_report.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_group\eva_limit_frame_group.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_group\eva_limit_frame_group_d.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_group\eva_limit_frame_group_inline.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_group\eva_limit_frame_group_report.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_plan\eva_limit_frame_plan.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_plan\eva_limit_frame_plan_d.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_plan\eva_limit_frame_plan_inline.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_plan\eva_limit_frame_plan_report.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" />
|
||||
<None Include="wwwroot\js\rep_eva_self_review_all\rep_eva_self_review_all_report.js" />
|
||||
|
||||
378
tb320eva.xml
378
tb320eva.xml
@@ -3343,6 +3343,360 @@
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_employeeController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_limit_frame_employeeController},TodoAPI2.Models.Ieva_limit_frame_employeeService,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_limit_frame_employeeController.Get(System.Guid)">
|
||||
<summary>
|
||||
Get specific item by id
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return Get specific item by id</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_employeeController.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.eva_limit_frame_employeeController.GetList(System.Nullable{System.Int32})">
|
||||
<summary>
|
||||
Get list items by employee_id
|
||||
</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_limit_frame_employeeController.GetListBySearch(TodoAPI2.Models.eva_limit_frame_employeeSearchModel)">
|
||||
<summary>
|
||||
Get list items by search
|
||||
</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_limit_frame_employeeController.eva_limit_frame_employee_report(TodoAPI2.Models.eva_limit_frame_employeeReportRequestModel)">
|
||||
<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_limit_frame_employeeController.Insert(TodoAPI2.Models.eva_limit_frame_employeeInputModel)">
|
||||
<summary>
|
||||
Create new item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_employeeController.Update(System.Guid,TodoAPI2.Models.eva_limit_frame_employeeInputModel)">
|
||||
<summary>
|
||||
Update item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="id"></param>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_employeeController.Delete(System.Guid)">
|
||||
<summary>
|
||||
Delete item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="id"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_employeeController.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_limit_frame_employeeInputModel})">
|
||||
<summary>
|
||||
Update multiple item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_employeeController.RefreshAutoField">
|
||||
<summary>
|
||||
Refresh AutoField of all items
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_groupController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_limit_frame_groupController},TodoAPI2.Models.Ieva_limit_frame_groupService,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_limit_frame_groupController.Get(System.Guid)">
|
||||
<summary>
|
||||
Get specific item by id
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return Get specific item by id</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_groupController.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.eva_limit_frame_groupController.GetList(System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
Get list items by group_guid
|
||||
</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_limit_frame_groupController.GetListBySearch(TodoAPI2.Models.eva_limit_frame_groupSearchModel)">
|
||||
<summary>
|
||||
Get list items by search
|
||||
</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_limit_frame_groupController.eva_limit_frame_group_report(TodoAPI2.Models.eva_limit_frame_groupReportRequestModel)">
|
||||
<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_limit_frame_groupController.Insert(TodoAPI2.Models.eva_limit_frame_groupInputModel)">
|
||||
<summary>
|
||||
Create new item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_groupController.Update(System.Guid,TodoAPI2.Models.eva_limit_frame_groupInputModel)">
|
||||
<summary>
|
||||
Update item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="id"></param>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_groupController.Delete(System.Guid)">
|
||||
<summary>
|
||||
Delete item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="id"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_groupController.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_limit_frame_groupInputModel})">
|
||||
<summary>
|
||||
Update multiple item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_groupController.RefreshAutoField">
|
||||
<summary>
|
||||
Refresh AutoField of all items
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_planController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_limit_frame_planController},TodoAPI2.Models.Ieva_limit_frame_planService,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_limit_frame_planController.Get(System.Guid)">
|
||||
<summary>
|
||||
Get specific item by id
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return Get specific item by id</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_planController.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.eva_limit_frame_planController.GetList(System.Nullable{System.DateTime})">
|
||||
<summary>
|
||||
Get list items by executed_date
|
||||
</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_limit_frame_planController.GetListBySearch(TodoAPI2.Models.eva_limit_frame_planSearchModel)">
|
||||
<summary>
|
||||
Get list items by search
|
||||
</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_limit_frame_planController.eva_limit_frame_plan_report(TodoAPI2.Models.eva_limit_frame_planReportRequestModel)">
|
||||
<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_limit_frame_planController.Insert(TodoAPI2.Models.eva_limit_frame_planInputModel)">
|
||||
<summary>
|
||||
Create new item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_planController.Update(System.Guid,TodoAPI2.Models.eva_limit_frame_planInputModel)">
|
||||
<summary>
|
||||
Update item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="id"></param>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_planController.Delete(System.Guid)">
|
||||
<summary>
|
||||
Delete item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="id"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_planController.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_limit_frame_planInputModel})">
|
||||
<summary>
|
||||
Update multiple item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="model"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_planController.RefreshAutoField">
|
||||
<summary>
|
||||
Refresh AutoField of all items
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_performance_planController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_performance_planController},TodoAPI2.Models.Ieva_performance_planService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
@@ -4542,6 +4896,30 @@
|
||||
<param name="logger"></param>
|
||||
<param name="inemp"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_limit_frame_employeeViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_limit_frame_employeeController},TodoAPI2.Models.Ieva_limit_frame_employeeService,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_limit_frame_groupViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_limit_frame_groupController},TodoAPI2.Models.Ieva_limit_frame_groupService,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_limit_frame_planViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_limit_frame_planController},TodoAPI2.Models.Ieva_limit_frame_planService,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_performance_planViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_performance_planController},TodoAPI2.Models.Iexternal_employeeService,TodoAPI2.Models.Ieva_performance_planService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
|
||||
240
wwwroot/js/eva_limit_frame_employee/eva_limit_frame_employee.js
Normal file
240
wwwroot/js/eva_limit_frame_employee/eva_limit_frame_employee.js
Normal file
@@ -0,0 +1,240 @@
|
||||
var eva_limit_frame_employee_editMode = "CREATE";
|
||||
var eva_limit_frame_employee_API = "/api/eva_limit_frame_employee/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_GetSearchParameter() {
|
||||
var eva_limit_frame_employeeSearchObject = new Object();
|
||||
eva_limit_frame_employeeSearchObject.frame_group_guid = getUrlParameter("id");
|
||||
eva_limit_frame_employeeSearchObject.employee_id = $("#s_eva_limit_frame_employee_employee_id").val();
|
||||
|
||||
return eva_limit_frame_employeeSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_employee_id").val(data.id);
|
||||
$("#eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id"), data, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id"), data, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_salary").val(data.salary);
|
||||
$("#eva_limit_frame_employee_position_allowance").val(data.position_allowance);
|
||||
$("#eva_limit_frame_employee_monthly_remuneration").val(data.monthly_remuneration);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetFromForm() {
|
||||
var eva_limit_frame_employeeObject = new Object();
|
||||
eva_limit_frame_employeeObject.id = $("#eva_limit_frame_employee_id").val();
|
||||
eva_limit_frame_employeeObject.frame_group_guid = getUrlParameter("id");
|
||||
eva_limit_frame_employeeObject.employee_id = $("#eva_limit_frame_employee_employee_id").val();
|
||||
eva_limit_frame_employeeObject.org_id = $("#eva_limit_frame_employee_org_id").val();
|
||||
eva_limit_frame_employeeObject.position_id = $("#eva_limit_frame_employee_position_id").val();
|
||||
eva_limit_frame_employeeObject.level_id = $("#eva_limit_frame_employee_level_id").val();
|
||||
eva_limit_frame_employeeObject.salary = $("#eva_limit_frame_employee_salary").val();
|
||||
eva_limit_frame_employeeObject.position_allowance = $("#eva_limit_frame_employee_position_allowance").val();
|
||||
eva_limit_frame_employeeObject.monthly_remuneration = $("#eva_limit_frame_employee_monthly_remuneration").val();
|
||||
|
||||
|
||||
return eva_limit_frame_employeeObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
eva_limit_frame_employee_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_limit_frame_employeeModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_limit_frame_employee_GoCreate() {
|
||||
// Incase model popup
|
||||
eva_limit_frame_employee_SetCreateForm(true);
|
||||
|
||||
// Incase open new page
|
||||
//window_open(appsite + "/eva_limit_frame_employeeView/eva_limit_frame_employee_d");
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GoEdit(a) {
|
||||
// Incase model popup
|
||||
eva_limit_frame_employee_SetEditForm(a);
|
||||
|
||||
// Incase open new page
|
||||
//window_open(appsite + "/eva_limit_frame_employeeView/eva_limit_frame_employee_d?id=" + a);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_editMode = "UPDATE";
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
$("#eva_limit_frame_employeeModel").modal("show");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_SetCreateForm(s) {
|
||||
eva_limit_frame_employee_editMode = "CREATE";
|
||||
eva_limit_frame_employee_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_RefreshTable() {
|
||||
// Incase model popup
|
||||
eva_limit_frame_employee_DoSearch();
|
||||
|
||||
// Incase open new page
|
||||
//window.parent.eva_limit_frame_employee_DoSearch();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_limit_frame_employee_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_limit_frame_employee_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_employee', eva_limit_frame_employee_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = eva_limit_frame_employee_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_limit_frame_employee_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
$("#eva_limit_frame_employeeModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_employee_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
$("#eva_limit_frame_employeeModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_employee_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
$("#eva_limit_frame_employeeModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_employee_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var eva_limit_frame_employeeTableV;
|
||||
|
||||
var eva_limit_frame_employee_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
eva_limit_frame_employeeTableV = $('#eva_limit_frame_employeeTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
//"select": {
|
||||
// "style": 'multi'
|
||||
//},
|
||||
"columns": [
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "id" },
|
||||
{ "data": "frame_group_guid_eva_limit_frame_group_group_guid" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "org_id_external_linkage_external_name" },
|
||||
{ "data": "position_id_external_linkage_external_name" },
|
||||
{ "data": "level_id_external_linkage_external_name" },
|
||||
{ "data": "salary" },
|
||||
{ "data": "position_allowance" },
|
||||
{ "data": "monthly_remuneration" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0, //1,
|
||||
"data": "id",
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_limit_frame_employee_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_limit_frame_employee_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
},
|
||||
//{
|
||||
// targets: 0,
|
||||
// data: "",
|
||||
// defaultContent: '',
|
||||
// orderable: false,
|
||||
// className: 'select-checkbox'
|
||||
//}
|
||||
],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_limit_frame_employee_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_employee_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/GetListBySearch?" + p, eva_limit_frame_employee_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_DoSearch() {
|
||||
var p = $.param(eva_limit_frame_employee_GetSearchParameter());
|
||||
var eva_limit_frame_employee_reload = function (result) {
|
||||
eva_limit_frame_employeeTableV.destroy();
|
||||
eva_limit_frame_employee_setupTable(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/GetListBySearch?" + p, eva_limit_frame_employee_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetSelect(f) {
|
||||
var eva_limit_frame_employee_selectitem = [];
|
||||
$.each(eva_limit_frame_employeeTableV.rows('.selected').data(), function (key, value) {
|
||||
eva_limit_frame_employee_selectitem.push(value[f]);
|
||||
});
|
||||
alert(eva_limit_frame_employee_selectitem);
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
var eva_limit_frame_employee_editMode = "CREATE";
|
||||
var eva_limit_frame_employee_API = "/api/eva_limit_frame_employee/";
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_employee_id").val(data.id);
|
||||
$("#eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id"), data, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id"), data, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_salary").val(data.salary);
|
||||
$("#eva_limit_frame_employee_position_allowance").val(data.position_allowance);
|
||||
$("#eva_limit_frame_employee_monthly_remuneration").val(data.monthly_remuneration);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetFromForm() {
|
||||
var eva_limit_frame_employeeObject = new Object();
|
||||
eva_limit_frame_employeeObject.id = $("#eva_limit_frame_employee_id").val();
|
||||
eva_limit_frame_employeeObject.frame_group_guid = $("#eva_limit_frame_employee_frame_group_guid").val();
|
||||
eva_limit_frame_employeeObject.employee_id = $("#eva_limit_frame_employee_employee_id").val();
|
||||
eva_limit_frame_employeeObject.org_id = $("#eva_limit_frame_employee_org_id").val();
|
||||
eva_limit_frame_employeeObject.position_id = $("#eva_limit_frame_employee_position_id").val();
|
||||
eva_limit_frame_employeeObject.level_id = $("#eva_limit_frame_employee_level_id").val();
|
||||
eva_limit_frame_employeeObject.salary = $("#eva_limit_frame_employee_salary").val();
|
||||
eva_limit_frame_employeeObject.position_allowance = $("#eva_limit_frame_employee_position_allowance").val();
|
||||
eva_limit_frame_employeeObject.monthly_remuneration = $("#eva_limit_frame_employee_monthly_remuneration").val();
|
||||
|
||||
|
||||
return eva_limit_frame_employeeObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_limit_frame_employee_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_editMode = "UPDATE";
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_SetCreateForm() {
|
||||
eva_limit_frame_employee_editMode = "CREATE";
|
||||
eva_limit_frame_employee_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_limit_frame_employee_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_limit_frame_employee_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_employee', eva_limit_frame_employee_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = eva_limit_frame_employee_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_limit_frame_employee_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_employee_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_employee_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบ ' + a + ' ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_employee_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
function eva_limit_frame_employee_ClearForm(i, blankItem) {
|
||||
var data = blankItem;
|
||||
$("#eva_limit_frame_employee_id_" + i).val("");
|
||||
$("#eva_limit_frame_employee_frame_group_guid_" + i).val("");
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id_" + i), blankItem, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id_" + i), blankItem, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id_" + i), blankItem, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id_" + i), blankItem, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_salary_" + i).val("");
|
||||
$("#eva_limit_frame_employee_position_allowance_" + i).val("");
|
||||
$("#eva_limit_frame_employee_monthly_remuneration_" + i).val("");
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToForm(data, i, blankItem) {
|
||||
$("#eva_limit_frame_employee_id_" + i).val(data.id);
|
||||
$("#eva_limit_frame_employee_frame_group_guid_" + i).val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id_" + i), blankItem, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id_" + i), blankItem, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id_" + i), blankItem, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id_" + i), blankItem, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_salary_" + i).val(data.salary);
|
||||
$("#eva_limit_frame_employee_position_allowance_" + i).val(data.position_allowance);
|
||||
$("#eva_limit_frame_employee_monthly_remuneration_" + i).val(data.monthly_remuneration);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetFromForm(obj, i) {
|
||||
var eva_limit_frame_employeeObject = new Object();
|
||||
eva_limit_frame_employeeObject.id = obj.find("#eva_limit_frame_employee_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.frame_group_guid = obj.find("#eva_limit_frame_employee_frame_group_guid_" + i).val();
|
||||
eva_limit_frame_employeeObject.employee_id = obj.find("#eva_limit_frame_employee_employee_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.org_id = obj.find("#eva_limit_frame_employee_org_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.position_id = obj.find("#eva_limit_frame_employee_position_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.level_id = obj.find("#eva_limit_frame_employee_level_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.salary = obj.find("#eva_limit_frame_employee_salary_" + i).val();
|
||||
eva_limit_frame_employeeObject.position_allowance = obj.find("#eva_limit_frame_employee_position_allowance_" + i).val();
|
||||
eva_limit_frame_employeeObject.monthly_remuneration = obj.find("#eva_limit_frame_employee_monthly_remuneration_" + i).val();
|
||||
|
||||
eva_limit_frame_employeeObject.active_mode = obj.find("#isActive_" + i + "_eva_limit_frame_employee").val();
|
||||
return eva_limit_frame_employeeObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetAllData() {
|
||||
//Insert eva_limit_frame_employee List
|
||||
var eva_limit_frame_employee = [];
|
||||
$('#eva_limit_frame_employeeBody tr').each(function () {
|
||||
var i = $(this).find("#rowCount").text();
|
||||
var eacheva_limit_frame_employee = eva_limit_frame_employee_GetFromForm($(this), i);
|
||||
eva_limit_frame_employee.push(eacheva_limit_frame_employee);
|
||||
});
|
||||
return eva_limit_frame_employee;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Save(id) {
|
||||
//Insert eva_limit_frame_employee List
|
||||
var eva_limit_frame_employee = eva_limit_frame_employee_GetAllData();
|
||||
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess("ปรับปรุงข้อมูลเรียบร้อยแล้ว");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + '/api/eva_limit_frame_employee/UpdateMultiple', eva_limit_frame_employee, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Get(id, blankItem) {
|
||||
|
||||
$('#eva_limit_frame_employeeBody').empty();
|
||||
|
||||
var successFunc = function (response) {
|
||||
//console.log(response);
|
||||
$.each(response, function (i, data) {
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_employee" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_employee_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_org_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_position_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_level_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_employee_Removeeva_limit_frame_employee(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_employee_Restoreeva_limit_frame_employee(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
$('#eva_limit_frame_employeeBody').append($(tag));
|
||||
eva_limit_frame_employee_FeedDataToForm(data, (i + 1), blankItem);
|
||||
});
|
||||
eva_limit_frame_employee_Summary();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee", successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByframe_group_guid/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByemployee_id/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByorg_id/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByposition_id/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListBylevel_id/' + a, successFunc, AlertDanger);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Add() {
|
||||
var successFunc = function (result) {
|
||||
var i = $("#eva_limit_frame_employeeBody tr").length;
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_employee" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_employee_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_org_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_position_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_level_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_employee_Removeeva_limit_frame_employee(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_employee_Restoreeva_limit_frame_employee(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
|
||||
$('#eva_limit_frame_employeeBody').append($(tag));
|
||||
eva_limit_frame_employee_ClearForm(i + 1, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Removeeva_limit_frame_employee(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการลบ?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', true);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '0.5' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#restoreBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("0");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_employee_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Restoreeva_limit_frame_employee(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการกู้คืน?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', false);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '1' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#removeBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("1");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_employee_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Summary() {
|
||||
var sum = 0;
|
||||
$(".input_score").each(function () {
|
||||
sum += +$(this).val();
|
||||
});
|
||||
$("#score_label").text("ผลรวม: " + sum);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_InitialForm(id) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_Get(id, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
var eva_limit_frame_employee_API = "/api/eva_limit_frame_employee/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_GetSearchParameter(fileType) {
|
||||
var eva_limit_frame_employeeSearchObject = new Object();
|
||||
eva_limit_frame_employeeSearchObject.frame_group_guid = $("#s_eva_limit_frame_employee_frame_group_guid").val();
|
||||
eva_limit_frame_employeeSearchObject.employee_id = $("#s_eva_limit_frame_employee_employee_id").val();
|
||||
|
||||
|
||||
eva_limit_frame_employeeSearchObject.fileType = fileType;
|
||||
|
||||
console.log(eva_limit_frame_employeeSearchObject);
|
||||
|
||||
return eva_limit_frame_employeeSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_eva_limit_frame_employee_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function eva_limit_frame_employee_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_eva_limit_frame_employee', s_eva_limit_frame_employee_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(eva_limit_frame_employee_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/eva_limit_frame_employee/eva_limit_frame_employee_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);
|
||||
}
|
||||
}
|
||||
|
||||
234
wwwroot/js/eva_limit_frame_group/eva_limit_frame_group.js
Normal file
234
wwwroot/js/eva_limit_frame_group/eva_limit_frame_group.js
Normal file
@@ -0,0 +1,234 @@
|
||||
var eva_limit_frame_group_editMode = "CREATE";
|
||||
var eva_limit_frame_group_API = "/api/eva_limit_frame_group/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_group_GetSearchParameter() {
|
||||
var eva_limit_frame_groupSearchObject = new Object();
|
||||
eva_limit_frame_groupSearchObject.frame_plan_guid = getUrlParameter("id");
|
||||
eva_limit_frame_groupSearchObject.group_guid = $("#s_eva_limit_frame_group_group_guid").val();
|
||||
|
||||
return eva_limit_frame_groupSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_group_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_group_id").val(data.id);
|
||||
$("#eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
$("#eva_limit_frame_group_limit_frame_295").val(data.limit_frame_295);
|
||||
$("#eva_limit_frame_group_total_salary").val(data.total_salary);
|
||||
$("#eva_limit_frame_group_total_salary_limit").val(data.total_salary_limit);
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded").val(data.total_salary_limit_rounded);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GetFromForm() {
|
||||
var eva_limit_frame_groupObject = new Object();
|
||||
eva_limit_frame_groupObject.id = $("#eva_limit_frame_group_id").val();
|
||||
eva_limit_frame_groupObject.frame_plan_guid = getUrlParameter("id");
|
||||
eva_limit_frame_groupObject.group_guid = $("#eva_limit_frame_group_group_guid").val();
|
||||
eva_limit_frame_groupObject.limit_frame_295 = $("#eva_limit_frame_group_limit_frame_295").val();
|
||||
eva_limit_frame_groupObject.total_salary = $("#eva_limit_frame_group_total_salary").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit = $("#eva_limit_frame_group_total_salary_limit").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit_rounded = $("#eva_limit_frame_group_total_salary_limit_rounded").val();
|
||||
|
||||
|
||||
return eva_limit_frame_groupObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_group_FeedDataToForm(result);
|
||||
eva_limit_frame_group_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_limit_frame_groupModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_group_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_limit_frame_group_GoCreate() {
|
||||
// Incase model popup
|
||||
eva_limit_frame_group_SetCreateForm(true);
|
||||
|
||||
// Incase open new page
|
||||
//window_open(appsite + "/eva_limit_frame_groupView/eva_limit_frame_group_d");
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GoEdit(a) {
|
||||
// Incase model popup
|
||||
//eva_limit_frame_group_SetEditForm(a);
|
||||
|
||||
// Incase open new page
|
||||
window_open(appsite + "/eva_limit_frame_groupView/eva_limit_frame_group_d?id=" + a);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_group_editMode = "UPDATE";
|
||||
eva_limit_frame_group_FeedDataToForm(result);
|
||||
$("#eva_limit_frame_groupModel").modal("show");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_group_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_SetCreateForm(s) {
|
||||
eva_limit_frame_group_editMode = "CREATE";
|
||||
eva_limit_frame_group_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_RefreshTable() {
|
||||
// Incase model popup
|
||||
eva_limit_frame_group_DoSearch();
|
||||
|
||||
// Incase open new page
|
||||
//window.parent.eva_limit_frame_group_DoSearch();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_limit_frame_group_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_limit_frame_group_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_group', eva_limit_frame_group_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = eva_limit_frame_group_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_limit_frame_group_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
$("#eva_limit_frame_groupModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_group_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_group_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
$("#eva_limit_frame_groupModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_group_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_group_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
$("#eva_limit_frame_groupModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_group_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_group_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var eva_limit_frame_groupTableV;
|
||||
|
||||
var eva_limit_frame_group_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
eva_limit_frame_groupTableV = $('#eva_limit_frame_groupTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
//"select": {
|
||||
// "style": 'multi'
|
||||
//},
|
||||
"columns": [
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "id" },
|
||||
{ "data": "frame_plan_guid_eva_limit_frame_plan_executed_date" },
|
||||
{ "data": "group_guid_eva_evaluation_group_code" },
|
||||
{ "data": "limit_frame_295" },
|
||||
{ "data": "total_salary" },
|
||||
{ "data": "total_salary_limit" },
|
||||
{ "data": "total_salary_limit_rounded" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0, //1,
|
||||
"data": "id",
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_limit_frame_group_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_limit_frame_group_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
},
|
||||
//{
|
||||
// targets: 0,
|
||||
// data: "",
|
||||
// defaultContent: '',
|
||||
// orderable: false,
|
||||
// className: 'select-checkbox'
|
||||
//}
|
||||
],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_limit_frame_group_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_group_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/GetListBySearch?" + p, eva_limit_frame_group_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_DoSearch() {
|
||||
var p = $.param(eva_limit_frame_group_GetSearchParameter());
|
||||
var eva_limit_frame_group_reload = function (result) {
|
||||
eva_limit_frame_groupTableV.destroy();
|
||||
eva_limit_frame_group_setupTable(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/GetListBySearch?" + p, eva_limit_frame_group_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GetSelect(f) {
|
||||
var eva_limit_frame_group_selectitem = [];
|
||||
$.each(eva_limit_frame_groupTableV.rows('.selected').data(), function (key, value) {
|
||||
eva_limit_frame_group_selectitem.push(value[f]);
|
||||
});
|
||||
alert(eva_limit_frame_group_selectitem);
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
|
||||
108
wwwroot/js/eva_limit_frame_group/eva_limit_frame_group_d.js
Normal file
108
wwwroot/js/eva_limit_frame_group/eva_limit_frame_group_d.js
Normal file
@@ -0,0 +1,108 @@
|
||||
var eva_limit_frame_group_editMode = "CREATE";
|
||||
var eva_limit_frame_group_API = "/api/eva_limit_frame_group/";
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_group_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_group_id").val(data.id);
|
||||
$("#eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
$("#eva_limit_frame_group_limit_frame_295").val(data.limit_frame_295);
|
||||
$("#eva_limit_frame_group_total_salary").val(data.total_salary);
|
||||
$("#eva_limit_frame_group_total_salary_limit").val(data.total_salary_limit);
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded").val(data.total_salary_limit_rounded);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GetFromForm() {
|
||||
var eva_limit_frame_groupObject = new Object();
|
||||
eva_limit_frame_groupObject.id = $("#eva_limit_frame_group_id").val();
|
||||
eva_limit_frame_groupObject.frame_plan_guid = $("#eva_limit_frame_group_frame_plan_guid").val();
|
||||
eva_limit_frame_groupObject.group_guid = $("#eva_limit_frame_group_group_guid").val();
|
||||
eva_limit_frame_groupObject.limit_frame_295 = $("#eva_limit_frame_group_limit_frame_295").val();
|
||||
eva_limit_frame_groupObject.total_salary = $("#eva_limit_frame_group_total_salary").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit = $("#eva_limit_frame_group_total_salary_limit").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit_rounded = $("#eva_limit_frame_group_total_salary_limit_rounded").val();
|
||||
|
||||
|
||||
return eva_limit_frame_groupObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_group_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_group_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_limit_frame_group_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_group_editMode = "UPDATE";
|
||||
eva_limit_frame_group_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_group_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_SetCreateForm() {
|
||||
eva_limit_frame_group_editMode = "CREATE";
|
||||
eva_limit_frame_group_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_limit_frame_group_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_limit_frame_group_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_group', eva_limit_frame_group_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = eva_limit_frame_group_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_limit_frame_group_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_group_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_group_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบ ' + a + ' ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_group_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_group_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
152
wwwroot/js/eva_limit_frame_group/eva_limit_frame_group_inline.js
Normal file
152
wwwroot/js/eva_limit_frame_group/eva_limit_frame_group_inline.js
Normal file
@@ -0,0 +1,152 @@
|
||||
function eva_limit_frame_group_ClearForm(i, blankItem) {
|
||||
var data = blankItem;
|
||||
$("#eva_limit_frame_group_id_" + i).val("");
|
||||
$("#eva_limit_frame_group_frame_plan_guid_" + i).val("");
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_group_group_guid_" + i), blankItem, "id", "code", "item_group_guid", data.group_guid);
|
||||
$("#eva_limit_frame_group_limit_frame_295_" + i).val("");
|
||||
$("#eva_limit_frame_group_total_salary_" + i).val("");
|
||||
$("#eva_limit_frame_group_total_salary_limit_" + i).val("");
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded_" + i).val("");
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_FeedDataToForm(data, i, blankItem) {
|
||||
$("#eva_limit_frame_group_id_" + i).val(data.id);
|
||||
$("#eva_limit_frame_group_frame_plan_guid_" + i).val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_group_group_guid_" + i), blankItem, "id", "code", "item_group_guid", data.group_guid);
|
||||
$("#eva_limit_frame_group_limit_frame_295_" + i).val(data.limit_frame_295);
|
||||
$("#eva_limit_frame_group_total_salary_" + i).val(data.total_salary);
|
||||
$("#eva_limit_frame_group_total_salary_limit_" + i).val(data.total_salary_limit);
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded_" + i).val(data.total_salary_limit_rounded);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GetFromForm(obj, i) {
|
||||
var eva_limit_frame_groupObject = new Object();
|
||||
eva_limit_frame_groupObject.id = obj.find("#eva_limit_frame_group_id_" + i).val();
|
||||
eva_limit_frame_groupObject.frame_plan_guid = obj.find("#eva_limit_frame_group_frame_plan_guid_" + i).val();
|
||||
eva_limit_frame_groupObject.group_guid = obj.find("#eva_limit_frame_group_group_guid_" + i).val();
|
||||
eva_limit_frame_groupObject.limit_frame_295 = obj.find("#eva_limit_frame_group_limit_frame_295_" + i).val();
|
||||
eva_limit_frame_groupObject.total_salary = obj.find("#eva_limit_frame_group_total_salary_" + i).val();
|
||||
eva_limit_frame_groupObject.total_salary_limit = obj.find("#eva_limit_frame_group_total_salary_limit_" + i).val();
|
||||
eva_limit_frame_groupObject.total_salary_limit_rounded = obj.find("#eva_limit_frame_group_total_salary_limit_rounded_" + i).val();
|
||||
|
||||
eva_limit_frame_groupObject.active_mode = obj.find("#isActive_" + i + "_eva_limit_frame_group").val();
|
||||
return eva_limit_frame_groupObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GetAllData() {
|
||||
//Insert eva_limit_frame_group List
|
||||
var eva_limit_frame_group = [];
|
||||
$('#eva_limit_frame_groupBody tr').each(function () {
|
||||
var i = $(this).find("#rowCount").text();
|
||||
var eacheva_limit_frame_group = eva_limit_frame_group_GetFromForm($(this), i);
|
||||
eva_limit_frame_group.push(eacheva_limit_frame_group);
|
||||
});
|
||||
return eva_limit_frame_group;
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_Save(id) {
|
||||
//Insert eva_limit_frame_group List
|
||||
var eva_limit_frame_group = eva_limit_frame_group_GetAllData();
|
||||
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess("ปรับปรุงข้อมูลเรียบร้อยแล้ว");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + '/api/eva_limit_frame_group/UpdateMultiple', eva_limit_frame_group, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_Get(id, blankItem) {
|
||||
|
||||
$('#eva_limit_frame_groupBody').empty();
|
||||
|
||||
var successFunc = function (response) {
|
||||
//console.log(response);
|
||||
$.each(response, function (i, data) {
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_group" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_group_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_group_frame_plan_guid_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_group_group_guid_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_limit_frame_295_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_group_Removeeva_limit_frame_group(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_group_Restoreeva_limit_frame_group(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
$('#eva_limit_frame_groupBody').append($(tag));
|
||||
eva_limit_frame_group_FeedDataToForm(data, (i + 1), blankItem);
|
||||
});
|
||||
eva_limit_frame_group_Summary();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group", successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_group/GetListByframe_plan_guid/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_group/GetListBygroup_guid/' + a, successFunc, AlertDanger);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_Add() {
|
||||
var successFunc = function (result) {
|
||||
var i = $("#eva_limit_frame_groupBody tr").length;
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_group" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_group_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_group_frame_plan_guid_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_group_group_guid_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_limit_frame_295_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_group_Removeeva_limit_frame_group(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_group_Restoreeva_limit_frame_group(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
|
||||
$('#eva_limit_frame_groupBody').append($(tag));
|
||||
eva_limit_frame_group_ClearForm(i + 1, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_Removeeva_limit_frame_group(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการลบ?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', true);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '0.5' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#restoreBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("0");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_group_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_Restoreeva_limit_frame_group(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการกู้คืน?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', false);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '1' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#removeBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("1");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_group_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_Summary() {
|
||||
var sum = 0;
|
||||
$(".input_score").each(function () {
|
||||
sum += +$(this).val();
|
||||
});
|
||||
$("#score_label").text("ผลรวม: " + sum);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_InitialForm(id) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_group_Get(id, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
var eva_limit_frame_group_API = "/api/eva_limit_frame_group/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_group_GetSearchParameter(fileType) {
|
||||
var eva_limit_frame_groupSearchObject = new Object();
|
||||
eva_limit_frame_groupSearchObject.frame_plan_guid = $("#s_eva_limit_frame_group_frame_plan_guid").val();
|
||||
eva_limit_frame_groupSearchObject.group_guid = $("#s_eva_limit_frame_group_group_guid").val();
|
||||
|
||||
|
||||
eva_limit_frame_groupSearchObject.fileType = fileType;
|
||||
|
||||
console.log(eva_limit_frame_groupSearchObject);
|
||||
|
||||
return eva_limit_frame_groupSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_group_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_group_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_group_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_eva_limit_frame_group_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function eva_limit_frame_group_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_eva_limit_frame_group', s_eva_limit_frame_group_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(eva_limit_frame_group_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/eva_limit_frame_group/eva_limit_frame_group_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);
|
||||
}
|
||||
}
|
||||
|
||||
243
wwwroot/js/eva_limit_frame_plan/eva_limit_frame_plan.js
Normal file
243
wwwroot/js/eva_limit_frame_plan/eva_limit_frame_plan.js
Normal file
@@ -0,0 +1,243 @@
|
||||
var eva_limit_frame_plan_editMode = "CREATE";
|
||||
var eva_limit_frame_plan_API = "/api/eva_limit_frame_plan/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_plan_GetSearchParameter() {
|
||||
var eva_limit_frame_planSearchObject = new Object();
|
||||
eva_limit_frame_planSearchObject.executed_date = formatDateForGetParameter(getDate($("#s_eva_limit_frame_plan_executed_date").val()));
|
||||
|
||||
return eva_limit_frame_planSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_plan_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_plan_id").val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_plan_guid"), data, "id", "fiscal_year", "item_plan_guid", data.plan_guid);
|
||||
$("#eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005").val(data.limit_frame_005);
|
||||
$("#eva_limit_frame_plan_status_self").val(data.status_self);
|
||||
$("#eva_limit_frame_plan_status_chief").val(data.status_chief);
|
||||
$("#eva_limit_frame_plan_supervisor1").val(data.supervisor1);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result"), data, "id", "external_name", "item_supervisor1_result", data.supervisor1_result);
|
||||
$("#eva_limit_frame_plan_supervisor1_remark").val(data.supervisor1_remark);
|
||||
$("#eva_limit_frame_plan_supervisor1_date").val(formatDate(data.supervisor1_date));
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date").val(formatDate(data.salary_adjustment_date));
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GetFromForm() {
|
||||
var eva_limit_frame_planObject = new Object();
|
||||
eva_limit_frame_planObject.id = $("#eva_limit_frame_plan_id").val();
|
||||
eva_limit_frame_planObject.plan_guid = $("#eva_limit_frame_plan_plan_guid").val();
|
||||
eva_limit_frame_planObject.executed_date = getDate($("#eva_limit_frame_plan_executed_date").val());
|
||||
eva_limit_frame_planObject.limit_frame_005 = $("#eva_limit_frame_plan_limit_frame_005").val();
|
||||
eva_limit_frame_planObject.status_self = $("#eva_limit_frame_plan_status_self").val();
|
||||
eva_limit_frame_planObject.status_chief = $("#eva_limit_frame_plan_status_chief").val();
|
||||
eva_limit_frame_planObject.supervisor1 = $("#eva_limit_frame_plan_supervisor1").val();
|
||||
eva_limit_frame_planObject.supervisor1_result = $("#eva_limit_frame_plan_supervisor1_result").val();
|
||||
eva_limit_frame_planObject.supervisor1_remark = $("#eva_limit_frame_plan_supervisor1_remark").val();
|
||||
eva_limit_frame_planObject.supervisor1_date = getDate($("#eva_limit_frame_plan_supervisor1_date").val());
|
||||
eva_limit_frame_planObject.salary_adjustment_date = getDate($("#eva_limit_frame_plan_salary_adjustment_date").val());
|
||||
|
||||
|
||||
return eva_limit_frame_planObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_plan_FeedDataToForm(result);
|
||||
eva_limit_frame_plan_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_limit_frame_planModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_plan_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_limit_frame_plan_GoCreate() {
|
||||
// Incase model popup
|
||||
eva_limit_frame_plan_SetCreateForm(true);
|
||||
|
||||
// Incase open new page
|
||||
//window_open(appsite + "/eva_limit_frame_planView/eva_limit_frame_plan_d");
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GoEdit(a) {
|
||||
// Incase model popup
|
||||
//eva_limit_frame_plan_SetEditForm(a);
|
||||
|
||||
// Incase open new page
|
||||
window_open(appsite + "/eva_limit_frame_planView/eva_limit_frame_plan_d?id=" + a);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_plan_editMode = "UPDATE";
|
||||
eva_limit_frame_plan_FeedDataToForm(result);
|
||||
$("#eva_limit_frame_planModel").modal("show");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_plan_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_SetCreateForm(s) {
|
||||
eva_limit_frame_plan_editMode = "CREATE";
|
||||
eva_limit_frame_plan_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_RefreshTable() {
|
||||
// Incase model popup
|
||||
eva_limit_frame_plan_DoSearch();
|
||||
|
||||
// Incase open new page
|
||||
//window.parent.eva_limit_frame_plan_DoSearch();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_limit_frame_plan_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_limit_frame_plan_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_plan', eva_limit_frame_plan_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = eva_limit_frame_plan_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_limit_frame_plan_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
$("#eva_limit_frame_planModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_plan_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_plan_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
$("#eva_limit_frame_planModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_plan_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_plan_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
$("#eva_limit_frame_planModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
eva_limit_frame_plan_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_plan_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var eva_limit_frame_planTableV;
|
||||
|
||||
var eva_limit_frame_plan_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
eva_limit_frame_planTableV = $('#eva_limit_frame_planTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
//"select": {
|
||||
// "style": 'multi'
|
||||
//},
|
||||
"columns": [
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "plan_guid_eva_performance_plan_fiscal_year" },
|
||||
{ "data": "txt_executed_date" },
|
||||
{ "data": "limit_frame_005" },
|
||||
{ "data": "status_self" },
|
||||
{ "data": "status_chief" },
|
||||
{ "data": "supervisor1" },
|
||||
{ "data": "supervisor1_result_external_linkage_external_name" },
|
||||
{ "data": "supervisor1_remark" },
|
||||
{ "data": "txt_supervisor1_date" },
|
||||
{ "data": "txt_salary_adjustment_date" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0, //1,
|
||||
"data": "id",
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_limit_frame_plan_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_limit_frame_plan_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
},
|
||||
//{
|
||||
// targets: 0,
|
||||
// data: "",
|
||||
// defaultContent: '',
|
||||
// orderable: false,
|
||||
// className: 'select-checkbox'
|
||||
//}
|
||||
],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_limit_frame_plan_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_plan_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/GetListBySearch?" + p, eva_limit_frame_plan_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_DoSearch() {
|
||||
var p = $.param(eva_limit_frame_plan_GetSearchParameter());
|
||||
var eva_limit_frame_plan_reload = function (result) {
|
||||
eva_limit_frame_planTableV.destroy();
|
||||
eva_limit_frame_plan_setupTable(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/GetListBySearch?" + p, eva_limit_frame_plan_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GetSelect(f) {
|
||||
var eva_limit_frame_plan_selectitem = [];
|
||||
$.each(eva_limit_frame_planTableV.rows('.selected').data(), function (key, value) {
|
||||
eva_limit_frame_plan_selectitem.push(value[f]);
|
||||
});
|
||||
alert(eva_limit_frame_plan_selectitem);
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
|
||||
116
wwwroot/js/eva_limit_frame_plan/eva_limit_frame_plan_d.js
Normal file
116
wwwroot/js/eva_limit_frame_plan/eva_limit_frame_plan_d.js
Normal file
@@ -0,0 +1,116 @@
|
||||
var eva_limit_frame_plan_editMode = "CREATE";
|
||||
var eva_limit_frame_plan_API = "/api/eva_limit_frame_plan/";
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_plan_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_plan_id").val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_plan_guid"), data, "id", "fiscal_year", "item_plan_guid", data.plan_guid);
|
||||
$("#eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005").val(data.limit_frame_005);
|
||||
$("#eva_limit_frame_plan_status_self").val(data.status_self);
|
||||
$("#eva_limit_frame_plan_status_chief").val(data.status_chief);
|
||||
$("#eva_limit_frame_plan_supervisor1").val(data.supervisor1);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result"), data, "id", "external_name", "item_supervisor1_result", data.supervisor1_result);
|
||||
$("#eva_limit_frame_plan_supervisor1_remark").val(data.supervisor1_remark);
|
||||
$("#eva_limit_frame_plan_supervisor1_date").val(formatDate(data.supervisor1_date));
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date").val(formatDate(data.salary_adjustment_date));
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GetFromForm() {
|
||||
var eva_limit_frame_planObject = new Object();
|
||||
eva_limit_frame_planObject.id = $("#eva_limit_frame_plan_id").val();
|
||||
eva_limit_frame_planObject.plan_guid = $("#eva_limit_frame_plan_plan_guid").val();
|
||||
eva_limit_frame_planObject.executed_date = getDate($("#eva_limit_frame_plan_executed_date").val());
|
||||
eva_limit_frame_planObject.limit_frame_005 = $("#eva_limit_frame_plan_limit_frame_005").val();
|
||||
eva_limit_frame_planObject.status_self = $("#eva_limit_frame_plan_status_self").val();
|
||||
eva_limit_frame_planObject.status_chief = $("#eva_limit_frame_plan_status_chief").val();
|
||||
eva_limit_frame_planObject.supervisor1 = $("#eva_limit_frame_plan_supervisor1").val();
|
||||
eva_limit_frame_planObject.supervisor1_result = $("#eva_limit_frame_plan_supervisor1_result").val();
|
||||
eva_limit_frame_planObject.supervisor1_remark = $("#eva_limit_frame_plan_supervisor1_remark").val();
|
||||
eva_limit_frame_planObject.supervisor1_date = getDate($("#eva_limit_frame_plan_supervisor1_date").val());
|
||||
eva_limit_frame_planObject.salary_adjustment_date = getDate($("#eva_limit_frame_plan_salary_adjustment_date").val());
|
||||
|
||||
|
||||
return eva_limit_frame_planObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_plan_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_plan_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_limit_frame_plan_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_plan_editMode = "UPDATE";
|
||||
eva_limit_frame_plan_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_plan_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_SetCreateForm() {
|
||||
eva_limit_frame_plan_editMode = "CREATE";
|
||||
eva_limit_frame_plan_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_limit_frame_plan_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_limit_frame_plan_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_plan', eva_limit_frame_plan_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = eva_limit_frame_plan_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_limit_frame_plan_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_plan_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_plan_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบ ' + a + ' ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_plan_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_plan_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
168
wwwroot/js/eva_limit_frame_plan/eva_limit_frame_plan_inline.js
Normal file
168
wwwroot/js/eva_limit_frame_plan/eva_limit_frame_plan_inline.js
Normal file
@@ -0,0 +1,168 @@
|
||||
function eva_limit_frame_plan_ClearForm(i, blankItem) {
|
||||
var data = blankItem;
|
||||
$("#eva_limit_frame_plan_id_" + i).val("");
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_plan_guid_" + i), blankItem, "id", "fiscal_year", "item_plan_guid", data.plan_guid);
|
||||
$("#eva_limit_frame_plan_executed_date_" + i).val("");
|
||||
$("#eva_limit_frame_plan_limit_frame_005_" + i).val("");
|
||||
$("#eva_limit_frame_plan_status_self_" + i).val("");
|
||||
$("#eva_limit_frame_plan_status_chief_" + i).val("");
|
||||
$("#eva_limit_frame_plan_supervisor1_" + i).val("");
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result_" + i), blankItem, "id", "external_name", "item_supervisor1_result", data.supervisor1_result);
|
||||
$("#eva_limit_frame_plan_supervisor1_remark_" + i).val("");
|
||||
$("#eva_limit_frame_plan_supervisor1_date_" + i).val("");
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date_" + i).val("");
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_FeedDataToForm(data, i, blankItem) {
|
||||
$("#eva_limit_frame_plan_id_" + i).val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_plan_guid_" + i), blankItem, "id", "fiscal_year", "item_plan_guid", data.plan_guid);
|
||||
$("#eva_limit_frame_plan_executed_date_" + i).val(formatDate(data.executed_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005_" + i).val(data.limit_frame_005);
|
||||
$("#eva_limit_frame_plan_status_self_" + i).val(data.status_self);
|
||||
$("#eva_limit_frame_plan_status_chief_" + i).val(data.status_chief);
|
||||
$("#eva_limit_frame_plan_supervisor1_" + i).val(data.supervisor1);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result_" + i), blankItem, "id", "external_name", "item_supervisor1_result", data.supervisor1_result);
|
||||
$("#eva_limit_frame_plan_supervisor1_remark_" + i).val(data.supervisor1_remark);
|
||||
$("#eva_limit_frame_plan_supervisor1_date_" + i).val(formatDate(data.supervisor1_date));
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date_" + i).val(formatDate(data.salary_adjustment_date));
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GetFromForm(obj, i) {
|
||||
var eva_limit_frame_planObject = new Object();
|
||||
eva_limit_frame_planObject.id = obj.find("#eva_limit_frame_plan_id_" + i).val();
|
||||
eva_limit_frame_planObject.plan_guid = obj.find("#eva_limit_frame_plan_plan_guid_" + i).val();
|
||||
eva_limit_frame_planObject.executed_date = getDate(obj.find("#eva_limit_frame_plan_executed_date_" + i).val());
|
||||
eva_limit_frame_planObject.limit_frame_005 = obj.find("#eva_limit_frame_plan_limit_frame_005_" + i).val();
|
||||
eva_limit_frame_planObject.status_self = obj.find("#eva_limit_frame_plan_status_self_" + i).val();
|
||||
eva_limit_frame_planObject.status_chief = obj.find("#eva_limit_frame_plan_status_chief_" + i).val();
|
||||
eva_limit_frame_planObject.supervisor1 = obj.find("#eva_limit_frame_plan_supervisor1_" + i).val();
|
||||
eva_limit_frame_planObject.supervisor1_result = obj.find("#eva_limit_frame_plan_supervisor1_result_" + i).val();
|
||||
eva_limit_frame_planObject.supervisor1_remark = obj.find("#eva_limit_frame_plan_supervisor1_remark_" + i).val();
|
||||
eva_limit_frame_planObject.supervisor1_date = getDate(obj.find("#eva_limit_frame_plan_supervisor1_date_" + i).val());
|
||||
eva_limit_frame_planObject.salary_adjustment_date = getDate(obj.find("#eva_limit_frame_plan_salary_adjustment_date_" + i).val());
|
||||
|
||||
eva_limit_frame_planObject.active_mode = obj.find("#isActive_" + i + "_eva_limit_frame_plan").val();
|
||||
return eva_limit_frame_planObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GetAllData() {
|
||||
//Insert eva_limit_frame_plan List
|
||||
var eva_limit_frame_plan = [];
|
||||
$('#eva_limit_frame_planBody tr').each(function () {
|
||||
var i = $(this).find("#rowCount").text();
|
||||
var eacheva_limit_frame_plan = eva_limit_frame_plan_GetFromForm($(this), i);
|
||||
eva_limit_frame_plan.push(eacheva_limit_frame_plan);
|
||||
});
|
||||
return eva_limit_frame_plan;
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_Save(id) {
|
||||
//Insert eva_limit_frame_plan List
|
||||
var eva_limit_frame_plan = eva_limit_frame_plan_GetAllData();
|
||||
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess("ปรับปรุงข้อมูลเรียบร้อยแล้ว");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + '/api/eva_limit_frame_plan/UpdateMultiple', eva_limit_frame_plan, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_Get(id, blankItem) {
|
||||
|
||||
$('#eva_limit_frame_planBody').empty();
|
||||
|
||||
var successFunc = function (response) {
|
||||
//console.log(response);
|
||||
$.each(response, function (i, data) {
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_plan" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_status_self_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_status_chief_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_supervisor1_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_plan_plan_guid_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_executed_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_plan_supervisor1_result_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><textarea class="form-control" rows="2" cols="25" id="eva_limit_frame_plan_supervisor1_remark_' + (i + 1)+'" ></textarea></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_supervisor1_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_salary_adjustment_date_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_plan_Removeeva_limit_frame_plan(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_plan_Restoreeva_limit_frame_plan(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
$('#eva_limit_frame_planBody').append($(tag));
|
||||
eva_limit_frame_plan_FeedDataToForm(data, (i + 1), blankItem);
|
||||
});
|
||||
eva_limit_frame_plan_Summary();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan", successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_plan/GetListByplan_guid/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_plan/GetListBysupervisor1_result/' + a, successFunc, AlertDanger);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_Add() {
|
||||
var successFunc = function (result) {
|
||||
var i = $("#eva_limit_frame_planBody tr").length;
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_plan" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_status_self_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_status_chief_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_plan_supervisor1_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_plan_plan_guid_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_executed_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_plan_supervisor1_result_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><textarea class="form-control" rows="2" cols="25" id="eva_limit_frame_plan_supervisor1_remark_' + (i + 1)+'" ></textarea></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_supervisor1_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_salary_adjustment_date_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_plan_Removeeva_limit_frame_plan(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_plan_Restoreeva_limit_frame_plan(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
|
||||
$('#eva_limit_frame_planBody').append($(tag));
|
||||
eva_limit_frame_plan_ClearForm(i + 1, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_Removeeva_limit_frame_plan(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการลบ?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', true);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '0.5' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#restoreBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("0");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_plan_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_Restoreeva_limit_frame_plan(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการกู้คืน?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', false);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '1' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#removeBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("1");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_plan_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_Summary() {
|
||||
var sum = 0;
|
||||
$(".input_score").each(function () {
|
||||
sum += +$(this).val();
|
||||
});
|
||||
$("#score_label").text("ผลรวม: " + sum);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_InitialForm(id) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_plan_Get(id, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
var eva_limit_frame_plan_API = "/api/eva_limit_frame_plan/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_plan_GetSearchParameter(fileType) {
|
||||
var eva_limit_frame_planSearchObject = new Object();
|
||||
eva_limit_frame_planSearchObject.executed_date = formatDateForGetParameter(getDate($("#s_eva_limit_frame_plan_executed_date").val()));
|
||||
|
||||
|
||||
eva_limit_frame_planSearchObject.fileType = fileType;
|
||||
|
||||
console.log(eva_limit_frame_planSearchObject);
|
||||
|
||||
return eva_limit_frame_planSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_plan_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_plan_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_plan_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_eva_limit_frame_plan_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function eva_limit_frame_plan_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_eva_limit_frame_plan', s_eva_limit_frame_plan_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(eva_limit_frame_plan_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/eva_limit_frame_plan/eva_limit_frame_plan_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);
|
||||
}
|
||||
}
|
||||
|
||||
1
wwwroot/json/notifications.json
Normal file
1
wwwroot/json/notifications.json
Normal file
File diff suppressed because one or more lines are too long
1
wwwroot/json/notifications_blank.json
Normal file
1
wwwroot/json/notifications_blank.json
Normal file
@@ -0,0 +1 @@
|
||||
{"unread":[],"readed":[]}
|
||||
Reference in New Issue
Block a user