รวม code ส่งเข้า ZD
This commit is contained in:
@@ -0,0 +1,355 @@
|
||||
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;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
//[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/eva_create_evaluation_detail_review03")]
|
||||
public class eva_create_evaluation_detail_review03Controller : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<eva_create_evaluation_detail_review03Controller> _logger;
|
||||
private Ieva_create_evaluation_detail_review03Service _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_create_evaluation_detail_review03Controller(ILogger<eva_create_evaluation_detail_review03Controller> logger, Ieva_create_evaluation_detail_review03Service 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_create_evaluation_detail_review03WithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Get(int 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, $"Exception in IActionResult Get. {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_create_evaluation_detail_review03WithSelectionViewModel), 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, $"Exception in IActionResult GetBlankItem. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list items by create_evaluation_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_create_evaluation_detail_review03ViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetList(int? create_evaluation_id)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListBycreate_evaluation_id(create_evaluation_id));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetList.", ex);
|
||||
return StatusCode(500, $"Exception in IActionResult GetList. {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_create_evaluation_detail_review03ViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetListBySearch(eva_create_evaluation_detail_review03SearchModel 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, $"Exception in IActionResult GetListBySearch. {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_create_evaluation_detail_review03_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_review03_report(eva_create_evaluation_detail_review03ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_review03_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
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, $"Exception while GetReport. {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_create_evaluation_detail_review03InputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Insert(model);
|
||||
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, $"Exception while insert. {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(int id, [FromBody] eva_create_evaluation_detail_review03InputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Update(id, model);
|
||||
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, $"Exception while update {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(int 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, $"Exception while delete {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_create_evaluation_detail_review03InputModel> model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
string rowCount = _repository.UpdateMultiple(model);
|
||||
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, $"Exception while UpdateMultiple. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
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;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
//[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/eva_create_evaluation_detail_review04")]
|
||||
public class eva_create_evaluation_detail_review04Controller : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<eva_create_evaluation_detail_review04Controller> _logger;
|
||||
private Ieva_create_evaluation_detail_review04Service _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_create_evaluation_detail_review04Controller(ILogger<eva_create_evaluation_detail_review04Controller> logger, Ieva_create_evaluation_detail_review04Service 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_create_evaluation_detail_review04WithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Get(int 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, $"Exception in IActionResult Get. {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_create_evaluation_detail_review04WithSelectionViewModel), 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, $"Exception in IActionResult GetBlankItem. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list items by create_evaluation_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_create_evaluation_detail_review04ViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetList(int? create_evaluation_id)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListBycreate_evaluation_id(create_evaluation_id));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetList.", ex);
|
||||
return StatusCode(500, $"Exception in IActionResult GetList. {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_create_evaluation_detail_review04ViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetListBySearch(eva_create_evaluation_detail_review04SearchModel 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, $"Exception in IActionResult GetListBySearch. {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_create_evaluation_detail_review04_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_review04_report(eva_create_evaluation_detail_review04ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_review04_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
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, $"Exception while GetReport. {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_create_evaluation_detail_review04InputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Insert(model);
|
||||
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, $"Exception while insert. {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(int id, [FromBody] eva_create_evaluation_detail_review04InputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Update(id, model);
|
||||
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, $"Exception while update {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(int 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, $"Exception while delete {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_create_evaluation_detail_review04InputModel> model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
string rowCount = _repository.UpdateMultiple(model);
|
||||
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, $"Exception while UpdateMultiple. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
355
ApiControllers/eva_level_score_basicControllers.cs
Normal file
355
ApiControllers/eva_level_score_basicControllers.cs
Normal file
@@ -0,0 +1,355 @@
|
||||
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;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
//[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/eva_level_score_basic")]
|
||||
public class eva_level_score_basicController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<eva_level_score_basicController> _logger;
|
||||
private Ieva_level_score_basicService _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_level_score_basicController(ILogger<eva_level_score_basicController> logger, Ieva_level_score_basicService 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_level_score_basicWithSelectionViewModel), 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, $"Exception in IActionResult Get. {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_level_score_basicWithSelectionViewModel), 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, $"Exception in IActionResult GetBlankItem. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list items by code
|
||||
/// </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_level_score_basicViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetList(string code)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
return Ok(_repository.GetListBycode(code));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetList.", ex);
|
||||
return StatusCode(500, $"Exception in IActionResult GetList. {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_level_score_basicViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetListBySearch(eva_level_score_basicSearchModel 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, $"Exception in IActionResult GetListBySearch. {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_level_score_basic_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_level_score_basic_report(eva_level_score_basicReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_level_score_basic_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
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, $"Exception while GetReport. {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_level_score_basicInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Insert(model);
|
||||
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, $"Exception while insert. {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_level_score_basicInputModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.Update(id, model);
|
||||
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, $"Exception while update {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, $"Exception while delete {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_level_score_basicInputModel> model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
string rowCount = _repository.UpdateMultiple(model);
|
||||
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, $"Exception while UpdateMultiple. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
EXCEL/eva_level_score@eva_level_score_basic.xlsx
Normal file
BIN
EXCEL/eva_level_score@eva_level_score_basic.xlsx
Normal file
Binary file not shown.
574
Migrations/25630229053829_NewSuperVisor.Designer.cs
generated
Normal file
574
Migrations/25630229053829_NewSuperVisor.Designer.cs
generated
Normal file
@@ -0,0 +1,574 @@
|
||||
// <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("25630229053829_NewSuperVisor")]
|
||||
partial class NewSuperVisor
|
||||
{
|
||||
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(100);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
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<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<decimal?>("middle");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
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_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
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<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.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<int?>("supervisor2");
|
||||
|
||||
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_supervisor");
|
||||
|
||||
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?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
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?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
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_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_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_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
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Migrations/25630229053829_NewSuperVisor.cs
Normal file
31
Migrations/25630229053829_NewSuperVisor.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class NewSuperVisor : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "supervisor1_id",
|
||||
table: "eva_create_evaluation",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "supervisor2_id",
|
||||
table: "eva_create_evaluation",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor1_id",
|
||||
table: "eva_create_evaluation");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor2_id",
|
||||
table: "eva_create_evaluation");
|
||||
}
|
||||
}
|
||||
}
|
||||
594
Migrations/25630229074424_AddSuperVisorAB.Designer.cs
generated
Normal file
594
Migrations/25630229074424_AddSuperVisorAB.Designer.cs
generated
Normal file
@@ -0,0 +1,594 @@
|
||||
// <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("25630229074424_AddSuperVisorAB")]
|
||||
partial class AddSuperVisorAB
|
||||
{
|
||||
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(100);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
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<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<decimal?>("middle");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
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_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
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<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
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_supervisor");
|
||||
|
||||
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?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
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?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
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_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_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_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
|
||||
}
|
||||
}
|
||||
}
|
||||
90
Migrations/25630229074424_AddSuperVisorAB.cs
Normal file
90
Migrations/25630229074424_AddSuperVisorAB.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddSuperVisorAB : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "supervisor1A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "supervisor1A_date",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "supervisor1A_remark",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1000,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "supervisor1A_result",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "supervisor2A",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "supervisor2A_date",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "supervisor2A_remark",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1000,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "supervisor2A_result",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor1A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor1A_date",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor1A_remark",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor1A_result",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor2A",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor2A_date",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor2A_remark",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "supervisor2A_result",
|
||||
table: "eva_create_evaluation_detail");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,6 +123,10 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
@@ -185,6 +189,16 @@ namespace tb320eva.Migrations
|
||||
|
||||
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")
|
||||
@@ -195,6 +209,16 @@ namespace tb320eva.Migrations
|
||||
|
||||
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")
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_create_evaluationEntity : BaseEntity2<int>
|
||||
{
|
||||
|
||||
|
||||
[ForeignKey("performance_plan_id")]
|
||||
public eva_performance_planEntity eva_performance_plan { get; set; }
|
||||
public Guid? performance_plan_id { get; set; }
|
||||
@@ -27,7 +29,11 @@ namespace TodoAPI2.Models
|
||||
[ForeignKey("evaluation_group_id")]
|
||||
public eva_evaluation_groupEntity eva_evaluation_group { get; set; }
|
||||
public Guid? evaluation_group_id { get; set; }
|
||||
|
||||
public int? supervisor1_id { get; set; }
|
||||
|
||||
public int? supervisor2_id { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public Guid? evaluation_group_id { get; set; }
|
||||
|
||||
public int? supervisor1_id { get; set; }
|
||||
|
||||
public int? supervisor2_id { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,22 +64,28 @@ namespace TodoAPI2.Models
|
||||
}
|
||||
public eva_create_evaluationWithSelectionViewModel GetWithSelection(int id)
|
||||
{
|
||||
var all_emp = emp.GetListByemployee_type(null, null);
|
||||
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_create_evaluationWithSelectionViewModel>(entity);
|
||||
i.item_performance_plan_id = (from x in _repository.Context.eva_performance_plan select x).ToList();
|
||||
i.item_employee_id = emp.GetListByemployee_type(null, null);
|
||||
i.item_employee_id = all_emp;
|
||||
i.item_evaluation_group_id = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
||||
|
||||
i.item_supervisor1_id = all_emp;
|
||||
i.item_supervisor2_id = all_emp;
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_create_evaluationWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var all_emp = emp.GetListByemployee_type(null, null);
|
||||
|
||||
var i = new eva_create_evaluationWithSelectionViewModel();
|
||||
i.item_performance_plan_id = (from x in _repository.Context.eva_performance_plan select x).ToList();
|
||||
i.item_employee_id = emp.GetListByemployee_type(null, null);
|
||||
i.item_employee_id = all_emp;
|
||||
i.item_evaluation_group_id = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
||||
|
||||
i.item_supervisor1_id = all_emp;
|
||||
i.item_supervisor2_id = all_emp;
|
||||
|
||||
return i;
|
||||
}
|
||||
@@ -93,6 +99,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public List<eva_create_evaluationViewModel> GetListBySearch(eva_create_evaluationSearchModel model)
|
||||
{
|
||||
var all_emp = emp.GetListByemployee_type(null, null);
|
||||
|
||||
var data = (
|
||||
from m_eva_create_evaluation in _repository.Context.eva_create_evaluation
|
||||
|
||||
@@ -100,7 +108,7 @@ namespace TodoAPI2.Models
|
||||
into eva_performance_planResult1
|
||||
from fk_eva_performance_planResult1 in eva_performance_planResult1.DefaultIfEmpty()
|
||||
|
||||
join fk_external_linkage2 in emp.GetListByemployee_type(null,null) on m_eva_create_evaluation.employee_id equals fk_external_linkage2.id
|
||||
join fk_external_linkage2 in all_emp on m_eva_create_evaluation.employee_id equals fk_external_linkage2.id
|
||||
into external_linkageResult2
|
||||
from fk_external_linkageResult2 in external_linkageResult2.DefaultIfEmpty()
|
||||
|
||||
@@ -108,8 +116,15 @@ namespace TodoAPI2.Models
|
||||
into eva_evaluation_groupResult5
|
||||
from fk_eva_evaluation_groupResult5 in eva_evaluation_groupResult5.DefaultIfEmpty()
|
||||
|
||||
join fk_external_linkage6 in all_emp on m_eva_create_evaluation.supervisor1_id equals fk_external_linkage6.id
|
||||
into external_linkageResult6
|
||||
from fk_external_linkageResult6 in external_linkageResult6.DefaultIfEmpty()
|
||||
|
||||
where 1==1
|
||||
join fk_external_linkage7 in all_emp on m_eva_create_evaluation.supervisor2_id equals fk_external_linkage7.id
|
||||
into external_linkageResult7
|
||||
from fk_external_linkageResult7 in external_linkageResult7.DefaultIfEmpty()
|
||||
|
||||
where 1==1
|
||||
&& (m_eva_create_evaluation.performance_plan_id == model.performance_plan_id || !model.performance_plan_id.HasValue)
|
||||
&& (m_eva_create_evaluation.evaluation_group_id == model.evaluation_group_id || !model.evaluation_group_id.HasValue)
|
||||
|
||||
@@ -123,10 +138,14 @@ namespace TodoAPI2.Models
|
||||
score1 = m_eva_create_evaluation.score1,
|
||||
score2 = m_eva_create_evaluation.score2,
|
||||
evaluation_group_id = m_eva_create_evaluation.evaluation_group_id,
|
||||
supervisor1_id = m_eva_create_evaluation.supervisor1_id,
|
||||
supervisor2_id = m_eva_create_evaluation.supervisor2_id,
|
||||
|
||||
performance_plan_id_eva_performance_plan_fiscal_year = fk_eva_performance_planResult1.fiscal_year,
|
||||
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
|
||||
evaluation_group_id_eva_evaluation_group_code = fk_eva_evaluation_groupResult5.thegroup,
|
||||
evaluation_group_id_eva_evaluation_group_code = fk_eva_evaluation_groupResult5.code,
|
||||
supervisor1_id_external_linkage_external_name = fk_external_linkageResult6.fullname,
|
||||
supervisor2_id_external_linkage_external_name = fk_external_linkageResult7.fullname,
|
||||
|
||||
isActive = m_eva_create_evaluation.isActive,
|
||||
Created = m_eva_create_evaluation.created,
|
||||
@@ -180,6 +199,8 @@ namespace TodoAPI2.Models
|
||||
existingEntity.score1 = model.score1;
|
||||
existingEntity.score2 = model.score2;
|
||||
existingEntity.evaluation_group_id = model.evaluation_group_id;
|
||||
existingEntity.supervisor1_id = model.supervisor1_id;
|
||||
existingEntity.supervisor2_id = model.supervisor2_id;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
@@ -198,11 +219,13 @@ namespace TodoAPI2.Models
|
||||
var existingEntity = _repository.Get(i.id.Value);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.performance_plan_id = i.performance_plan_id;
|
||||
existingEntity.employee_id = i.employee_id;
|
||||
existingEntity.score1 = i.score1;
|
||||
existingEntity.score2 = i.score2;
|
||||
existingEntity.evaluation_group_id = i.evaluation_group_id;
|
||||
existingEntity.performance_plan_id = i.performance_plan_id;
|
||||
existingEntity.employee_id = i.employee_id;
|
||||
existingEntity.score1 = i.score1;
|
||||
existingEntity.score2 = i.score2;
|
||||
existingEntity.evaluation_group_id = i.evaluation_group_id;
|
||||
existingEntity.supervisor1_id = i.supervisor1_id;
|
||||
existingEntity.supervisor2_id = i.supervisor2_id;
|
||||
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
|
||||
@@ -24,9 +24,15 @@ namespace TodoAPI2.Models
|
||||
|
||||
public Guid? evaluation_group_id { get; set; }
|
||||
|
||||
public int? supervisor1_id { get; set; }
|
||||
|
||||
public int? supervisor2_id { get; set; }
|
||||
|
||||
public int? performance_plan_id_eva_performance_plan_fiscal_year { get; set; }
|
||||
public string employee_id_external_linkage_external_name { get; set; }
|
||||
public string evaluation_group_id_eva_evaluation_group_code { get; set; }
|
||||
public string supervisor1_id_external_linkage_external_name { get; set; }
|
||||
public string supervisor2_id_external_linkage_external_name { get; set; }
|
||||
|
||||
public string description
|
||||
{
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace TodoAPI2.Models
|
||||
public List<eva_performance_planEntity> item_performance_plan_id { get; set; }
|
||||
public List<external_employeeViewModel> item_employee_id { get; set; }
|
||||
public List<eva_evaluation_groupEntity> item_evaluation_group_id { get; set; }
|
||||
public List<external_employeeViewModel> item_supervisor1_id { get; set; }
|
||||
public List<external_employeeViewModel> item_supervisor2_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -85,6 +85,24 @@ namespace TodoAPI2.Models
|
||||
[MaxLength(1)]
|
||||
public string status_supervisor { get; set; }
|
||||
|
||||
public int? supervisor1A { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string supervisor1A_result { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string supervisor1A_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor1A_date { get; set; }
|
||||
|
||||
public int? supervisor2A { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string supervisor2A_result { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string supervisor2A_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor2A_date { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
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_create_evaluation_detail_review03Service : IBaseService<int, eva_create_evaluation_detail_review03InputModel, eva_create_evaluation_detail_review03ViewModel>
|
||||
{
|
||||
new eva_create_evaluation_detail_review03ViewModel Insert(eva_create_evaluation_detail_review03InputModel model);
|
||||
new eva_create_evaluation_detail_review03ViewModel Update(int id, eva_create_evaluation_detail_review03InputModel model);
|
||||
List<eva_create_evaluation_detail_review03ViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id);
|
||||
List<eva_create_evaluation_detail_review03ViewModel> GetListBySearch(eva_create_evaluation_detail_review03SearchModel model);
|
||||
|
||||
string UpdateMultiple(List<eva_create_evaluation_detail_review03InputModel> model);
|
||||
eva_create_evaluation_detail_review03WithSelectionViewModel GetWithSelection(int id);
|
||||
eva_create_evaluation_detail_review03WithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
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_create_evaluation_detail_review03InputModel
|
||||
{
|
||||
|
||||
public int? id { get; set; }
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? supervisor1A { get; set; }
|
||||
|
||||
public string supervisor1A_result { get; set; }
|
||||
|
||||
public string supervisor1A_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor1A_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_create_evaluation_detail_review03ReportRequestModel : eva_create_evaluation_detail_review03SearchModel
|
||||
{
|
||||
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_create_evaluation_detail_review03SearchModel
|
||||
{
|
||||
|
||||
public int id { get; set; }
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
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_create_evaluation_detail_review03Service : Ieva_create_evaluation_detail_review03Service
|
||||
{
|
||||
private IBaseRepository2<eva_create_evaluation_detailEntity, int> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_create_evaluation_detail_review03Service(IBaseRepository2<eva_create_evaluation_detailEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
private eva_create_evaluation_detailEntity GetEntity(eva_create_evaluation_detail_review03InputModel model)
|
||||
{
|
||||
return Mapper.Map<eva_create_evaluation_detailEntity>(model);
|
||||
}
|
||||
private List<eva_create_evaluation_detailEntity> GetEntityList(List<eva_create_evaluation_detail_review03InputModel> models)
|
||||
{
|
||||
return Mapper.Map<List<eva_create_evaluation_detailEntity>>(models);
|
||||
}
|
||||
private eva_create_evaluation_detail_review03ViewModel GetDto(eva_create_evaluation_detailEntity entity)
|
||||
{
|
||||
return Mapper.Map<eva_create_evaluation_detail_review03ViewModel>(entity);
|
||||
}
|
||||
private List<eva_create_evaluation_detail_review03ViewModel> GetDtoList(List<eva_create_evaluation_detailEntity> entities)
|
||||
{
|
||||
return Mapper.Map<List<eva_create_evaluation_detail_review03ViewModel>>(entities);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
#region Query Functions
|
||||
|
||||
public eva_create_evaluation_detail_review03ViewModel Get(int id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return GetDto(entity);
|
||||
}
|
||||
public eva_create_evaluation_detail_review03WithSelectionViewModel GetWithSelection(int id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_create_evaluation_detail_review03WithSelectionViewModel>(entity);
|
||||
i.item_supervisor1A_result = (from x in ext.GetAgreeDisagree() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_create_evaluation_detail_review03WithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_create_evaluation_detail_review03WithSelectionViewModel();
|
||||
i.item_supervisor1A_result = (from x in ext.GetAgreeDisagree() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public List<eva_create_evaluation_detail_review03ViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id)
|
||||
{
|
||||
var model = new eva_create_evaluation_detail_review03SearchModel();
|
||||
model.create_evaluation_id = create_evaluation_id;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_create_evaluation_detail_review03ViewModel> GetListBySearch(eva_create_evaluation_detail_review03SearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_create_evaluation_detail_review03 in _repository.Context.eva_create_evaluation_detail
|
||||
|
||||
join fk_external_linkage3 in ext.GetAgreeDisagree() on m_eva_create_evaluation_detail_review03.supervisor1A_result equals fk_external_linkage3.external_code
|
||||
into external_linkageResult3
|
||||
from fk_external_linkageResult3 in external_linkageResult3.DefaultIfEmpty()
|
||||
|
||||
|
||||
where 1==1
|
||||
//&& (m_eva_create_evaluation_detail_review03.id == model.id || !model.id.HasValue)
|
||||
&& (m_eva_create_evaluation_detail_review03.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
||||
|
||||
|
||||
orderby m_eva_create_evaluation_detail_review03.created descending
|
||||
select new eva_create_evaluation_detail_review03ViewModel()
|
||||
{
|
||||
id = m_eva_create_evaluation_detail_review03.id,
|
||||
create_evaluation_id = m_eva_create_evaluation_detail_review03.create_evaluation_id,
|
||||
supervisor1A = m_eva_create_evaluation_detail_review03.supervisor1A,
|
||||
supervisor1A_result = m_eva_create_evaluation_detail_review03.supervisor1A_result,
|
||||
supervisor1A_remark = m_eva_create_evaluation_detail_review03.supervisor1A_remark,
|
||||
supervisor1A_date = m_eva_create_evaluation_detail_review03.supervisor1A_date,
|
||||
|
||||
supervisor1A_result_external_linkage_external_name = fk_external_linkageResult3.external_name,
|
||||
|
||||
isActive = m_eva_create_evaluation_detail_review03.isActive,
|
||||
Created = m_eva_create_evaluation_detail_review03.created,
|
||||
Updated = m_eva_create_evaluation_detail_review03.updated
|
||||
}
|
||||
).Take(100).ToList();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Manipulation Functions
|
||||
|
||||
public int GetNewPrimaryKey()
|
||||
{
|
||||
int? newkey = 0;
|
||||
|
||||
var x = (from i in _repository.Context.eva_create_evaluation_detail
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
|
||||
if(x.Count > 0)
|
||||
{
|
||||
newkey = x[0].id + 1;
|
||||
}
|
||||
|
||||
return newkey.Value;
|
||||
}
|
||||
|
||||
public eva_create_evaluation_detail_review03ViewModel Insert(eva_create_evaluation_detail_review03InputModel model)
|
||||
{
|
||||
var entity = GetEntity(model);
|
||||
entity.id = GetNewPrimaryKey();
|
||||
|
||||
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
public eva_create_evaluation_detail_review03ViewModel Update(int id, eva_create_evaluation_detail_review03InputModel model)
|
||||
{
|
||||
var existingEntity = _repository.Get(id);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||
existingEntity.supervisor1A = model.supervisor1A;
|
||||
existingEntity.supervisor1A_result = model.supervisor1A_result;
|
||||
existingEntity.supervisor1A_remark = model.supervisor1A_remark;
|
||||
existingEntity.supervisor1A_date = model.supervisor1A_date;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_create_evaluation_detail_review03InputModel> model)
|
||||
{
|
||||
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.create_evaluation_id = i.create_evaluation_id;
|
||||
existingEntity.supervisor1A = i.supervisor1A;
|
||||
existingEntity.supervisor1A_result = i.supervisor1A_result;
|
||||
existingEntity.supervisor1A_remark = i.supervisor1A_remark;
|
||||
existingEntity.supervisor1A_date = i.supervisor1A_date;
|
||||
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
}
|
||||
else if (i.active_mode == "1" && !i.id.HasValue) // add
|
||||
{
|
||||
var entity = GetEntity(i);
|
||||
entity.id = GetNewPrimaryKey();
|
||||
_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
|
||||
}
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
public eva_create_evaluation_detail_review03ViewModel SetAsActive(int id)
|
||||
{
|
||||
var updated = _repository.SetAsActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public eva_create_evaluation_detail_review03ViewModel SetAsInactive(int id)
|
||||
{
|
||||
var updated = _repository.SetAsInActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public void Delete(int id)
|
||||
{
|
||||
_repository.Delete(id);
|
||||
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Match Item
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
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_create_evaluation_detail_review03ViewModel : BaseViewModel2<int>
|
||||
{
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? supervisor1A { get; set; }
|
||||
|
||||
public string supervisor1A_result { get; set; }
|
||||
|
||||
public string supervisor1A_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor1A_date { get; set; }
|
||||
|
||||
public string txt_supervisor1A_date { get { return MyHelper.GetDateStringForReport(this.supervisor1A_date); } }
|
||||
|
||||
public string supervisor1A_result_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_create_evaluation_detail_review03WithSelectionViewModel: eva_create_evaluation_detail_review03ViewModel
|
||||
{
|
||||
public List<external_linkageViewModel> item_supervisor1A_result { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
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_create_evaluation_detail_review04Service : IBaseService<int, eva_create_evaluation_detail_review04InputModel, eva_create_evaluation_detail_review04ViewModel>
|
||||
{
|
||||
new eva_create_evaluation_detail_review04ViewModel Insert(eva_create_evaluation_detail_review04InputModel model);
|
||||
new eva_create_evaluation_detail_review04ViewModel Update(int id, eva_create_evaluation_detail_review04InputModel model);
|
||||
List<eva_create_evaluation_detail_review04ViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id);
|
||||
List<eva_create_evaluation_detail_review04ViewModel> GetListBySearch(eva_create_evaluation_detail_review04SearchModel model);
|
||||
|
||||
string UpdateMultiple(List<eva_create_evaluation_detail_review04InputModel> model);
|
||||
eva_create_evaluation_detail_review04WithSelectionViewModel GetWithSelection(int id);
|
||||
eva_create_evaluation_detail_review04WithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
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_create_evaluation_detail_review04InputModel
|
||||
{
|
||||
|
||||
public int? id { get; set; }
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? supervisor2A { get; set; }
|
||||
|
||||
public string supervisor2A_result { get; set; }
|
||||
|
||||
public string supervisor2A_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor2A_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_create_evaluation_detail_review04ReportRequestModel : eva_create_evaluation_detail_review04SearchModel
|
||||
{
|
||||
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_create_evaluation_detail_review04SearchModel
|
||||
{
|
||||
|
||||
public int id { get; set; }
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
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_create_evaluation_detail_review04Service : Ieva_create_evaluation_detail_review04Service
|
||||
{
|
||||
private IBaseRepository2<eva_create_evaluation_detailEntity, int> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_create_evaluation_detail_review04Service(IBaseRepository2<eva_create_evaluation_detailEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
private eva_create_evaluation_detailEntity GetEntity(eva_create_evaluation_detail_review04InputModel model)
|
||||
{
|
||||
return Mapper.Map<eva_create_evaluation_detailEntity>(model);
|
||||
}
|
||||
private List<eva_create_evaluation_detailEntity> GetEntityList(List<eva_create_evaluation_detail_review04InputModel> models)
|
||||
{
|
||||
return Mapper.Map<List<eva_create_evaluation_detailEntity>>(models);
|
||||
}
|
||||
private eva_create_evaluation_detail_review04ViewModel GetDto(eva_create_evaluation_detailEntity entity)
|
||||
{
|
||||
return Mapper.Map<eva_create_evaluation_detail_review04ViewModel>(entity);
|
||||
}
|
||||
private List<eva_create_evaluation_detail_review04ViewModel> GetDtoList(List<eva_create_evaluation_detailEntity> entities)
|
||||
{
|
||||
return Mapper.Map<List<eva_create_evaluation_detail_review04ViewModel>>(entities);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
#region Query Functions
|
||||
|
||||
public eva_create_evaluation_detail_review04ViewModel Get(int id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return GetDto(entity);
|
||||
}
|
||||
public eva_create_evaluation_detail_review04WithSelectionViewModel GetWithSelection(int id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_create_evaluation_detail_review04WithSelectionViewModel>(entity);
|
||||
i.item_supervisor2A_result = (from x in ext.GetAgreeDisagree() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_create_evaluation_detail_review04WithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_create_evaluation_detail_review04WithSelectionViewModel();
|
||||
i.item_supervisor2A_result = (from x in ext.GetAgreeDisagree() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public List<eva_create_evaluation_detail_review04ViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id)
|
||||
{
|
||||
var model = new eva_create_evaluation_detail_review04SearchModel();
|
||||
model.create_evaluation_id = create_evaluation_id;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_create_evaluation_detail_review04ViewModel> GetListBySearch(eva_create_evaluation_detail_review04SearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_create_evaluation_detail_review04 in _repository.Context.eva_create_evaluation_detail
|
||||
|
||||
join fk_external_linkage3 in ext.GetAgreeDisagree() on m_eva_create_evaluation_detail_review04.supervisor2A_result equals fk_external_linkage3.external_code
|
||||
into external_linkageResult3
|
||||
from fk_external_linkageResult3 in external_linkageResult3.DefaultIfEmpty()
|
||||
|
||||
|
||||
where 1==1
|
||||
//&& (m_eva_create_evaluation_detail_review04.id == model.id || !model.id.HasValue)
|
||||
&& (m_eva_create_evaluation_detail_review04.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
||||
|
||||
|
||||
orderby m_eva_create_evaluation_detail_review04.created descending
|
||||
select new eva_create_evaluation_detail_review04ViewModel()
|
||||
{
|
||||
id = m_eva_create_evaluation_detail_review04.id,
|
||||
create_evaluation_id = m_eva_create_evaluation_detail_review04.create_evaluation_id,
|
||||
supervisor2A = m_eva_create_evaluation_detail_review04.supervisor2A,
|
||||
supervisor2A_result = m_eva_create_evaluation_detail_review04.supervisor2A_result,
|
||||
supervisor2A_remark = m_eva_create_evaluation_detail_review04.supervisor2A_remark,
|
||||
supervisor2A_date = m_eva_create_evaluation_detail_review04.supervisor2A_date,
|
||||
|
||||
supervisor2A_result_external_linkage_external_name = fk_external_linkageResult3.external_name,
|
||||
|
||||
isActive = m_eva_create_evaluation_detail_review04.isActive,
|
||||
Created = m_eva_create_evaluation_detail_review04.created,
|
||||
Updated = m_eva_create_evaluation_detail_review04.updated
|
||||
}
|
||||
).Take(100).ToList();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Manipulation Functions
|
||||
|
||||
public int GetNewPrimaryKey()
|
||||
{
|
||||
int? newkey = 0;
|
||||
|
||||
var x = (from i in _repository.Context.eva_create_evaluation_detail
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
|
||||
if(x.Count > 0)
|
||||
{
|
||||
newkey = x[0].id + 1;
|
||||
}
|
||||
|
||||
return newkey.Value;
|
||||
}
|
||||
|
||||
public eva_create_evaluation_detail_review04ViewModel Insert(eva_create_evaluation_detail_review04InputModel model)
|
||||
{
|
||||
var entity = GetEntity(model);
|
||||
entity.id = GetNewPrimaryKey();
|
||||
|
||||
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
public eva_create_evaluation_detail_review04ViewModel Update(int id, eva_create_evaluation_detail_review04InputModel model)
|
||||
{
|
||||
var existingEntity = _repository.Get(id);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||
existingEntity.supervisor2A = model.supervisor2A;
|
||||
existingEntity.supervisor2A_result = model.supervisor2A_result;
|
||||
existingEntity.supervisor2A_remark = model.supervisor2A_remark;
|
||||
existingEntity.supervisor2A_date = model.supervisor2A_date;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_create_evaluation_detail_review04InputModel> model)
|
||||
{
|
||||
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.create_evaluation_id = i.create_evaluation_id;
|
||||
existingEntity.supervisor2A = i.supervisor2A;
|
||||
existingEntity.supervisor2A_result = i.supervisor2A_result;
|
||||
existingEntity.supervisor2A_remark = i.supervisor2A_remark;
|
||||
existingEntity.supervisor2A_date = i.supervisor2A_date;
|
||||
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
}
|
||||
else if (i.active_mode == "1" && !i.id.HasValue) // add
|
||||
{
|
||||
var entity = GetEntity(i);
|
||||
entity.id = GetNewPrimaryKey();
|
||||
_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
|
||||
}
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
public eva_create_evaluation_detail_review04ViewModel SetAsActive(int id)
|
||||
{
|
||||
var updated = _repository.SetAsActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public eva_create_evaluation_detail_review04ViewModel SetAsInactive(int id)
|
||||
{
|
||||
var updated = _repository.SetAsInActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public void Delete(int id)
|
||||
{
|
||||
_repository.Delete(id);
|
||||
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Match Item
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
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_create_evaluation_detail_review04ViewModel : BaseViewModel2<int>
|
||||
{
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? supervisor2A { get; set; }
|
||||
|
||||
public string supervisor2A_result { get; set; }
|
||||
|
||||
public string supervisor2A_remark { get; set; }
|
||||
|
||||
public DateTime? supervisor2A_date { get; set; }
|
||||
|
||||
public string txt_supervisor2A_date { get { return MyHelper.GetDateStringForReport(this.supervisor2A_date); } }
|
||||
|
||||
public string supervisor2A_result_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_create_evaluation_detail_review04WithSelectionViewModel: eva_create_evaluation_detail_review04ViewModel
|
||||
{
|
||||
public List<external_linkageViewModel> item_supervisor2A_result { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,16 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string thefile { get; set; }
|
||||
|
||||
public string target_score1 { get; set; }
|
||||
|
||||
public string target_score2 { get; set; }
|
||||
|
||||
public string target_score3 { get; set; }
|
||||
|
||||
public string target_score4 { get; set; }
|
||||
|
||||
public string target_score5 { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ namespace TodoAPI2.Models
|
||||
public class eva_evaluation_achievementService : Ieva_evaluation_achievementService
|
||||
{
|
||||
private IBaseRepository2<eva_evaluation_achievementEntity, int> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_evaluation_achievementService(IBaseRepository2<eva_evaluation_achievementEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
@@ -47,7 +47,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
return Mapper.Map<List<eva_evaluation_achievementViewModel>>(entities);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
@@ -77,12 +77,12 @@ namespace TodoAPI2.Models
|
||||
|
||||
public List<eva_evaluation_achievementViewModel> GetListBycreate_evaluation_detail_id(int? create_evaluation_detail_id)
|
||||
{
|
||||
var model = new eva_evaluation_achievementSearchModel();
|
||||
var model = new eva_evaluation_achievementSearchModel();
|
||||
model.create_evaluation_detail_id = create_evaluation_detail_id;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_evaluation_achievementViewModel> GetListBySearch(eva_evaluation_achievementSearchModel model)
|
||||
public List<eva_evaluation_achievementViewModel> GetListBySearch(eva_evaluation_achievementSearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_evaluation_achievement in _repository.Context.eva_evaluation_achievement
|
||||
@@ -92,11 +92,11 @@ namespace TodoAPI2.Models
|
||||
from fk_eva_create_evaluation_detailResult1 in eva_create_evaluation_detailResult1.DefaultIfEmpty()
|
||||
|
||||
|
||||
where 1==1
|
||||
where 1 == 1
|
||||
&& (m_eva_evaluation_achievement.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue)
|
||||
|
||||
|
||||
orderby m_eva_evaluation_achievement.achievement
|
||||
orderby m_eva_evaluation_achievement.achievement
|
||||
select new eva_evaluation_achievementViewModel()
|
||||
{
|
||||
id = m_eva_evaluation_achievement.id,
|
||||
@@ -108,6 +108,12 @@ namespace TodoAPI2.Models
|
||||
|
||||
create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id = fk_eva_create_evaluation_detailResult1.create_evaluation_id,
|
||||
|
||||
target_score1 = m_eva_evaluation_achievement.target_score1,
|
||||
target_score2 = m_eva_evaluation_achievement.target_score2,
|
||||
target_score3 = m_eva_evaluation_achievement.target_score3,
|
||||
target_score4 = m_eva_evaluation_achievement.target_score4,
|
||||
target_score5 = m_eva_evaluation_achievement.target_score5,
|
||||
|
||||
isActive = m_eva_evaluation_achievement.isActive,
|
||||
Created = m_eva_evaluation_achievement.created,
|
||||
Updated = m_eva_evaluation_achievement.updated
|
||||
@@ -126,10 +132,10 @@ namespace TodoAPI2.Models
|
||||
int? newkey = 0;
|
||||
|
||||
var x = (from i in _repository.Context.eva_evaluation_achievement
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
|
||||
if(x.Count > 0)
|
||||
if (x.Count > 0)
|
||||
{
|
||||
newkey = x[0].id + 1;
|
||||
}
|
||||
@@ -143,6 +149,7 @@ namespace TodoAPI2.Models
|
||||
entity.id = GetNewPrimaryKey();
|
||||
|
||||
var current_sum = (from i in _repository.Context.eva_evaluation_achievement
|
||||
where i.create_evaluation_detail_id == model.create_evaluation_detail_id
|
||||
select i.weight).Sum();
|
||||
|
||||
if (current_sum + model.weight > 100)
|
||||
@@ -159,17 +166,18 @@ namespace TodoAPI2.Models
|
||||
}
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
public eva_evaluation_achievementViewModel Update(int id, eva_evaluation_achievementInputModel model)
|
||||
{
|
||||
var current_sum = (from i in _repository.Context.eva_evaluation_achievement
|
||||
where i.create_evaluation_detail_id == model.create_evaluation_detail_id
|
||||
select i.weight).Sum();
|
||||
|
||||
var current_item_weight = (from i in _repository.Context.eva_evaluation_achievement
|
||||
where i.id==id
|
||||
where i.id == id
|
||||
select i.weight).Sum();
|
||||
|
||||
if (current_sum - current_item_weight + model.weight > 100)
|
||||
@@ -185,61 +193,69 @@ namespace TodoAPI2.Models
|
||||
existingEntity.weight = model.weight;
|
||||
if (!string.IsNullOrEmpty(model.thefile))
|
||||
{
|
||||
if (model.thefile.StartsWith("Uploads"))
|
||||
{
|
||||
var thefileFileName = FileUtil.MoveTempUploadFileToActualPath(
|
||||
if (model.thefile.StartsWith("Uploads"))
|
||||
{
|
||||
var thefileFileName = FileUtil.MoveTempUploadFileToActualPath(
|
||||
model.thefile, FilePathConstant.DirType.FilesTestUpload, existingEntity.id, existingEntity.thefile);
|
||||
existingEntity.thefile = thefileFileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = model.thefile;
|
||||
}
|
||||
existingEntity.thefile = thefileFileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = model.thefile;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = null;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = null;
|
||||
}
|
||||
existingEntity.target_score1 = model.target_score1;
|
||||
existingEntity.target_score2 = model.target_score2;
|
||||
existingEntity.target_score3 = model.target_score3;
|
||||
existingEntity.target_score4 = model.target_score4;
|
||||
existingEntity.target_score5 = model.target_score5;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_evaluation_achievementInputModel> model)
|
||||
public string UpdateMultiple(List<eva_evaluation_achievementInputModel> model)
|
||||
{
|
||||
foreach(var i in model)
|
||||
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.create_evaluation_detail_id = i.create_evaluation_detail_id;
|
||||
existingEntity.achievement = i.achievement;
|
||||
existingEntity.weight = i.weight;
|
||||
if (!string.IsNullOrEmpty(i.thefile))
|
||||
{
|
||||
if (i.thefile.StartsWith("Uploads"))
|
||||
{
|
||||
var thefileFileName = FileUtil.MoveTempUploadFileToActualPath(
|
||||
i.thefile, FilePathConstant.DirType.FilesTestUpload, existingEntity.id, existingEntity.thefile);
|
||||
existingEntity.thefile = thefileFileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = i.thefile;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = null;
|
||||
}
|
||||
|
||||
existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
|
||||
existingEntity.achievement = i.achievement;
|
||||
existingEntity.weight = i.weight;
|
||||
if (!string.IsNullOrEmpty(i.thefile))
|
||||
{
|
||||
if (i.thefile.StartsWith("Uploads"))
|
||||
{
|
||||
var thefileFileName = FileUtil.MoveTempUploadFileToActualPath(
|
||||
i.thefile, FilePathConstant.DirType.FilesTestUpload, existingEntity.id, existingEntity.thefile);
|
||||
existingEntity.thefile = thefileFileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = i.thefile;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
existingEntity.thefile = null;
|
||||
}
|
||||
existingEntity.target_score1 = i.target_score1;
|
||||
existingEntity.target_score2 = i.target_score2;
|
||||
existingEntity.target_score3 = i.target_score3;
|
||||
existingEntity.target_score4 = i.target_score4;
|
||||
existingEntity.target_score5 = i.target_score5;
|
||||
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
@@ -252,15 +268,15 @@ namespace TodoAPI2.Models
|
||||
_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
|
||||
}
|
||||
}
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
_repository.Context.SaveChanges();
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
@@ -291,4 +307,6 @@ namespace TodoAPI2.Models
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,9 +30,19 @@ namespace TodoAPI2.Models
|
||||
return (string.IsNullOrEmpty(thefile) ? "" :
|
||||
$"<a href='../{thefileDisplay}' target='_blank'>{thefile}</a>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string target_score1 { get; set; }
|
||||
|
||||
public string target_score2 { get; set; }
|
||||
|
||||
public string target_score3 { get; set; }
|
||||
|
||||
public string target_score4 { get; set; }
|
||||
|
||||
public string target_score5 { get; set; }
|
||||
public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ namespace TodoAPI2.Models
|
||||
entity.id = GetNewPrimaryKey();
|
||||
|
||||
var current_sum = (from i in _repository.Context.eva_evaluation_behavior
|
||||
where i.create_evaluation_detail_id == model.create_evaluation_detail_id
|
||||
select i.weight).Sum();
|
||||
|
||||
if (current_sum + model.weight > 100)
|
||||
@@ -156,6 +157,7 @@ namespace TodoAPI2.Models
|
||||
public eva_evaluation_behaviorViewModel Update(int id, eva_evaluation_behaviorInputModel model)
|
||||
{
|
||||
var current_sum = (from i in _repository.Context.eva_evaluation_behavior
|
||||
where i.create_evaluation_detail_id == model.create_evaluation_detail_id
|
||||
select i.weight).Sum();
|
||||
|
||||
var current_item_weight = (from i in _repository.Context.eva_evaluation_behavior
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
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_level_score_basicService : IBaseService<Guid, eva_level_score_basicInputModel, eva_level_score_basicViewModel>
|
||||
{
|
||||
new eva_level_score_basicViewModel Insert(eva_level_score_basicInputModel model);
|
||||
new eva_level_score_basicViewModel Update(Guid id, eva_level_score_basicInputModel model);
|
||||
List<eva_level_score_basicViewModel> GetListBycode(string code);
|
||||
List<eva_level_score_basicViewModel> GetListBySearch(eva_level_score_basicSearchModel model);
|
||||
|
||||
string UpdateMultiple(List<eva_level_score_basicInputModel> model);
|
||||
eva_level_score_basicWithSelectionViewModel GetWithSelection(Guid id);
|
||||
eva_level_score_basicWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
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_level_score_basicInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public string code { get; set; }
|
||||
|
||||
public string detail { get; set; }
|
||||
|
||||
public decimal? max_score { get; set; }
|
||||
|
||||
public decimal? min_score { 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_level_score_basicReportRequestModel : eva_level_score_basicSearchModel
|
||||
{
|
||||
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_level_score_basicSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public string code { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
213
Models/eva_level_score_basic/eva_level_score_basicService.cs
Normal file
213
Models/eva_level_score_basic/eva_level_score_basicService.cs
Normal file
@@ -0,0 +1,213 @@
|
||||
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_level_score_basicService : Ieva_level_score_basicService
|
||||
{
|
||||
private IBaseRepository<eva_level_scoreEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_level_score_basicService(IBaseRepository<eva_level_scoreEntity, Guid> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
#region Private Functions
|
||||
private eva_level_scoreEntity GetEntity(eva_level_score_basicInputModel model)
|
||||
{
|
||||
return Mapper.Map<eva_level_scoreEntity>(model);
|
||||
}
|
||||
private List<eva_level_scoreEntity> GetEntityList(List<eva_level_score_basicInputModel> models)
|
||||
{
|
||||
return Mapper.Map<List<eva_level_scoreEntity>>(models);
|
||||
}
|
||||
private eva_level_score_basicViewModel GetDto(eva_level_scoreEntity entity)
|
||||
{
|
||||
return Mapper.Map<eva_level_score_basicViewModel>(entity);
|
||||
}
|
||||
private List<eva_level_score_basicViewModel> GetDtoList(List<eva_level_scoreEntity> entities)
|
||||
{
|
||||
return Mapper.Map<List<eva_level_score_basicViewModel>>(entities);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
#region Query Functions
|
||||
|
||||
public eva_level_score_basicViewModel Get(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
return GetDto(entity);
|
||||
}
|
||||
public eva_level_score_basicWithSelectionViewModel GetWithSelection(Guid id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_level_score_basicWithSelectionViewModel>(entity);
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_level_score_basicWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_level_score_basicWithSelectionViewModel();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public List<eva_level_score_basicViewModel> GetListBycode(string code)
|
||||
{
|
||||
var model = new eva_level_score_basicSearchModel();
|
||||
model.code = code;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_level_score_basicViewModel> GetListBySearch(eva_level_score_basicSearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_level_score_basic in _repository.Context.eva_level_score
|
||||
|
||||
|
||||
where 1==1
|
||||
//&& (m_eva_level_score_basic.id == model.id || !model.id.HasValue)
|
||||
&& (m_eva_level_score_basic.code == model.code || string.IsNullOrEmpty(model.code))
|
||||
|
||||
|
||||
orderby m_eva_level_score_basic.created descending
|
||||
select new eva_level_score_basicViewModel()
|
||||
{
|
||||
id = m_eva_level_score_basic.id,
|
||||
code = m_eva_level_score_basic.code,
|
||||
detail = m_eva_level_score_basic.detail,
|
||||
max_score = m_eva_level_score_basic.max_score,
|
||||
min_score = m_eva_level_score_basic.min_score,
|
||||
|
||||
|
||||
isActive = m_eva_level_score_basic.isActive,
|
||||
Created = m_eva_level_score_basic.created,
|
||||
Updated = m_eva_level_score_basic.updated
|
||||
}
|
||||
).Take(100).ToList();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Manipulation Functions
|
||||
|
||||
public eva_level_score_basicViewModel Insert(eva_level_score_basicInputModel model)
|
||||
{
|
||||
var entity = GetEntity(model);
|
||||
entity.id = Guid.NewGuid();
|
||||
|
||||
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
public eva_level_score_basicViewModel Update(Guid id, eva_level_score_basicInputModel model)
|
||||
{
|
||||
var existingEntity = _repository.Get(id);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
existingEntity.code = model.code;
|
||||
existingEntity.detail = model.detail;
|
||||
existingEntity.max_score = model.max_score;
|
||||
existingEntity.min_score = model.min_score;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_level_score_basicInputModel> model)
|
||||
{
|
||||
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.code = i.code;
|
||||
existingEntity.detail = i.detail;
|
||||
existingEntity.max_score = i.max_score;
|
||||
existingEntity.min_score = i.min_score;
|
||||
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
}
|
||||
else if (i.active_mode == "1" && !i.id.HasValue) // add
|
||||
{
|
||||
var entity = GetEntity(i);
|
||||
entity.id = Guid.NewGuid();
|
||||
_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
|
||||
}
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
public eva_level_score_basicViewModel SetAsActive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public eva_level_score_basicViewModel SetAsInactive(Guid id)
|
||||
{
|
||||
var updated = _repository.SetAsInActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public void Delete(Guid id)
|
||||
{
|
||||
_repository.Delete(id);
|
||||
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Match Item
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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_level_score_basicViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public string code { get; set; }
|
||||
|
||||
public string detail { get; set; }
|
||||
|
||||
public decimal? max_score { get; set; }
|
||||
|
||||
public decimal? min_score { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_level_score_basicWithSelectionViewModel: eva_level_score_basicViewModel
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
17
Startup.cs
17
Startup.cs
@@ -268,6 +268,12 @@ namespace Test01
|
||||
|
||||
services.AddScoped<Ieva_adjust_postponement_detail_quota_02Service, eva_adjust_postponement_detail_quota_02Service>();
|
||||
|
||||
services.AddScoped<Ieva_create_evaluation_detail_review03Service, eva_create_evaluation_detail_review03Service>();
|
||||
|
||||
services.AddScoped<Ieva_create_evaluation_detail_review04Service, eva_create_evaluation_detail_review04Service>();
|
||||
|
||||
services.AddScoped<Ieva_level_score_basicService, eva_level_score_basicService>();
|
||||
|
||||
#endregion
|
||||
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
@@ -459,6 +465,17 @@ namespace Test01
|
||||
cfg.CreateMap<eva_adjust_postponement_detailEntity, eva_adjust_postponement_detail_quota_02ViewModel>();
|
||||
cfg.CreateMap<eva_adjust_postponement_detailEntity, eva_adjust_postponement_detail_quota_02WithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<eva_create_evaluation_detail_review03InputModel, eva_create_evaluation_detailEntity>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review03ViewModel>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review03WithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<eva_create_evaluation_detail_review04InputModel, eva_create_evaluation_detailEntity>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review04ViewModel>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review04WithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<eva_level_score_basicInputModel, eva_level_scoreEntity>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, eva_level_score_basicViewModel>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, eva_level_score_basicWithSelectionViewModel>();
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
49
ViewControllers/eva_level_score_basicViewControllers.cs
Normal file
49
ViewControllers/eva_level_score_basicViewControllers.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
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_level_score_basicViewController : Controller
|
||||
{
|
||||
private ILogger<eva_level_score_basicController> _logger;
|
||||
private Ieva_level_score_basicService _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_level_score_basicViewController(ILogger<eva_level_score_basicController> logger, Ieva_level_score_basicService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IActionResult eva_level_score_basic()
|
||||
{
|
||||
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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,15 +34,28 @@
|
||||
<select class="form-control" id="eva_create_evaluation_employee_id" iLabel="ผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_supervisor1_id" for="eva_create_evaluation_supervisor1_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง </label>
|
||||
<select class="form-control" id="eva_create_evaluation_supervisor1_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง " iRequire="true" iGroup="eva_create_evaluation"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_supervisor2_id" for="eva_create_evaluation_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
||||
<select class="form-control" id="eva_create_evaluation_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="true" iGroup="eva_create_evaluation"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_score1" for="eva_create_evaluation_score1">คะเเนนส่วนที่1 ผลสำเร็จของงาน</label>
|
||||
<input class="form-control" type="number" id="eva_create_evaluation_score1" iLabel="คะเเนนส่วนที่1 ผลสำเร็จของงาน" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
<input onchange="Oneva_create_evaluation_score1Change();" class="form-control" type="number" id="eva_create_evaluation_score1" iLabel="คะเเนนส่วนที่1 ผลสำเร็จของงาน" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_score2" for="eva_create_evaluation_score2">คะเเนนส่วนที่ 2 สมรรถนะ</label>
|
||||
<input class="form-control" type="number" id="eva_create_evaluation_score2" iLabel="คะเเนนส่วนที่ 2 สมรรถนะ" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
<input onchange="Oneva_create_evaluation_score2Change();" class="form-control" type="number" id="eva_create_evaluation_score2" iLabel="คะเเนนส่วนที่ 2 สมรรถนะ" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -91,8 +91,6 @@
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_id" />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_performance_plan_id" for="eva_create_evaluation_performance_plan_id">แผนการประเมิน</label>
|
||||
@@ -109,19 +107,31 @@
|
||||
<select class="form-control" id="eva_create_evaluation_employee_id" iLabel="ผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_supervisor1_id" for="eva_create_evaluation_supervisor1_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง </label>
|
||||
<select class="form-control" id="eva_create_evaluation_supervisor1_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง " iRequire="true" iGroup="eva_create_evaluation"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_supervisor2_id" for="eva_create_evaluation_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
||||
<select class="form-control" id="eva_create_evaluation_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="true" iGroup="eva_create_evaluation"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_score1" for="eva_create_evaluation_score1">คะเเนนส่วนที่1 ผลสำเร็จของงาน</label>
|
||||
<input class="form-control" type="number" id="eva_create_evaluation_score1" iLabel="คะเเนนส่วนที่1 ผลสำเร็จของงาน" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
<input onchange="Oneva_create_evaluation_score1Change();" class="form-control" type="number" id="eva_create_evaluation_score1" iLabel="คะเเนนส่วนที่1 ผลสำเร็จของงาน" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_score2" for="eva_create_evaluation_score2">คะเเนนส่วนที่ 2 สมรรถนะ</label>
|
||||
<input class="form-control" type="number" id="eva_create_evaluation_score2" iLabel="คะเเนนส่วนที่ 2 สมรรถนะ" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
<input onchange="Oneva_create_evaluation_score2Change();" class="form-control" type="number" id="eva_create_evaluation_score2" iLabel="คะเเนนส่วนที่ 2 สมรรถนะ" iRequire="true" iGroup="eva_create_evaluation" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -84,8 +84,33 @@
|
||||
<input type="hidden" id="eva_evaluation_achievement_thefile_hidURL" iLabel="แนบไฟล์" iRequire="false" iGroup="eva_evaluation_achievement" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_evaluation_achievement_target_score1" for="eva_evaluation_achievement_target_score1">คะแนนตามค่าระดับเป้าหมาย1</label>
|
||||
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score1" iLabel="คะแนนตามค่าระดับเป้าหมาย1" iRequire="true" iGroup="eva_evaluation_achievement" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_evaluation_achievement_target_score2" for="eva_evaluation_achievement_target_score2">คะแนนตามค่าระดับเป้าหมาย2</label>
|
||||
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score2" iLabel="คะแนนตามค่าระดับเป้าหมาย2" iRequire="true" iGroup="eva_evaluation_achievement" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_evaluation_achievement_target_score3" for="eva_evaluation_achievement_target_score3">คะแนนตามค่าระดับเป้าหมาย3</label>
|
||||
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score3" iLabel="คะแนนตามค่าระดับเป้าหมาย3" iRequire="true" iGroup="eva_evaluation_achievement" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_evaluation_achievement_target_score4" for="eva_evaluation_achievement_target_score4">คะแนนตามค่าระดับเป้าหมาย4</label>
|
||||
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score4" iLabel="คะแนนตามค่าระดับเป้าหมาย4" iRequire="true" iGroup="eva_evaluation_achievement" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_evaluation_achievement_target_score5" for="eva_evaluation_achievement_target_score5">คะแนนตามค่าระดับเป้าหมาย5</label>
|
||||
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score5" iLabel="คะแนนตามค่าระดับเป้าหมาย5" iRequire="true" iGroup="eva_evaluation_achievement" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -208,6 +233,11 @@
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_evaluation_achievement_achievement'>ผลสัมฤทธิ์ตัวชี้วัดผลงาน</label></th>
|
||||
<th><label id='h_eva_evaluation_achievement_weight'>น้ำหนัก</label></th>
|
||||
<th><label id='h_eva_evaluation_achievement_target_score1'>1</label></th>
|
||||
<th><label id='h_eva_evaluation_achievement_target_score2'>2</label></th>
|
||||
<th><label id='h_eva_evaluation_achievement_target_score3'>3</label></th>
|
||||
<th><label id='h_eva_evaluation_achievement_target_score4'>4</label></th>
|
||||
<th><label id='h_eva_evaluation_achievement_target_score5'>5</label></th>
|
||||
<th><label id='h_eva_evaluation_achievement_thefile'>เอกสารแนบ</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -219,17 +249,6 @@
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>พฤติกรรมการปฏิบัติงาน</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<input class="form-control" type="hidden" id="s_eva_evaluation_behavior_create_evaluation_detail_id" />
|
||||
|
||||
<div class="col-md-3">
|
||||
<button class="btn btn-info" onclick="javascript:eva_evaluation_behavior_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_evaluation_behaviorTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
|
||||
@@ -297,9 +297,6 @@
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>ความเห็นผู้ประเมินสูงสุด</div>
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review02_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review02_create_evaluation_id" />
|
||||
@@ -350,6 +347,99 @@
|
||||
</section>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>ความเห็น ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_supervisor1A" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_create_evaluation_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_id" />
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_result" for="eva_create_evaluation_detail_review03_supervisor1A_result">ผลการประเมิน</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_review03_supervisor1A_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_date" for="eva_create_evaluation_detail_review03_supervisor1A_date">วันที่ประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_create_evaluation_detail_review03_supervisor1A_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_remark" for="eva_create_evaluation_detail_review03_supervisor1A_remark">ความเห็นผู้ประเมิน</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review03_supervisor1A_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review03_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<br />
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>ความเห็น ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</div>
|
||||
<section class="card no-border">
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_create_evaluation_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_supervisor2A" />
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_result" for="eva_create_evaluation_detail_review04_supervisor2A_result">ผลการประเมิน</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_review04_supervisor2A_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review04"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_date" for="eva_create_evaluation_detail_review04_supervisor2A_date">วันที่ประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_create_evaluation_detail_review04_supervisor2A_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review04" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_remark" for="eva_create_evaluation_detail_review04_supervisor2A_remark">ความเห็นผู้ประเมินสูงสุด</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review04_supervisor2A_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation_detail_review04"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review04_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_create_evaluation_detail_process/eva_create_evaluation_detail_process_d2.js"></script>
|
||||
<script src="~/js/eva_evaluation_achievement_process2/eva_evaluation_achievement_process2_inline.js"></script>
|
||||
@@ -357,6 +447,8 @@
|
||||
<script src="~/js/eva_create_evaluation_detail_summary2/eva_create_evaluation_detail_summary2_d.js"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_review01/eva_create_evaluation_detail_review01_d.js"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_review02/eva_create_evaluation_detail_review02_d.js"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_review03/eva_create_evaluation_detail_review03_d.js"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_review04/eva_create_evaluation_detail_review04_d.js"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
@@ -368,6 +460,8 @@
|
||||
eva_create_evaluation_detail_summary2_SetEditForm(id);
|
||||
eva_create_evaluation_detail_review01_SetEditForm(id);
|
||||
eva_create_evaluation_detail_review02_SetEditForm(id);
|
||||
eva_create_evaluation_detail_review03_SetEditForm(id);
|
||||
eva_create_evaluation_detail_review04_SetEditForm(id);
|
||||
eva_create_evaluation_detail_status_SetEditForm(id);
|
||||
|
||||
setTimeout(Oneva_evaluation_achievement_process2_scoreChange, 1000);
|
||||
@@ -378,6 +472,8 @@
|
||||
}
|
||||
SetupValidationRemark("eva_create_evaluation_detail_process");
|
||||
SetupValidationRemark("eva_create_evaluation_detail_review02");
|
||||
SetupValidationRemark("eva_create_evaluation_detail_review03");
|
||||
SetupValidationRemark("eva_create_evaluation_detail_review04");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_create_evaluation_detail_review03";
|
||||
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_create_evaluation_detail_review03</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review03</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A" for="eva_create_evaluation_detail_review03_supervisor1A">ผู้บังคับบัญชาเหนือขึ้นไป</label>
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_supervisor1A" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_create_evaluation_id" for="eva_create_evaluation_detail_review03_create_evaluation_id">แบบประเมิน</label>
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_create_evaluation_id" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_id" for="eva_create_evaluation_detail_review03_id">รหัสอ้างอิง</label>
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_id" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_result" for="eva_create_evaluation_detail_review03_supervisor1A_result">ผลการประเมิน</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_review03_supervisor1A_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03" ></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_date" for="eva_create_evaluation_detail_review03_supervisor1A_date">วันที่ประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_create_evaluation_detail_review03_supervisor1A_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_remark" for="eva_create_evaluation_detail_review03_supervisor1A_remark">ความเห็นผู้ประเมิน</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review03_supervisor1A_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03" ></textarea>
|
||||
</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_create_evaluation_detail_review03_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_create_evaluation_detail_review03/eva_create_evaluation_detail_review03_d.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
if (id) {
|
||||
eva_create_evaluation_detail_review03_SetEditForm(id);
|
||||
} else {
|
||||
eva_create_evaluation_detail_review03_SetCreateForm();
|
||||
}
|
||||
SetupValidationRemark("eva_create_evaluation_detail_review03");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_create_evaluation_detail_review04";
|
||||
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_create_evaluation_detail_review04</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review04</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_id" for="eva_create_evaluation_detail_review04_id">รหัสอ้างอิง</label>
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_id" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_create_evaluation_id" for="eva_create_evaluation_detail_review04_create_evaluation_id">แบบประเมิน</label>
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_create_evaluation_id" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A" for="eva_create_evaluation_detail_review04_supervisor2A">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_supervisor2A" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_result" for="eva_create_evaluation_detail_review04_supervisor2A_result">ผลการประเมิน</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_review04_supervisor2A_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review04" ></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_date" for="eva_create_evaluation_detail_review04_supervisor2A_date">วันที่ประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_create_evaluation_detail_review04_supervisor2A_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review04" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_remark" for="eva_create_evaluation_detail_review04_supervisor2A_remark">ความเห็นผู้ประเมินสูงสุด</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review04_supervisor2A_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation_detail_review04" ></textarea>
|
||||
</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_create_evaluation_detail_review04_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_create_evaluation_detail_review04/eva_create_evaluation_detail_review04_d.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
if (id) {
|
||||
eva_create_evaluation_detail_review04_SetEditForm(id);
|
||||
} else {
|
||||
eva_create_evaluation_detail_review04_SetCreateForm();
|
||||
}
|
||||
SetupValidationRemark("eva_create_evaluation_detail_review04");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -31,18 +31,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_max_score" for="eva_level_score_max_score">ช่วงคะแนนสูงสุด</label>
|
||||
<input class="form-control" type="number" id="eva_level_score_max_score" iLabel="ช่วงคะแนนสูงสุด" iRequire="true" iGroup="eva_level_score" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_min_score" for="eva_level_score_min_score">ช่วงคะแนนต่ำสุด</label>
|
||||
<input class="form-control" type="number" id="eva_level_score_min_score" iLabel="ช่วงคะแนนต่ำสุด" iRequire="true" iGroup="eva_level_score" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_max_score" for="eva_level_score_max_score">ช่วงคะแนนสูงสุด</label>
|
||||
<input class="form-control" type="number" id="eva_level_score_max_score" iLabel="ช่วงคะแนนสูงสุด" iRequire="true" iGroup="eva_level_score" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,13 +61,13 @@
|
||||
<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">กำหนดระดับผลการประเมิน</li>
|
||||
<li class="breadcrumb-item active">กำหนดร้อยละที่ได้เลื่อน</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>กำหนดระดับผลการประเมิน</div>
|
||||
<div class="title"><div class="line"></div>กำหนดร้อยละที่ได้เลื่อน</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
@@ -81,7 +78,7 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-info" onclick="javascript:eva_level_score_DoSearch();">ค้นหา</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_level_score_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
<button style="display:none;" class="btn btn-info" onclick="javascript:eva_level_score_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -93,9 +90,8 @@
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_level_score_code'>รหัสระดับผลงาน</label></th>
|
||||
<th><label id='h_eva_level_score_detail'>ระดับผลการประเมิน</label></th>
|
||||
<th><label id='h_eva_level_score_max_score'>ช่วงคะแนนสูงสุด</label></th>
|
||||
<th><label id='h_eva_level_score_min_score'>ช่วงคะแนนต่ำสุด</label></th>
|
||||
|
||||
<th><label id='h_eva_level_score_max_score'>ช่วงคะแนนสูงสุด</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
|
||||
@@ -71,18 +71,15 @@
|
||||
<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">กำหนดระดับผลการประเมิน</li>
|
||||
<li class="breadcrumb-item active">กำหนดร้อยละที่ได้เลื่อน</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>กำหนดระดับผลการประเมิน</div>
|
||||
<div class="title col-md-12"><div class="line"></div>กำหนดร้อยละที่ได้เลื่อน</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
@@ -93,45 +90,35 @@
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_code" for="eva_level_score_code">รหัสระดับผลงาน</label>
|
||||
<input class="form-control" type="text" id="eva_level_score_code" iLabel="รหัสระดับผลงาน" iRequire="true" iGroup="eva_level_score" />
|
||||
<input disabled class="form-control" type="text" id="eva_level_score_code" iLabel="รหัสระดับผลงาน" iRequire="true" iGroup="eva_level_score" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_detail" for="eva_level_score_detail">ระดับผลการประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_level_score_detail" iLabel="ระดับผลการประเมิน" iRequire="true" iGroup="eva_level_score" />
|
||||
<input disabled class="form-control" type="text" id="eva_level_score_detail" iLabel="ระดับผลการประเมิน" iRequire="true" iGroup="eva_level_score" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_max_score" for="eva_level_score_max_score">ช่วงคะแนนสูงสุด</label>
|
||||
<input class="form-control" type="number" id="eva_level_score_max_score" iLabel="ช่วงคะแนนสูงสุด" iRequire="true" iGroup="eva_level_score" />
|
||||
<label id="lab_eva_level_score_min_score" for="eva_level_score_min_score">ช่วงคะแนนต่ำสุด</label>
|
||||
<input disabled class="form-control" type="number" id="eva_level_score_min_score" iLabel="ช่วงคะแนนต่ำสุด" iRequire="true" iGroup="eva_level_score" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_min_score" for="eva_level_score_min_score">ช่วงคะแนนต่ำสุด</label>
|
||||
<input class="form-control" type="number" id="eva_level_score_min_score" iLabel="ช่วงคะแนนต่ำสุด" iRequire="true" iGroup="eva_level_score" />
|
||||
<label id="lab_eva_level_score_max_score" for="eva_level_score_max_score">ช่วงคะแนนสูงสุด</label>
|
||||
<input disabled class="form-control" type="number" id="eva_level_score_max_score" iLabel="ช่วงคะแนนสูงสุด" iRequire="true" iGroup="eva_level_score" />
|
||||
</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_level_score_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<br />
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>กำหนดร้อยละที่ได้เลื่อน</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
<input class="form-control" type="hidden" id="s_eva_promoted_percentage_level_score_id" />
|
||||
|
||||
113
Views/eva_level_score_basicView/eva_level_score_basic.cshtml
Normal file
113
Views/eva_level_score_basicView/eva_level_score_basic.cshtml
Normal file
@@ -0,0 +1,113 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_level_score_basic";
|
||||
}
|
||||
|
||||
<div class="modal fade" id="eva_level_score_basicModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_level_score_basicModelLabel" 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_level_score_basicModelLabel">บันทึกข้อมูล ระดับการประเมิน</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_level_score_basic_id" />
|
||||
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_basic_code" for="eva_level_score_basic_code">รหัสระดับผลงาน</label>
|
||||
<input class="form-control" type="text" id="eva_level_score_basic_code" iLabel="รหัสระดับผลงาน" iRequire="true" iGroup="eva_level_score_basic" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_basic_detail" for="eva_level_score_basic_detail">ระดับผลการประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_level_score_basic_detail" iLabel="ระดับผลการประเมิน" iRequire="true" iGroup="eva_level_score_basic" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_basic_min_score" for="eva_level_score_basic_min_score">ช่วงคะแนนต่ำสุด</label>
|
||||
<input class="form-control" type="number" id="eva_level_score_basic_min_score" iLabel="ช่วงคะแนนต่ำสุด" iRequire="true" iGroup="eva_level_score_basic" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_level_score_basic_max_score" for="eva_level_score_basic_max_score">ช่วงคะแนนสูงสุด</label>
|
||||
<input class="form-control" type="number" id="eva_level_score_basic_max_score" iLabel="ช่วงคะแนนสูงสุด" iRequire="true" iGroup="eva_level_score_basic" />
|
||||
</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_level_score_basic_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">กำหนดระดับการประเมิน</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>ค้นหา ระดับการประเมิน</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_eva_level_score_basic_code' for='s_eva_level_score_basic_code'>รหัสระดับผลงาน</label>
|
||||
<input class="form-control" type="text" id="s_eva_level_score_basic_code" iLabel="รหัสระดับผลงาน" iRequire="true" iGroup="s_eva_level_score_basic" title='รหัสระดับผลงาน' placeholder='รหัสระดับผลงาน' />
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<button class="btn btn-info" onclick="javascript:eva_level_score_basic_DoSearch();">ค้นหา</button>
|
||||
<button class="btn btn-info" onclick="javascript:eva_level_score_basic_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_level_score_basicTable" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>เครื่องมือ</th>
|
||||
<th><label id='h_eva_level_score_basic_code'>รหัสระดับผลงาน</label></th>
|
||||
<th><label id='h_eva_level_score_basic_detail'>ระดับผลการประเมิน</label></th>
|
||||
<th><label id='h_eva_level_score_basic_min_score'>ช่วงคะแนนต่ำสุด</label></th>
|
||||
<th><label id='h_eva_level_score_basic_max_score'>ช่วงคะแนนสูงสุด</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_level_score_basic/eva_level_score_basic.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
eva_level_score_basic_InitiateDataTable();
|
||||
eva_level_score_basic_InitialForm();
|
||||
SetupValidationRemark("eva_level_score_basic");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
<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_level_scoreView/eva_level_score"><div style="display: flex;align-items: center;"><span class="menu-dot">·</span>กำหนดระดับผลการประเมิน</div></a>
|
||||
<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>
|
||||
<ul>
|
||||
<li><a href="~/eva_level_scoreView/eva_level_score"><div style="display: flex;align-items: center;"><span class="menu-dot">·</span>กำหนดร้อยละที่ได้เลื่อน</div></a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="~/eva_evaluation_groupView/eva_evaluation_group"><div style="display: flex;align-items: center;"><span class="menu-dot">·</span>กำหนดกลุ่มการประเมิน</div></a>
|
||||
|
||||
329
tb320eva.xml
329
tb320eva.xml
@@ -1228,6 +1228,220 @@
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review03Controller.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_review03Controller},TodoAPI2.Models.Ieva_create_evaluation_detail_review03Service,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_create_evaluation_detail_review03Controller.Get(System.Int32)">
|
||||
<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_create_evaluation_detail_review03Controller.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_create_evaluation_detail_review03Controller.GetList(System.Nullable{System.Int32})">
|
||||
<summary>
|
||||
Get list items by create_evaluation_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_create_evaluation_detail_review03Controller.GetListBySearch(TodoAPI2.Models.eva_create_evaluation_detail_review03SearchModel)">
|
||||
<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_create_evaluation_detail_review03Controller.eva_create_evaluation_detail_review03_report(TodoAPI2.Models.eva_create_evaluation_detail_review03ReportRequestModel)">
|
||||
<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_create_evaluation_detail_review03Controller.Insert(TodoAPI2.Models.eva_create_evaluation_detail_review03InputModel)">
|
||||
<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_create_evaluation_detail_review03Controller.Update(System.Int32,TodoAPI2.Models.eva_create_evaluation_detail_review03InputModel)">
|
||||
<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_create_evaluation_detail_review03Controller.Delete(System.Int32)">
|
||||
<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_create_evaluation_detail_review03Controller.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_create_evaluation_detail_review03InputModel})">
|
||||
<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_create_evaluation_detail_review04Controller.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_review04Controller},TodoAPI2.Models.Ieva_create_evaluation_detail_review04Service,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_create_evaluation_detail_review04Controller.Get(System.Int32)">
|
||||
<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_create_evaluation_detail_review04Controller.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_create_evaluation_detail_review04Controller.GetList(System.Nullable{System.Int32})">
|
||||
<summary>
|
||||
Get list items by create_evaluation_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_create_evaluation_detail_review04Controller.GetListBySearch(TodoAPI2.Models.eva_create_evaluation_detail_review04SearchModel)">
|
||||
<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_create_evaluation_detail_review04Controller.eva_create_evaluation_detail_review04_report(TodoAPI2.Models.eva_create_evaluation_detail_review04ReportRequestModel)">
|
||||
<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_create_evaluation_detail_review04Controller.Insert(TodoAPI2.Models.eva_create_evaluation_detail_review04InputModel)">
|
||||
<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_create_evaluation_detail_review04Controller.Update(System.Int32,TodoAPI2.Models.eva_create_evaluation_detail_review04InputModel)">
|
||||
<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_create_evaluation_detail_review04Controller.Delete(System.Int32)">
|
||||
<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_create_evaluation_detail_review04Controller.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_create_evaluation_detail_review04InputModel})">
|
||||
<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_create_evaluation_detail_statusController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_statusController},TodoAPI2.Models.Ieva_create_evaluation_detail_statusService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
@@ -2525,6 +2739,113 @@
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_level_score_basicController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_level_score_basicController},TodoAPI2.Models.Ieva_level_score_basicService,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_level_score_basicController.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_level_score_basicController.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_level_score_basicController.GetList(System.String)">
|
||||
<summary>
|
||||
Get list items by code
|
||||
</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_level_score_basicController.GetListBySearch(TodoAPI2.Models.eva_level_score_basicSearchModel)">
|
||||
<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_level_score_basicController.eva_level_score_basic_report(TodoAPI2.Models.eva_level_score_basicReportRequestModel)">
|
||||
<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_level_score_basicController.Insert(TodoAPI2.Models.eva_level_score_basicInputModel)">
|
||||
<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_level_score_basicController.Update(System.Guid,TodoAPI2.Models.eva_level_score_basicInputModel)">
|
||||
<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_level_score_basicController.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_level_score_basicController.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_level_score_basicInputModel})">
|
||||
<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_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
|
||||
@@ -3363,6 +3684,14 @@
|
||||
<param name="configuration"></param>
|
||||
<param name="logger"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_level_score_basicViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_level_score_basicController},TodoAPI2.Models.Ieva_level_score_basicService,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.Ieva_performance_planService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
|
||||
@@ -26,6 +26,8 @@ DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data,
|
||||
$("#eva_create_evaluation_score1").val(data.score1);
|
||||
$("#eva_create_evaluation_score2").val(data.score2);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +39,8 @@ eva_create_evaluationObject.employee_id = $("#eva_create_evaluation_employee_id"
|
||||
eva_create_evaluationObject.score1 = $("#eva_create_evaluation_score1").val();
|
||||
eva_create_evaluationObject.score2 = $("#eva_create_evaluation_score2").val();
|
||||
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
||||
|
||||
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
||||
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
||||
|
||||
return eva_create_evaluationObject;
|
||||
}
|
||||
@@ -214,7 +217,18 @@ function eva_create_evaluation_GetSelect(f) {
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
//================= Control Function =========================================
|
||||
|
||||
function Oneva_create_evaluation_score1Change()
|
||||
{
|
||||
var s1 = $("#eva_create_evaluation_score1").val();
|
||||
var s2 = $("#eva_create_evaluation_score2").val();
|
||||
$("#eva_create_evaluation_score2").val(100 - s1);
|
||||
}
|
||||
|
||||
function Oneva_create_evaluation_score2Change()
|
||||
{
|
||||
var s1 = $("#eva_create_evaluation_score1").val();
|
||||
var s2 = $("#eva_create_evaluation_score2").val();
|
||||
$("#eva_create_evaluation_score1").val(100 - s2);
|
||||
}
|
||||
@@ -10,6 +10,8 @@ DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data,
|
||||
$("#eva_create_evaluation_score1").val(data.score1);
|
||||
$("#eva_create_evaluation_score2").val(data.score2);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +23,8 @@ eva_create_evaluationObject.employee_id = $("#eva_create_evaluation_employee_id"
|
||||
eva_create_evaluationObject.score1 = $("#eva_create_evaluation_score1").val();
|
||||
eva_create_evaluationObject.score2 = $("#eva_create_evaluation_score2").val();
|
||||
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
||||
|
||||
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
||||
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
||||
|
||||
return eva_create_evaluationObject;
|
||||
}
|
||||
@@ -101,6 +104,19 @@ function eva_create_evaluation_GoDelete(a) {
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
//================= Control Function =========================================
|
||||
|
||||
function Oneva_create_evaluation_score1Change()
|
||||
{
|
||||
var s1 = $("#eva_create_evaluation_score1").val();
|
||||
var s2 = $("#eva_create_evaluation_score2").val();
|
||||
$("#eva_create_evaluation_score2").val(100 - s1);
|
||||
}
|
||||
|
||||
function Oneva_create_evaluation_score2Change()
|
||||
{
|
||||
var s1 = $("#eva_create_evaluation_score1").val();
|
||||
var s2 = $("#eva_create_evaluation_score2").val();
|
||||
$("#eva_create_evaluation_score1").val(100 - s2);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
var eva_create_evaluation_detail_review03_editMode = "CREATE";
|
||||
var eva_create_evaluation_detail_review03_API = "/api/eva_create_evaluation_detail_review03/";
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_create_evaluation_detail_review03_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_detail_review03_id").val(data.id);
|
||||
$("#eva_create_evaluation_detail_review03_create_evaluation_id").val(data.create_evaluation_id);
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A").val(data.supervisor1A);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_review03_supervisor1A_result"), data, "id", "external_name", "item_supervisor1A_result", data.supervisor1A_result);
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_remark").val(data.supervisor1A_remark);
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_date").val(formatDate(data.supervisor1A_date));
|
||||
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review03_GetFromForm() {
|
||||
var eva_create_evaluation_detail_review03Object = new Object();
|
||||
eva_create_evaluation_detail_review03Object.id = $("#eva_create_evaluation_detail_review03_id").val();
|
||||
eva_create_evaluation_detail_review03Object.create_evaluation_id = $("#eva_create_evaluation_detail_review03_create_evaluation_id").val();
|
||||
eva_create_evaluation_detail_review03Object.supervisor1A = $("#eva_create_evaluation_detail_review03_supervisor1A").val();
|
||||
eva_create_evaluation_detail_review03Object.supervisor1A_result = $("#eva_create_evaluation_detail_review03_supervisor1A_result").val();
|
||||
eva_create_evaluation_detail_review03Object.supervisor1A_remark = $("#eva_create_evaluation_detail_review03_supervisor1A_remark").val();
|
||||
eva_create_evaluation_detail_review03Object.supervisor1A_date = getDate($("#eva_create_evaluation_detail_review03_supervisor1A_date").val());
|
||||
|
||||
|
||||
return eva_create_evaluation_detail_review03Object;
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review03_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_review03_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_review03_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_create_evaluation_detail_review03_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_review03_editMode = "UPDATE";
|
||||
eva_create_evaluation_detail_review03_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_review03_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review03_SetCreateForm() {
|
||||
eva_create_evaluation_detail_review03_editMode = "CREATE";
|
||||
eva_create_evaluation_detail_review03_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_create_evaluation_detail_review03_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_create_evaluation_detail_review03_PutUpdate() {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review03', eva_create_evaluation_detail_review03_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = eva_create_evaluation_detail_review03_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_create_evaluation_detail_review03_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_create_evaluation_detail_review03_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_create_evaluation_detail_review03_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review03_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบ ' + a + ' ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_create_evaluation_detail_review03_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_create_evaluation_detail_review03_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
var eva_create_evaluation_detail_review04_editMode = "CREATE";
|
||||
var eva_create_evaluation_detail_review04_API = "/api/eva_create_evaluation_detail_review04/";
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_create_evaluation_detail_review04_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_detail_review04_id").val(data.id);
|
||||
$("#eva_create_evaluation_detail_review04_create_evaluation_id").val(data.create_evaluation_id);
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A").val(data.supervisor2A);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_review04_supervisor2A_result"), data, "id", "external_name", "item_supervisor2A_result", data.supervisor2A_result);
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_remark").val(data.supervisor2A_remark);
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_date").val(formatDate(data.supervisor2A_date));
|
||||
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review04_GetFromForm() {
|
||||
var eva_create_evaluation_detail_review04Object = new Object();
|
||||
eva_create_evaluation_detail_review04Object.id = $("#eva_create_evaluation_detail_review04_id").val();
|
||||
eva_create_evaluation_detail_review04Object.create_evaluation_id = $("#eva_create_evaluation_detail_review04_create_evaluation_id").val();
|
||||
eva_create_evaluation_detail_review04Object.supervisor2A = $("#eva_create_evaluation_detail_review04_supervisor2A").val();
|
||||
eva_create_evaluation_detail_review04Object.supervisor2A_result = $("#eva_create_evaluation_detail_review04_supervisor2A_result").val();
|
||||
eva_create_evaluation_detail_review04Object.supervisor2A_remark = $("#eva_create_evaluation_detail_review04_supervisor2A_remark").val();
|
||||
eva_create_evaluation_detail_review04Object.supervisor2A_date = getDate($("#eva_create_evaluation_detail_review04_supervisor2A_date").val());
|
||||
|
||||
|
||||
return eva_create_evaluation_detail_review04Object;
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review04_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_review04_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_review04_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_create_evaluation_detail_review04_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_review04_editMode = "UPDATE";
|
||||
eva_create_evaluation_detail_review04_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_review04_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review04_SetCreateForm() {
|
||||
eva_create_evaluation_detail_review04_editMode = "CREATE";
|
||||
eva_create_evaluation_detail_review04_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_create_evaluation_detail_review04_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_create_evaluation_detail_review04_PutUpdate() {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review04', eva_create_evaluation_detail_review04_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = eva_create_evaluation_detail_review04_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_create_evaluation_detail_review04_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_create_evaluation_detail_review04_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_create_evaluation_detail_review04_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review04_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบ ' + a + ' ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_create_evaluation_detail_review04_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_create_evaluation_detail_review04_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
@@ -23,7 +23,11 @@ $("#eva_evaluation_achievement_create_evaluation_detail_id").val(data.create_eva
|
||||
$("#eva_evaluation_achievement_achievement").val(data.achievement);
|
||||
$("#eva_evaluation_achievement_weight").val(data.weight);
|
||||
feedFileToControl(data.thefile, data.thefileDisplay, "eva_evaluation_achievement_thefile", "file");
|
||||
|
||||
$("#eva_evaluation_achievement_target_score1").val(data.target_score1);
|
||||
$("#eva_evaluation_achievement_target_score2").val(data.target_score2);
|
||||
$("#eva_evaluation_achievement_target_score3").val(data.target_score3);
|
||||
$("#eva_evaluation_achievement_target_score4").val(data.target_score4);
|
||||
$("#eva_evaluation_achievement_target_score5").val(data.target_score5);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_GetFromForm() {
|
||||
@@ -37,7 +41,11 @@ if ($("#eva_evaluation_achievement_thefile_hidURL").val() !== null) {
|
||||
}else {
|
||||
eva_evaluation_achievementObject.thefile = "";
|
||||
}
|
||||
|
||||
eva_evaluation_achievementObject.target_score1 = $("#eva_evaluation_achievement_target_score1").val();
|
||||
eva_evaluation_achievementObject.target_score2 = $("#eva_evaluation_achievement_target_score2").val();
|
||||
eva_evaluation_achievementObject.target_score3 = $("#eva_evaluation_achievement_target_score3").val();
|
||||
eva_evaluation_achievementObject.target_score4 = $("#eva_evaluation_achievement_target_score4").val();
|
||||
eva_evaluation_achievementObject.target_score5 = $("#eva_evaluation_achievement_target_score5").val();
|
||||
|
||||
return eva_evaluation_achievementObject;
|
||||
}
|
||||
@@ -164,6 +172,11 @@ var eva_evaluation_achievement_setupTable = function (result) {
|
||||
{ "data": "id" },
|
||||
{ "data": "achievement" },
|
||||
{ "data": "weight" },
|
||||
{ "data": "target_score1" },
|
||||
{ "data": "target_score2" },
|
||||
{ "data": "target_score3" },
|
||||
{ "data": "target_score4" },
|
||||
{ "data": "target_score5" },
|
||||
{ "data": "txt_thefile" },
|
||||
],
|
||||
"columnDefs": [
|
||||
|
||||
@@ -160,8 +160,9 @@ var eva_level_score_setupTable = function (result) {
|
||||
{ "data": "id" },
|
||||
{ "data": "code" },
|
||||
{ "data": "detail" },
|
||||
{ "data": "min_score" },
|
||||
{ "data": "max_score" },
|
||||
{ "data": "min_score" },
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
|
||||
216
wwwroot/js/eva_level_score_basic/eva_level_score_basic.js
Normal file
216
wwwroot/js/eva_level_score_basic/eva_level_score_basic.js
Normal file
@@ -0,0 +1,216 @@
|
||||
var eva_level_score_basic_editMode = "CREATE";
|
||||
var eva_level_score_basic_API = "/api/eva_level_score_basic/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_level_score_basic_GetSearchParameter() {
|
||||
var eva_level_score_basicSearchObject = new Object();
|
||||
eva_level_score_basicSearchObject.code = $("#s_eva_level_score_basic_code").val();
|
||||
|
||||
return eva_level_score_basicSearchObject;
|
||||
}
|
||||
|
||||
function eva_level_score_basic_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_level_score_basic_code").val(data.code);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_level_score_basic_FeedDataToForm(data) {
|
||||
$("#eva_level_score_basic_id").val(data.id);
|
||||
$("#eva_level_score_basic_code").val(data.code);
|
||||
$("#eva_level_score_basic_detail").val(data.detail);
|
||||
$("#eva_level_score_basic_max_score").val(data.max_score);
|
||||
$("#eva_level_score_basic_min_score").val(data.min_score);
|
||||
|
||||
}
|
||||
|
||||
function eva_level_score_basic_GetFromForm() {
|
||||
var eva_level_score_basicObject = new Object();
|
||||
eva_level_score_basicObject.id = $("#eva_level_score_basic_id").val();
|
||||
eva_level_score_basicObject.code = $("#eva_level_score_basic_code").val();
|
||||
eva_level_score_basicObject.detail = $("#eva_level_score_basic_detail").val();
|
||||
eva_level_score_basicObject.max_score = $("#eva_level_score_basic_max_score").val();
|
||||
eva_level_score_basicObject.min_score = $("#eva_level_score_basic_min_score").val();
|
||||
|
||||
|
||||
return eva_level_score_basicObject;
|
||||
}
|
||||
|
||||
function eva_level_score_basic_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_level_score_basic_FeedDataToForm(result);
|
||||
eva_level_score_basic_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_level_score_basicModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_level_score_basic_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_level_score_basic_GoCreate() {
|
||||
// Incase model popup
|
||||
eva_level_score_basic_SetCreateForm(true);
|
||||
|
||||
// Incase open new page
|
||||
//window_open(appsite + "/eva_level_score_basicView/eva_level_score_basic_d");
|
||||
}
|
||||
|
||||
function eva_level_score_basic_GoEdit(a) {
|
||||
// Incase model popup
|
||||
eva_level_score_basic_SetEditForm(a);
|
||||
|
||||
// Incase open new page
|
||||
//window_open(appsite + "/eva_level_score_basicView/eva_level_score_basic_d?id=" + a);
|
||||
}
|
||||
|
||||
function eva_level_score_basic_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_level_score_basic_editMode = "UPDATE";
|
||||
eva_level_score_basic_FeedDataToForm(result);
|
||||
$("#eva_level_score_basicModel").modal("show");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_level_score_basic_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_level_score_basic_SetCreateForm(s) {
|
||||
eva_level_score_basic_editMode = "CREATE";
|
||||
eva_level_score_basic_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_level_score_basic_RefreshTable() {
|
||||
// Incase model popup
|
||||
eva_level_score_basic_DoSearch();
|
||||
|
||||
// Incase open new page
|
||||
//window.parent.eva_level_score_basic_DoSearch();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_level_score_basic_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_level_score_basic_PutUpdate() {
|
||||
if (!ValidateForm('eva_level_score_basic', eva_level_score_basic_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var data = eva_level_score_basic_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_level_score_basic_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
$("#eva_level_score_basicModel").modal("hide");
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_level_score_basic_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_level_score_basic_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
$("#eva_level_score_basicModel").modal("hide");
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_level_score_basic_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_level_score_basic_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_level_score_basic_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
$("#eva_level_score_basicModel").modal("hide");
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_level_score_basic_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_level_score_basic_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var eva_level_score_basicTableV;
|
||||
|
||||
var eva_level_score_basic_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
eva_level_score_basicTableV = $('#eva_level_score_basicTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "code" },
|
||||
{ "data": "detail" },
|
||||
{ "data": "min_score" },
|
||||
{ "data": "max_score" },
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"data": "id",
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_level_score_basic_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_level_score_basic_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
}],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_level_score_basic_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_level_score_basic_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_level_score_basic/GetListBySearch?"+p, eva_level_score_basic_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_level_score_basic_DoSearch() {
|
||||
var p = $.param(eva_level_score_basic_GetSearchParameter());
|
||||
var eva_level_score_basic_reload = function (result) {
|
||||
eva_level_score_basicTableV.destroy();
|
||||
eva_level_score_basic_setupTable(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_level_score_basic/GetListBySearch?"+p, eva_level_score_basic_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_level_score_basic_GetSelect(f) {
|
||||
var eva_level_score_basic_selectitem = [];
|
||||
$.each(eva_level_score_basicTableV.rows('.selected').data(), function (key, value) {
|
||||
eva_level_score_basic_selectitem.push(value[f]);
|
||||
});
|
||||
alert(eva_level_score_basic_selectitem);
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user