ปรับปรุงรายงานให้ดูง่ายขึ้น

This commit is contained in:
Nakorn Rientrakrunchai
2020-03-12 16:38:14 +07:00
parent e30e8ea575
commit 9301e2cf08
15 changed files with 36 additions and 29 deletions

View File

@@ -33,9 +33,9 @@ namespace TodoAPI2.Models
public rep_familyWithSelectionViewModel GetBlankItem()
{
var i = new rep_familyWithSelectionViewModel();
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) select x).ToList();
i.item_position_id = (from x in ext.GetPositionForReport() select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) orderby x.fullname select x).ToList();
i.item_position_id = (from x in ext.GetPositionForReport() orderby x.external_name select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
i.item_relation_id = (from x in ext.GetRelationshipForReport() select x).ToList();

View File

@@ -34,8 +34,8 @@ namespace TodoAPI2.Models
{
var i = new rep_leave_summaryWithSelectionViewModel();
i.item_fiscal_year = (from x in ext.GetFiscalYear() select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) orderby x.fullname select x).ToList();
return i;
}

View File

@@ -33,8 +33,8 @@ namespace TodoAPI2.Models
public rep_leave_totalWithSelectionViewModel GetBlankItem()
{
var i = new rep_leave_totalWithSelectionViewModel();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) orderby x.fullname select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
return i;

View File

@@ -34,9 +34,9 @@ namespace TodoAPI2.Models
public rep_position_salaryWithSelectionViewModel GetBlankItem()
{
var i = new rep_position_salaryWithSelectionViewModel();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) select x).ToList();
i.item_position_id = (from x in ext.GetPositionForReport() select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) orderby x.fullname select x).ToList();
i.item_position_id = (from x in ext.GetPositionForReport() orderby x.external_name select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
return i;

View File

@@ -33,8 +33,8 @@ namespace TodoAPI2.Models
public rep_samanaWithSelectionViewModel GetBlankItem()
{
var i = new rep_samanaWithSelectionViewModel();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) orderby x.fullname select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
return i;
}

View File

@@ -33,10 +33,10 @@ namespace TodoAPI2.Models
public rep_study_historyWithSelectionViewModel GetBlankItem()
{
var i = new rep_study_historyWithSelectionViewModel();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
i.item_position_id = (from x in ext.GetPositionForReport() select x).ToList();
i.item_study_level_id = (from x in ext.GetEducationForReport() select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) orderby x.fullname select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
i.item_position_id = (from x in ext.GetPositionForReport() orderby x.external_name select x).ToList();
i.item_study_level_id = (from x in ext.GetEducationForReport() orderby x.external_name select x).ToList();
return i;

View File

@@ -13,7 +13,6 @@ namespace TodoAPI2.Models
public interface Irep_working_typeService
{
rep_working_typeWithSelectionViewModel GetWithSelection(Guid id);
rep_working_typeWithSelectionViewModel GetBlankItem();

View File

@@ -57,21 +57,11 @@ namespace TodoAPI2.Models
#region Query Functions
public rep_working_typeWithSelectionViewModel GetWithSelection(Guid id)
{
var entity = _repository.Get(id);
var i = Mapper.Map<rep_working_typeWithSelectionViewModel>(entity);
i.item_employee_id = emp.GetListByemployee_type(null, null);
i.item_org_id = ext.GetDepartmentDataForReport();
return i;
}
public rep_working_typeWithSelectionViewModel GetBlankItem()
{
var i = new rep_working_typeWithSelectionViewModel();
i.item_employee_id = emp.GetListByemployee_type(null, null);
i.item_org_id = ext.GetDepartmentDataForReport();
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) orderby x.fullname select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
return i;

View File

@@ -63,6 +63,9 @@
$(document).ready(function () {
rep_family_InitialForm();
SetupValidationRemark("s_rep_family");
$("#s_rep_family_employee_id").select2();
$("#s_rep_family_position_id").select2();
$("#s_rep_family_org_id").select2();
});
</script>
}

View File

@@ -59,6 +59,8 @@
$(document).ready(function () {
rep_leave_summary_InitialForm();
SetupValidationRemark("s_rep_leave_summary");
$("#s_rep_leave_summary_org_id").select2();
$("#s_rep_leave_summary_employee_id").select2();
});
</script>
}

View File

@@ -67,6 +67,8 @@
$(document).ready(function () {
rep_leave_total_InitialForm();
SetupValidationRemark("s_rep_leave_total");
$("#s_rep_leave_total_employee_id").select2();
$("#s_rep_leave_total_org_id").select2();
});
</script>
}

View File

@@ -59,6 +59,9 @@
$(document).ready(function () {
rep_position_salary_InitialForm();
SetupValidationRemark("s_rep_position_salary");
$("#s_rep_position_salary_employee_id").select2();
$("#s_rep_position_salary_position_id").select2();
$("#s_rep_position_salary_org_id").select2();
});
</script>
}

View File

@@ -63,6 +63,8 @@
$(document).ready(function () {
rep_samana_InitialForm();
SetupValidationRemark("s_rep_samana");
$("#s_rep_samana_employee_id").select2();
$("#s_rep_samana_org_id").select2();
});
</script>
}

View File

@@ -63,6 +63,10 @@
$(document).ready(function () {
rep_study_history_InitialForm();
SetupValidationRemark("s_rep_study_history");
$("#s_rep_study_history_employee_id").select2();
$("#s_rep_study_history_org_id").select2();
$("#s_rep_study_history_position_id").select2();
$("#s_rep_study_history_study_level_id").select2();
});
</script>
}

View File

@@ -64,6 +64,8 @@
$(document).ready(function () {
rep_working_type_InitialForm();
SetupValidationRemark("s_rep_working_type");
$("#s_rep_working_type_employee_id").select2();
$("#s_rep_working_type_org_id").select2();
});
</script>
}