diff --git a/ApiControllers/vw_eva_performance_planControllers.cs b/ApiControllers/vw_eva_performance_planControllers.cs new file mode 100644 index 0000000..4b0bc78 --- /dev/null +++ b/ApiControllers/vw_eva_performance_planControllers.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; +using Microsoft.Extensions.Logging; +using TTSW.Controllers; +using TTSW.EF; +using TTSW.Utils; +using TTSW.Constant; +using TTSW.Common; +using TodoAPI2.Models; +using System.Data; +using Microsoft.Extensions.Configuration; +using System.IO; +using System.Net; + +namespace TodoAPI2.Controllers +{ + //[Authorize] + [Produces("application/json")] + [Route("api/vw_eva_performance_plan")] + public class vw_eva_performance_planController : BaseController + { + #region Private Variables + private ILogger _logger; + private Ivw_eva_performance_planService _repository; + private IConfiguration Configuration { get; set; } + #endregion + + #region Properties + + #endregion + + /// + /// Default constructure for dependency injection + /// + /// + /// + /// + public vw_eva_performance_planController(ILogger logger, Ivw_eva_performance_planService repository, IConfiguration configuration) + { + _logger = logger; + _repository = repository; + Configuration = configuration; + } + + /// + /// Get specific item by id + /// + /// + /// + /// Return Get specific item by id + /// Returns the item + /// Error Occurred + [HttpGet("{id}")] + [ProducesResponseType(typeof(vw_eva_performance_planWithSelectionViewModel), 200)] + [ProducesResponseType(400)] + [ProducesResponseType(500)] + //[ValidateAntiForgeryToken] + public IActionResult Get(Guid id) + { + try + { + if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); + var result = _repository.GetWithSelection(id); + + return Ok(result); + } + catch (Exception ex) + { + _logger.LogCritical($"Exception in IActionResult Get.", ex); + return StatusCode(500, $"{ex.Message}"); + } + } + + /// + /// Get Blank Item + /// + /// + /// + /// Return a blank item + /// Returns the item + /// Error Occurred + [HttpGet("GetBlankItem")] + [ProducesResponseType(typeof(vw_eva_performance_planWithSelectionViewModel), 200)] + [ProducesResponseType(400)] + [ProducesResponseType(500)] + //[ValidateAntiForgeryToken] + public IActionResult GetBlankItem() + { + try + { + if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); + var result = _repository.GetBlankItem(); + + return Ok(result); + } + catch (Exception ex) + { + _logger.LogCritical($"Exception in IActionResult GetBlankItem.", ex); + return StatusCode(500, $"{ex.Message}"); + } + } + + /// + /// Get list items by fiscal_year + /// + /// + /// + /// Return list of items by specifced keyword + /// Returns the item + /// Error Occurred + [HttpGet("")] + [ProducesResponseType(typeof(List), 200)] + [ProducesResponseType(400)] + [ProducesResponseType(500)] + //[ValidateAntiForgeryToken] + public IActionResult GetList(int? fiscal_year) + { + try + { + if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); + return Ok(_repository.GetListByfiscal_year(fiscal_year)); + } + catch (Exception ex) + { + _logger.LogCritical($"Exception in IActionResult GetList.", ex); + return StatusCode(500, $"{ex.Message}"); + } + } + + /// + /// Get list items by search + /// + /// + /// + /// Return list of items by specifced keyword + /// Returns the item + /// Error Occurred + [HttpGet("GetListBySearch")] + [ProducesResponseType(typeof(List), 200)] + [ProducesResponseType(400)] + [ProducesResponseType(500)] + //[ValidateAntiForgeryToken] + public IActionResult GetListBySearch(vw_eva_performance_planSearchModel model) + { + try + { + if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); + return Ok(_repository.GetListBySearch(model)); + } + catch (Exception ex) + { + _logger.LogCritical($"Exception in IActionResult GetListBySearch.", ex); + return StatusCode(500, $"{ex.Message}"); + } + } + + + } +} diff --git a/EXCEL/eva_performance_plan@vw_eva_performance_plan.xlsx b/EXCEL/eva_performance_plan@vw_eva_performance_plan.xlsx new file mode 100644 index 0000000..96c6f63 Binary files /dev/null and b/EXCEL/eva_performance_plan@vw_eva_performance_plan.xlsx differ diff --git a/Models/vw_eva_performance_plan/Ivw_eva_performance_planService.cs b/Models/vw_eva_performance_plan/Ivw_eva_performance_planService.cs new file mode 100644 index 0000000..036e9a2 --- /dev/null +++ b/Models/vw_eva_performance_plan/Ivw_eva_performance_planService.cs @@ -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 Ivw_eva_performance_planService + { + List GetListByfiscal_year(int? fiscal_year); + List GetListBySearch(vw_eva_performance_planSearchModel model); + + vw_eva_performance_planWithSelectionViewModel GetWithSelection(Guid id); + vw_eva_performance_planWithSelectionViewModel GetBlankItem(); + + eva_performance_planEntity GetEntity(Guid id); + DataContext GetContext(); + + + + } +} + diff --git a/Models/vw_eva_performance_plan/vw_eva_performance_planInputModel.cs b/Models/vw_eva_performance_plan/vw_eva_performance_planInputModel.cs new file mode 100644 index 0000000..8949cd2 --- /dev/null +++ b/Models/vw_eva_performance_plan/vw_eva_performance_planInputModel.cs @@ -0,0 +1,26 @@ +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 vw_eva_performance_planInputModel + { + + public Guid? id { get; set; } + + public int? fiscal_year { get; set; } + + public int? theTime { get; set; } + + public string active_mode { get; set; } + } +} + diff --git a/Models/vw_eva_performance_plan/vw_eva_performance_planReportRequestModel.cs b/Models/vw_eva_performance_plan/vw_eva_performance_planReportRequestModel.cs new file mode 100644 index 0000000..19ad14e --- /dev/null +++ b/Models/vw_eva_performance_plan/vw_eva_performance_planReportRequestModel.cs @@ -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 vw_eva_performance_planReportRequestModel : vw_eva_performance_planSearchModel + { + public string filetype { get; set; } + + public string contentType { get { return MyHelper.GetContentType(filetype); } } + } +} + diff --git a/Models/vw_eva_performance_plan/vw_eva_performance_planSearchModel.cs b/Models/vw_eva_performance_plan/vw_eva_performance_planSearchModel.cs new file mode 100644 index 0000000..1a23d5a --- /dev/null +++ b/Models/vw_eva_performance_plan/vw_eva_performance_planSearchModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Threading.Tasks; +using TTSW.EF; +using TTSW.Utils; +using TTSW.Constant; +using TTSW.Common; + +namespace TodoAPI2.Models +{ + public class vw_eva_performance_planSearchModel + { + + public Guid id { get; set; } + + public int? fiscal_year { get; set; } + + public int? theTime { get; set; } + + } +} + diff --git a/Models/vw_eva_performance_plan/vw_eva_performance_planService.cs b/Models/vw_eva_performance_plan/vw_eva_performance_planService.cs new file mode 100644 index 0000000..2079c3f --- /dev/null +++ b/Models/vw_eva_performance_plan/vw_eva_performance_planService.cs @@ -0,0 +1,133 @@ +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 vw_eva_performance_planService : Ivw_eva_performance_planService + { + private IBaseRepository _repository; + private IMyDatabase db; + private Iexternal_linkageService ext; + + public vw_eva_performance_planService(IBaseRepository repository, IMyDatabase mydb, Iexternal_linkageService inext) + { + _repository = repository; + db = mydb; + ext = inext; + } + + #region Private Functions + private eva_performance_planEntity GetEntity(vw_eva_performance_planInputModel model) + { + return Mapper.Map(model); + } + private List GetEntityList(List models) + { + return Mapper.Map>(models); + } + private vw_eva_performance_planViewModel GetDto(eva_performance_planEntity entity) + { + return Mapper.Map(entity); + } + private List GetDtoList(List entities) + { + return Mapper.Map>(entities); + } + + #endregion + + #region Public Functions + #region Query Functions + + public vw_eva_performance_planViewModel Get(Guid id) + { + var entity = _repository.Get(id); + + return GetDto(entity); + } + + public eva_performance_planEntity GetEntity(Guid id) + { + var entity = _repository.Get(id); + + return entity; + } + + public DataContext GetContext() + { + return _repository.Context; + } + + public vw_eva_performance_planWithSelectionViewModel GetWithSelection(Guid id) + { + var entity = _repository.Get(id); + var i = Mapper.Map(entity); + + + return i; + } + public vw_eva_performance_planWithSelectionViewModel GetBlankItem() + { + var i = new vw_eva_performance_planWithSelectionViewModel(); + + + return i; + } + + public List GetListByfiscal_year(int? fiscal_year) + { + var model = new vw_eva_performance_planSearchModel(); + model.fiscal_year = fiscal_year; + return GetListBySearch(model); + } + + public List GetListBySearch(vw_eva_performance_planSearchModel model) + { + var data = ( + from m_vw_eva_performance_plan in _repository.Context.eva_performance_plan + + + where + 1 == 1 + && (!model.fiscal_year.HasValue || m_vw_eva_performance_plan.fiscal_year == model.fiscal_year) + && (!model.theTime.HasValue || m_vw_eva_performance_plan.theTime == model.theTime) + + + orderby m_vw_eva_performance_plan.created descending + select new vw_eva_performance_planViewModel() + { + id = m_vw_eva_performance_plan.id, + fiscal_year = m_vw_eva_performance_plan.fiscal_year, + theTime = m_vw_eva_performance_plan.theTime, + + + isActive = m_vw_eva_performance_plan.isActive, + Created = m_vw_eva_performance_plan.created, + Updated = m_vw_eva_performance_plan.updated + } + ).Take(1000).ToList(); + + return data; + } + + #endregion + + + + #endregion + } +} \ No newline at end of file diff --git a/Models/vw_eva_performance_plan/vw_eva_performance_planViewModel.cs b/Models/vw_eva_performance_plan/vw_eva_performance_planViewModel.cs new file mode 100644 index 0000000..b063379 --- /dev/null +++ b/Models/vw_eva_performance_plan/vw_eva_performance_planViewModel.cs @@ -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 vw_eva_performance_planViewModel : BaseViewModel2 + { + + public int? fiscal_year { get; set; } + + public int? theTime { get; set; } + + + } +} \ No newline at end of file diff --git a/Models/vw_eva_performance_plan/vw_eva_performance_planWithSelectionViewModel.cs b/Models/vw_eva_performance_plan/vw_eva_performance_planWithSelectionViewModel.cs new file mode 100644 index 0000000..805f961 --- /dev/null +++ b/Models/vw_eva_performance_plan/vw_eva_performance_planWithSelectionViewModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace TodoAPI2.Models +{ + public class vw_eva_performance_planWithSelectionViewModel: vw_eva_performance_planViewModel + { + + } +} \ No newline at end of file diff --git a/Startup.cs b/Startup.cs index 07f8c78..8f8ab37 100644 --- a/Startup.cs +++ b/Startup.cs @@ -325,6 +325,8 @@ namespace Test01 services.AddScoped(); + services.AddScoped(); + #endregion services.TryAddSingleton(); @@ -604,6 +606,10 @@ namespace Test01 cfg.CreateMap(); cfg.CreateMap(); + cfg.CreateMap(); + cfg.CreateMap(); + cfg.CreateMap(); + }); #endregion diff --git a/ViewControllers/vw_eva_performance_planViewControllers.cs b/ViewControllers/vw_eva_performance_planViewControllers.cs new file mode 100644 index 0000000..f44a497 --- /dev/null +++ b/ViewControllers/vw_eva_performance_planViewControllers.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using TodoAPI2.Models; +using STAFF_API.Models; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Configuration; +using TodoAPI2.Controllers; + +namespace TodoAPI2.Controllers +{ + public class vw_eva_performance_planViewController : Controller + { + private ILogger _logger; + private Ivw_eva_performance_planService _repository; + private IConfiguration Configuration { get; set; } + + /// + /// Default constructure for dependency injection + /// + /// + /// + /// + public vw_eva_performance_planViewController(ILogger logger, Ivw_eva_performance_planService repository, IConfiguration configuration) + { + _logger = logger; + _repository = repository; + Configuration = configuration; + } + + public IActionResult vw_eva_performance_plan() + { + if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView + return View(); + } + + public IActionResult vw_eva_performance_plan_d() + { + if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView + return View(); + } + + //public IActionResult vw_eva_performance_plan_report() + //{ + // if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView + // return View(); + //} + + //public IActionResult vw_eva_performance_plan_inline() + //{ + // if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView + // return View(); + //} + + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } + } +} + + diff --git a/Views/rep_eva_self_review_allView/rep_eva_self_review_all_report.cshtml b/Views/rep_eva_self_review_allView/rep_eva_self_review_all_report.cshtml index a29a5bc..0648e7f 100644 --- a/Views/rep_eva_self_review_allView/rep_eva_self_review_all_report.cshtml +++ b/Views/rep_eva_self_review_allView/rep_eva_self_review_all_report.cshtml @@ -26,6 +26,7 @@
+
diff --git a/Views/vw_eva_performance_planView/vw_eva_performance_plan.cshtml b/Views/vw_eva_performance_planView/vw_eva_performance_plan.cshtml new file mode 100644 index 0000000..7d4c036 --- /dev/null +++ b/Views/vw_eva_performance_planView/vw_eva_performance_plan.cshtml @@ -0,0 +1,92 @@ +@using Microsoft.Extensions.Configuration +@inject IConfiguration Configuration +@{ + ViewData["Title"] = "vw_eva_performance_plan"; +} + + + +
+
+
+
+

@Configuration["SiteInformation:modulename"]

+
+
+ +
+
+
+
+ + +
+
+ + +
+
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+ + + + + + + + + + +
เครื่องมือ
+
+
+
+ +
+ + +
+ +
+ + +@section FooterPlaceHolder{ + + +} + diff --git a/tb320eva.xml b/tb320eva.xml index f75a344..1b73ada 100644 --- a/tb320eva.xml +++ b/tb320eva.xml @@ -4794,6 +4794,54 @@ Returns the item Error Occurred + + + Default constructure for dependency injection + + + + + + + + Get specific item by id + + + + Return Get specific item by id + Returns the item + Error Occurred + + + + Get Blank Item + + + + Return a blank item + Returns the item + Error Occurred + + + + Get list items by fiscal_year + + + + Return list of items by specifced keyword + Returns the item + Error Occurred + + + + Get list items by search + + + + Return list of items by specifced keyword + Returns the item + Error Occurred + Default constructure for dependency injection @@ -5292,6 +5340,14 @@ + + + Default constructure for dependency injection + + + + + Default constructure for dependency injection diff --git a/wwwroot/js/rep_eva_self_review_all/rep_eva_self_review_all_report.js b/wwwroot/js/rep_eva_self_review_all/rep_eva_self_review_all_report.js index db7722d..72e0480 100644 --- a/wwwroot/js/rep_eva_self_review_all/rep_eva_self_review_all_report.js +++ b/wwwroot/js/rep_eva_self_review_all/rep_eva_self_review_all_report.js @@ -2,6 +2,10 @@ //================= Search Customizaiton ========================================= +function rep_eva_self_review_all_GoBack() { + window.location = appsite + "/vw_eva_performance_planView/vw_eva_performance_plan"; +} + function rep_eva_self_review_all_GetSearchParameter(fileType) { var rep_eva_self_review_allSearchObject = new Object(); rep_eva_self_review_allSearchObject.employee_id = $("#s_rep_eva_self_review_all_employee_id").val(); diff --git a/wwwroot/js/vw_eva_performance_plan/vw_eva_performance_plan.js b/wwwroot/js/vw_eva_performance_plan/vw_eva_performance_plan.js new file mode 100644 index 0000000..dc610d5 --- /dev/null +++ b/wwwroot/js/vw_eva_performance_plan/vw_eva_performance_plan.js @@ -0,0 +1,213 @@ +var vw_eva_performance_plan_editMode = "CREATE"; +var vw_eva_performance_plan_API = "/api/vw_eva_performance_plan/"; + +//================= Search Customizaiton ========================================= + +function vw_eva_performance_plan_GetSearchParameter() { + var vw_eva_performance_planSearchObject = new Object(); + vw_eva_performance_planSearchObject.fiscal_year = $("#s_vw_eva_performance_plan_fiscal_year").val(); + vw_eva_performance_planSearchObject.theTime = $("#s_vw_eva_performance_plan_theTime").val(); + + return vw_eva_performance_planSearchObject; +} + +function vw_eva_performance_plan_FeedDataToSearchForm(data) { + $("#s_vw_eva_performance_plan_fiscal_year").val(data.fiscal_year); + $("#s_vw_eva_performance_plan_theTime").val(data.theTime); + +} + +//================= Form Data Customizaiton ========================================= + +function vw_eva_performance_plan_FeedDataToForm(data) { + $("#vw_eva_performance_plan_id").val(data.id); + $("#vw_eva_performance_plan_fiscal_year").val(data.fiscal_year); + $("#vw_eva_performance_plan_theTime").val(data.theTime); + +} + +function vw_eva_performance_plan_GetFromForm() { + var vw_eva_performance_planObject = new Object(); + vw_eva_performance_planObject.id = $("#vw_eva_performance_plan_id").val(); + vw_eva_performance_planObject.fiscal_year = $("#vw_eva_performance_plan_fiscal_year").val(); + vw_eva_performance_planObject.theTime = $("#vw_eva_performance_plan_theTime").val(); + + + return vw_eva_performance_planObject; +} + +function vw_eva_performance_plan_InitialForm(s) { + var successFunc = function (result) { + vw_eva_performance_plan_FeedDataToForm(result); + vw_eva_performance_plan_FeedDataToSearchForm(result); + if (s) { + // Incase model popup + $("#vw_eva_performance_planModel").modal("show"); + } + endLoad(); + }; + startLoad(); + AjaxGetRequest(apisite + vw_eva_performance_plan_API + "GetBlankItem", successFunc, AlertDanger); +} + +//================= Form Mode Setup and Flow ========================================= + +function vw_eva_performance_plan_GoAll() { + window.location = appsite + "/rep_eva_self_review_allView/rep_eva_self_review_all_report"; +} + +function vw_eva_performance_plan_GoEdit(a) { + alert("กำลังจัดทำ"); +} + +function vw_eva_performance_plan_SetEditForm(a) { + var successFunc = function (result) { + vw_eva_performance_plan_editMode = "UPDATE"; + vw_eva_performance_plan_FeedDataToForm(result); + $("#vw_eva_performance_planModel").modal("show"); + endLoad(); + }; + startLoad(); + AjaxGetRequest(apisite + vw_eva_performance_plan_API + a, successFunc, AlertDanger); +} + +function vw_eva_performance_plan_SetCreateForm(s) { + vw_eva_performance_plan_editMode = "CREATE"; + vw_eva_performance_plan_InitialForm(s); +} + +function vw_eva_performance_plan_RefreshTable() { + // Incase model popup + vw_eva_performance_plan_DoSearch(); + + // Incase open new page + //window.parent.vw_eva_performance_plan_DoSearch(); +} + +//================= Update and Delete ========================================= + +var vw_eva_performance_plan_customValidation = function (group) { + return ""; +}; + +function vw_eva_performance_plan_PutUpdate() { + if (!ValidateForm('vw_eva_performance_plan', vw_eva_performance_plan_customValidation)) { + return; + } + + var data = vw_eva_performance_plan_GetFromForm(); + + //Update Mode + if (vw_eva_performance_plan_editMode === "UPDATE") { + var successFunc1 = function (result) { + $("#vw_eva_performance_planModel").modal("hide"); + AlertSuccess(result.code + " " + result.message); + vw_eva_performance_plan_RefreshTable(); + endLoad(); + }; + startLoad(); + AjaxPutRequest(apisite + vw_eva_performance_plan_API + data.id, data, successFunc1, AlertDanger); + } + // Create mode + else { + var successFunc2 = function (result) { + $("#vw_eva_performance_planModel").modal("hide"); + AlertSuccess(result.code + " " + result.message); + vw_eva_performance_plan_RefreshTable(); + endLoad(); + }; + startLoad(); + AjaxPostRequest(apisite + vw_eva_performance_plan_API, data, successFunc2, AlertDanger); + } +} + +function vw_eva_performance_plan_GoDelete(a) { + if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) { + var successFunc = function (result) { + $("#vw_eva_performance_planModel").modal("hide"); + AlertSuccess(result.code + " " + result.message); + vw_eva_performance_plan_RefreshTable(); + endLoad(); + }; + startLoad(); + AjaxDeleteRequest(apisite + vw_eva_performance_plan_API + a, null, successFunc, AlertDanger); + } +} + +//================= Data Table ========================================= + +var vw_eva_performance_planTableV; + +var vw_eva_performance_plan_setupTable = function (result) { + tmp = '"'; + vw_eva_performance_planTableV = $('#vw_eva_performance_planTable').DataTable({ + "processing": true, + "serverSide": false, + "data": result, + //"select": { + // "style": 'multi' + //}, + "columns": [ + //{ "data": "" }, + { "data": "id" }, + { "data": "fiscal_year" }, + { "data": "theTime" }, + ], + "columnDefs": [ + { + "targets": 0, //1, + "data": "id", + "render": function (data, type, row, meta) { + return " "; + } + }, + //{ + // targets: 0, + // data: "", + // defaultContent: '', + // orderable: false, + // className: 'select-checkbox' + //} + ], + "language": { + "url": appsite + "/DataTables-1.10.16/thai.json" + }, + "paging": true, + "searching": false + }); + endLoad(); +}; + +function vw_eva_performance_plan_InitiateDataTable() { + startLoad(); + var p = $.param(vw_eva_performance_plan_GetSearchParameter()); + AjaxGetRequest(apisite + "/api/vw_eva_performance_plan/GetListBySearch?" + p, vw_eva_performance_plan_setupTable, AlertDanger); +} + +function vw_eva_performance_plan_DoSearch() { + var p = $.param(vw_eva_performance_plan_GetSearchParameter()); + var vw_eva_performance_plan_reload = function (result) { + vw_eva_performance_planTableV.destroy(); + vw_eva_performance_plan_setupTable(result); + endLoad(); + }; + startLoad(); + AjaxGetRequest(apisite + "/api/vw_eva_performance_plan/GetListBySearch?" + p, vw_eva_performance_plan_reload, AlertDanger); +} + +function vw_eva_performance_plan_GetSelect(f) { + var vw_eva_performance_plan_selectitem = []; + $.each(vw_eva_performance_planTableV.rows('.selected').data(), function (key, value) { + vw_eva_performance_plan_selectitem.push(value[f]); + }); + alert(vw_eva_performance_plan_selectitem); +} + +//================= File Upload ========================================= + + + +//================= Multi-Selection Function ========================================= + + +