เอาตัวเรียงออก
This commit is contained in:
@@ -109,7 +109,7 @@ namespace TodoAPI2.Models
|
||||
(model.create_evaluation_detail_id.HasValue && m_eva_evaluation_operating_agreement.create_evaluation_detail_id == model.create_evaluation_detail_id)
|
||||
|
||||
|
||||
orderby m_eva_evaluation_operating_agreement.created descending
|
||||
orderby m_eva_evaluation_operating_agreement.mission_no
|
||||
select new eva_evaluation_operating_agreementViewModel()
|
||||
{
|
||||
id = m_eva_evaluation_operating_agreement.id,
|
||||
|
||||
@@ -5,47 +5,47 @@ var eva_evaluation_achievement_API = "/api/eva_evaluation_achievement/";
|
||||
|
||||
function eva_evaluation_achievement_GetSearchParameter() {
|
||||
var eva_evaluation_achievementSearchObject = new Object();
|
||||
eva_evaluation_achievementSearchObject.create_evaluation_detail_id = $("#s_eva_evaluation_achievement_create_evaluation_detail_id").val();
|
||||
eva_evaluation_achievementSearchObject.create_evaluation_detail_id = $("#s_eva_evaluation_achievement_create_evaluation_detail_id").val();
|
||||
|
||||
return eva_evaluation_achievementSearchObject;
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_evaluation_achievement_create_evaluation_detail_id").val(getUrlParameter("id"));
|
||||
$("#s_eva_evaluation_achievement_create_evaluation_detail_id").val(getUrlParameter("id"));
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_evaluation_achievement_FeedDataToForm(data) {
|
||||
$("#eva_evaluation_achievement_id").val(data.id);
|
||||
$("#eva_evaluation_achievement_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#eva_evaluation_achievement_achievement").val(data.achievement);
|
||||
$("#eva_evaluation_achievement_weight").val(data.weight);
|
||||
$("#eva_evaluation_achievement_id").val(data.id);
|
||||
$("#eva_evaluation_achievement_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#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);
|
||||
$("#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() {
|
||||
var eva_evaluation_achievementObject = new Object();
|
||||
eva_evaluation_achievementObject.id = $("#eva_evaluation_achievement_id").val();
|
||||
eva_evaluation_achievementObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#eva_evaluation_achievement_create_evaluation_detail_id").val();
|
||||
eva_evaluation_achievementObject.achievement = $("#eva_evaluation_achievement_achievement").val();
|
||||
eva_evaluation_achievementObject.weight = $("#eva_evaluation_achievement_weight").val();
|
||||
if ($("#eva_evaluation_achievement_thefile_hidURL").val() !== null) {
|
||||
eva_evaluation_achievementObject.thefile = $("#eva_evaluation_achievement_thefile_hidURL").val();
|
||||
}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();
|
||||
eva_evaluation_achievementObject.id = $("#eva_evaluation_achievement_id").val();
|
||||
eva_evaluation_achievementObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#eva_evaluation_achievement_create_evaluation_detail_id").val();
|
||||
eva_evaluation_achievementObject.achievement = $("#eva_evaluation_achievement_achievement").val();
|
||||
eva_evaluation_achievementObject.weight = $("#eva_evaluation_achievement_weight").val();
|
||||
if ($("#eva_evaluation_achievement_thefile_hidURL").val() !== null) {
|
||||
eva_evaluation_achievementObject.thefile = $("#eva_evaluation_achievement_thefile_hidURL").val();
|
||||
} 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;
|
||||
}
|
||||
@@ -53,14 +53,14 @@ eva_evaluation_achievementObject.target_score5 = $("#eva_evaluation_achievement_
|
||||
function eva_evaluation_achievement_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_evaluation_achievement_FeedDataToForm(result);
|
||||
eva_evaluation_achievement_FeedDataToSearchForm(result);
|
||||
eva_evaluation_achievement_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_evaluation_achievementModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_evaluation_achievement_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -87,15 +87,15 @@ function eva_evaluation_achievement_SetEditForm(a) {
|
||||
eva_evaluation_achievement_editMode = "UPDATE";
|
||||
eva_evaluation_achievement_FeedDataToForm(result);
|
||||
$("#eva_evaluation_achievementModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_evaluation_achievement_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_SetCreateForm(s) {
|
||||
eva_evaluation_achievement_editMode = "CREATE";
|
||||
eva_evaluation_achievement_InitialForm(s);
|
||||
eva_evaluation_achievement_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_RefreshTable() {
|
||||
@@ -113,8 +113,7 @@ var eva_evaluation_achievement_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_evaluation_achievement_PutUpdate() {
|
||||
if (!ValidateForm('eva_evaluation_achievement', eva_evaluation_achievement_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_evaluation_achievement', eva_evaluation_achievement_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,9 +125,9 @@ function eva_evaluation_achievement_PutUpdate() {
|
||||
$("#eva_evaluation_achievementModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_evaluation_achievement_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_evaluation_achievement_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
@@ -137,9 +136,9 @@ function eva_evaluation_achievement_PutUpdate() {
|
||||
$("#eva_evaluation_achievementModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_evaluation_achievement_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_evaluation_achievement_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -150,9 +149,9 @@ function eva_evaluation_achievement_GoDelete(a) {
|
||||
$("#eva_evaluation_achievementModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_evaluation_achievement_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_evaluation_achievement_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -162,9 +161,9 @@ function eva_evaluation_achievement_GoDelete(a) {
|
||||
var eva_evaluation_achievementTableV;
|
||||
|
||||
var eva_evaluation_achievement_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
var sum_a = 0;
|
||||
$.each(result, function( k, v ) {
|
||||
$.each(result, function (k, v) {
|
||||
sum_a += v.weight;
|
||||
});
|
||||
$("#sum_a").text(sum_a);
|
||||
@@ -173,17 +172,17 @@ var eva_evaluation_achievement_setupTable = function (result) {
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "achievement" },
|
||||
{ "data": "weight" },
|
||||
{ "data": "target_score1" },
|
||||
{ "data": "target_score2" },
|
||||
{ "data": "target_score3" },
|
||||
{ "data": "target_score4" },
|
||||
{ "data": "target_score5" },
|
||||
{ "data": "txt_thefile" },
|
||||
{ "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": [
|
||||
{
|
||||
@@ -192,24 +191,25 @@ var eva_evaluation_achievement_setupTable = function (result) {
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
},{
|
||||
targets: [ 3, 4, 5, 6, 7 ],
|
||||
visible: false
|
||||
}],
|
||||
}, {
|
||||
targets: [3, 4, 5, 6, 7],
|
||||
visible: false
|
||||
}],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false,
|
||||
"bSort": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_evaluation_achievement_InitiateDataTable(id) {
|
||||
startLoad();
|
||||
$("#s_eva_evaluation_achievement_create_evaluation_detail_id").val(id)
|
||||
var p = $.param(eva_evaluation_achievement_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_achievement/GetListBySearch?"+p, eva_evaluation_achievement_setupTable, AlertDanger);
|
||||
startLoad();
|
||||
$("#s_eva_evaluation_achievement_create_evaluation_detail_id").val(id)
|
||||
var p = $.param(eva_evaluation_achievement_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_achievement/GetListBySearch?" + p, eva_evaluation_achievement_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_DoSearch() {
|
||||
@@ -217,10 +217,10 @@ function eva_evaluation_achievement_DoSearch() {
|
||||
var eva_evaluation_achievement_reload = function (result) {
|
||||
eva_evaluation_achievementTableV.destroy();
|
||||
eva_evaluation_achievement_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_achievement/GetListBySearch?"+p, eva_evaluation_achievement_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_achievement/GetListBySearch?" + p, eva_evaluation_achievement_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_GetSelect(f) {
|
||||
|
||||
@@ -5,42 +5,42 @@ var eva_evaluation_behavior_API = "/api/eva_evaluation_behavior/";
|
||||
|
||||
function eva_evaluation_behavior_GetSearchParameter() {
|
||||
var eva_evaluation_behaviorSearchObject = new Object();
|
||||
eva_evaluation_behaviorSearchObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#s_eva_evaluation_behavior_create_evaluation_detail_id").val();
|
||||
eva_evaluation_behaviorSearchObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#s_eva_evaluation_behavior_create_evaluation_detail_id").val();
|
||||
|
||||
return eva_evaluation_behaviorSearchObject;
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_evaluation_behavior_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#s_eva_evaluation_behavior_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_evaluation_behavior_FeedDataToForm(data) {
|
||||
$("#eva_evaluation_behavior_id").val(data.id);
|
||||
$("#eva_evaluation_behavior_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#eva_evaluation_behavior_behavior").val(data.behavior);
|
||||
$("#eva_evaluation_behavior_weight").val(data.weight);
|
||||
$("#eva_evaluation_behavior_target_score1").val(data.target_score1);
|
||||
$("#eva_evaluation_behavior_target_score2").val(data.target_score2);
|
||||
$("#eva_evaluation_behavior_target_score3").val(data.target_score3);
|
||||
$("#eva_evaluation_behavior_target_score4").val(data.target_score4);
|
||||
$("#eva_evaluation_behavior_target_score5").val(data.target_score5);
|
||||
console.log(data);
|
||||
$("#eva_evaluation_behavior_id").val(data.id);
|
||||
$("#eva_evaluation_behavior_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#eva_evaluation_behavior_behavior").val(data.behavior);
|
||||
$("#eva_evaluation_behavior_weight").val(data.weight);
|
||||
$("#eva_evaluation_behavior_target_score1").val(data.target_score1);
|
||||
$("#eva_evaluation_behavior_target_score2").val(data.target_score2);
|
||||
$("#eva_evaluation_behavior_target_score3").val(data.target_score3);
|
||||
$("#eva_evaluation_behavior_target_score4").val(data.target_score4);
|
||||
$("#eva_evaluation_behavior_target_score5").val(data.target_score5);
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_GetFromForm() {
|
||||
var eva_evaluation_behaviorObject = new Object();
|
||||
eva_evaluation_behaviorObject.id = $("#eva_evaluation_behavior_id").val();
|
||||
eva_evaluation_behaviorObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#eva_evaluation_behavior_create_evaluation_detail_id").val();
|
||||
eva_evaluation_behaviorObject.behavior = $("#eva_evaluation_behavior_behavior").val();
|
||||
eva_evaluation_behaviorObject.weight = $("#eva_evaluation_behavior_weight").val();
|
||||
eva_evaluation_behaviorObject.target_score1 = $("#eva_evaluation_behavior_target_score1").val();
|
||||
eva_evaluation_behaviorObject.target_score2 = $("#eva_evaluation_behavior_target_score2").val();
|
||||
eva_evaluation_behaviorObject.target_score3 = $("#eva_evaluation_behavior_target_score3").val();
|
||||
eva_evaluation_behaviorObject.target_score4 = $("#eva_evaluation_behavior_target_score4").val();
|
||||
eva_evaluation_behaviorObject.target_score5 = $("#eva_evaluation_behavior_target_score5").val();
|
||||
eva_evaluation_behaviorObject.id = $("#eva_evaluation_behavior_id").val();
|
||||
eva_evaluation_behaviorObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#eva_evaluation_behavior_create_evaluation_detail_id").val();
|
||||
eva_evaluation_behaviorObject.behavior = $("#eva_evaluation_behavior_behavior").val();
|
||||
eva_evaluation_behaviorObject.weight = $("#eva_evaluation_behavior_weight").val();
|
||||
eva_evaluation_behaviorObject.target_score1 = $("#eva_evaluation_behavior_target_score1").val();
|
||||
eva_evaluation_behaviorObject.target_score2 = $("#eva_evaluation_behavior_target_score2").val();
|
||||
eva_evaluation_behaviorObject.target_score3 = $("#eva_evaluation_behavior_target_score3").val();
|
||||
eva_evaluation_behaviorObject.target_score4 = $("#eva_evaluation_behavior_target_score4").val();
|
||||
eva_evaluation_behaviorObject.target_score5 = $("#eva_evaluation_behavior_target_score5").val();
|
||||
|
||||
return eva_evaluation_behaviorObject;
|
||||
}
|
||||
@@ -48,14 +48,14 @@ eva_evaluation_behaviorObject.target_score5 = $("#eva_evaluation_behavior_target
|
||||
function eva_evaluation_behavior_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_evaluation_behavior_FeedDataToForm(result);
|
||||
eva_evaluation_behavior_FeedDataToSearchForm(result);
|
||||
eva_evaluation_behavior_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_evaluation_behaviorModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_evaluation_behavior_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -82,15 +82,15 @@ function eva_evaluation_behavior_SetEditForm(a) {
|
||||
eva_evaluation_behavior_editMode = "UPDATE";
|
||||
eva_evaluation_behavior_FeedDataToForm(result);
|
||||
$("#eva_evaluation_behaviorModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_evaluation_behavior_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_SetCreateForm(s) {
|
||||
eva_evaluation_behavior_editMode = "CREATE";
|
||||
eva_evaluation_behavior_InitialForm(s);
|
||||
eva_evaluation_behavior_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_RefreshTable() {
|
||||
@@ -108,8 +108,7 @@ var eva_evaluation_behavior_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_evaluation_behavior_PutUpdate() {
|
||||
if (!ValidateForm('eva_evaluation_behavior', eva_evaluation_behavior_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_evaluation_behavior', eva_evaluation_behavior_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,9 +120,9 @@ function eva_evaluation_behavior_PutUpdate() {
|
||||
$("#eva_evaluation_behaviorModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_evaluation_behavior_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_evaluation_behavior_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
@@ -132,9 +131,9 @@ function eva_evaluation_behavior_PutUpdate() {
|
||||
$("#eva_evaluation_behaviorModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_evaluation_behavior_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_evaluation_behavior_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -145,9 +144,9 @@ function eva_evaluation_behavior_GoDelete(a) {
|
||||
$("#eva_evaluation_behaviorModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_evaluation_behavior_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_evaluation_behavior_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -157,9 +156,9 @@ function eva_evaluation_behavior_GoDelete(a) {
|
||||
var eva_evaluation_behaviorTableV;
|
||||
|
||||
var eva_evaluation_behavior_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
var sum_b = 0;
|
||||
$.each(result, function( k, v ) {
|
||||
$.each(result, function (k, v) {
|
||||
sum_b += v.weight;
|
||||
});
|
||||
$("#sum_b").text(sum_b);
|
||||
@@ -168,11 +167,11 @@ var eva_evaluation_behavior_setupTable = function (result) {
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "behavior" } ,
|
||||
{ "data": "weight" }
|
||||
{ "data": "id" },
|
||||
{ "data": "behavior" },
|
||||
{ "data": "weight" }
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -186,16 +185,17 @@ var eva_evaluation_behavior_setupTable = function (result) {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false,
|
||||
"bSort": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_evaluation_behavior_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_evaluation_behavior_GetSearchParameter());
|
||||
startLoad();
|
||||
var p = $.param(eva_evaluation_behavior_GetSearchParameter());
|
||||
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_behavior/GetListBySearch?"+p, eva_evaluation_behavior_setupTable, AlertDanger);
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_behavior/GetListBySearch?" + p, eva_evaluation_behavior_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_DoSearch() {
|
||||
@@ -203,10 +203,10 @@ function eva_evaluation_behavior_DoSearch() {
|
||||
var eva_evaluation_behavior_reload = function (result) {
|
||||
eva_evaluation_behaviorTableV.destroy();
|
||||
eva_evaluation_behavior_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_behavior/GetListBySearch?"+p, eva_evaluation_behavior_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_evaluation_behavior/GetListBySearch?" + p, eva_evaluation_behavior_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_behavior_GetSelect(f) {
|
||||
|
||||
@@ -165,7 +165,7 @@ var eva_evaluation_operating_agreement_setupTable = function (result) {
|
||||
{ "data": "mission_no" },
|
||||
{ "data": "mission_detail" },
|
||||
{ "data": "target" },
|
||||
{ "data": "indicators" },
|
||||
{ "data": "indicators" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -187,7 +187,8 @@ var eva_evaluation_operating_agreement_setupTable = function (result) {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false,
|
||||
"bSort": false
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
@@ -5,36 +5,36 @@ var eva_idp_plan_owner_API = "/api/eva_idp_plan_owner/";
|
||||
|
||||
function eva_idp_plan_owner_GetSearchParameter() {
|
||||
var eva_idp_plan_ownerSearchObject = new Object();
|
||||
eva_idp_plan_ownerSearchObject.create_evaluation_detail_id = getUrlParameter("id");
|
||||
eva_idp_plan_ownerSearchObject.create_evaluation_detail_id = getUrlParameter("id");
|
||||
|
||||
return eva_idp_plan_ownerSearchObject;
|
||||
}
|
||||
|
||||
function eva_idp_plan_owner_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_idp_plan_owner_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#s_eva_idp_plan_owner_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_idp_plan_owner_FeedDataToForm(data) {
|
||||
$("#eva_idp_plan_owner_id").val(data.id);
|
||||
$("#eva_idp_plan_owner_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#eva_idp_plan_owner_develop").val(data.develop);
|
||||
$("#eva_idp_plan_owner_development_method").val(data.development_method);
|
||||
$("#eva_idp_plan_owner_start_date").val(formatDate(data.start_date));
|
||||
$("#eva_idp_plan_owner_end_date").val(formatDate(data.end_date));
|
||||
$("#eva_idp_plan_owner_id").val(data.id);
|
||||
$("#eva_idp_plan_owner_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||
$("#eva_idp_plan_owner_develop").val(data.develop);
|
||||
$("#eva_idp_plan_owner_development_method").val(data.development_method);
|
||||
$("#eva_idp_plan_owner_start_date").val(formatDate(data.start_date));
|
||||
$("#eva_idp_plan_owner_end_date").val(formatDate(data.end_date));
|
||||
|
||||
}
|
||||
|
||||
function eva_idp_plan_owner_GetFromForm() {
|
||||
var eva_idp_plan_ownerObject = new Object();
|
||||
eva_idp_plan_ownerObject.id = $("#eva_idp_plan_owner_id").val();
|
||||
eva_idp_plan_ownerObject.create_evaluation_detail_id = getUrlParameter("id");
|
||||
eva_idp_plan_ownerObject.develop = $("#eva_idp_plan_owner_develop").val();
|
||||
eva_idp_plan_ownerObject.development_method = $("#eva_idp_plan_owner_development_method").val();
|
||||
eva_idp_plan_ownerObject.start_date = getDate($("#eva_idp_plan_owner_start_date").val());
|
||||
eva_idp_plan_ownerObject.end_date = getDate($("#eva_idp_plan_owner_end_date").val());
|
||||
eva_idp_plan_ownerObject.id = $("#eva_idp_plan_owner_id").val();
|
||||
eva_idp_plan_ownerObject.create_evaluation_detail_id = getUrlParameter("id");
|
||||
eva_idp_plan_ownerObject.develop = $("#eva_idp_plan_owner_develop").val();
|
||||
eva_idp_plan_ownerObject.development_method = $("#eva_idp_plan_owner_development_method").val();
|
||||
eva_idp_plan_ownerObject.start_date = getDate($("#eva_idp_plan_owner_start_date").val());
|
||||
eva_idp_plan_ownerObject.end_date = getDate($("#eva_idp_plan_owner_end_date").val());
|
||||
|
||||
|
||||
return eva_idp_plan_ownerObject;
|
||||
@@ -43,14 +43,14 @@ eva_idp_plan_ownerObject.end_date = getDate($("#eva_idp_plan_owner_end_date").va
|
||||
function eva_idp_plan_owner_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_idp_plan_owner_FeedDataToForm(result);
|
||||
eva_idp_plan_owner_FeedDataToSearchForm(result);
|
||||
eva_idp_plan_owner_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_idp_plan_ownerModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_idp_plan_owner_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -77,15 +77,15 @@ function eva_idp_plan_owner_SetEditForm(a) {
|
||||
eva_idp_plan_owner_editMode = "UPDATE";
|
||||
eva_idp_plan_owner_FeedDataToForm(result);
|
||||
$("#eva_idp_plan_ownerModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_idp_plan_owner_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_idp_plan_owner_SetCreateForm(s) {
|
||||
eva_idp_plan_owner_editMode = "CREATE";
|
||||
eva_idp_plan_owner_InitialForm(s);
|
||||
eva_idp_plan_owner_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_idp_plan_owner_RefreshTable() {
|
||||
@@ -103,13 +103,12 @@ var eva_idp_plan_owner_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_idp_plan_owner_PutUpdate() {
|
||||
if (!ValidateForm('eva_idp_plan_owner', eva_idp_plan_owner_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_idp_plan_owner', eva_idp_plan_owner_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = eva_idp_plan_owner_GetFromForm();
|
||||
console.log(data);
|
||||
console.log(data);
|
||||
|
||||
//Update Mode
|
||||
if (eva_idp_plan_owner_editMode === "UPDATE") {
|
||||
@@ -117,9 +116,9 @@ console.log(data);
|
||||
$("#eva_idp_plan_ownerModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_idp_plan_owner_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_idp_plan_owner_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
@@ -128,9 +127,9 @@ console.log(data);
|
||||
$("#eva_idp_plan_ownerModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_idp_plan_owner_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_idp_plan_owner_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -141,9 +140,9 @@ function eva_idp_plan_owner_GoDelete(a) {
|
||||
$("#eva_idp_plan_ownerModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_idp_plan_owner_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_idp_plan_owner_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -153,18 +152,18 @@ function eva_idp_plan_owner_GoDelete(a) {
|
||||
var eva_idp_plan_ownerTableV;
|
||||
|
||||
var eva_idp_plan_owner_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
eva_idp_plan_ownerTableV = $('#eva_idp_plan_ownerTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "develop" },
|
||||
{ "data": "development_method" },
|
||||
{ "data": "txt_start_date" },
|
||||
{ "data": "txt_end_date" },
|
||||
{ "data": "id" },
|
||||
{ "data": "develop" },
|
||||
{ "data": "development_method" },
|
||||
{ "data": "txt_start_date" },
|
||||
{ "data": "txt_end_date" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -178,16 +177,17 @@ var eva_idp_plan_owner_setupTable = function (result) {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false,
|
||||
"bSort": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_idp_plan_owner_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_idp_plan_owner_GetSearchParameter());
|
||||
console.log(apisite + "/api/eva_idp_plan_owner/GetListBySearch?"+p);
|
||||
AjaxGetRequest(apisite + "/api/eva_idp_plan_owner/GetListBySearch?"+p, eva_idp_plan_owner_setupTable, AlertDanger);
|
||||
startLoad();
|
||||
var p = $.param(eva_idp_plan_owner_GetSearchParameter());
|
||||
console.log(apisite + "/api/eva_idp_plan_owner/GetListBySearch?" + p);
|
||||
AjaxGetRequest(apisite + "/api/eva_idp_plan_owner/GetListBySearch?" + p, eva_idp_plan_owner_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_idp_plan_owner_DoSearch() {
|
||||
@@ -195,10 +195,10 @@ function eva_idp_plan_owner_DoSearch() {
|
||||
var eva_idp_plan_owner_reload = function (result) {
|
||||
eva_idp_plan_ownerTableV.destroy();
|
||||
eva_idp_plan_owner_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_idp_plan_owner/GetListBySearch?"+p, eva_idp_plan_owner_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_idp_plan_owner/GetListBySearch?" + p, eva_idp_plan_owner_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_idp_plan_owner_GetSelect(f) {
|
||||
|
||||
Reference in New Issue
Block a user