เพิ่มตัวเลือก ทั้งหมด
This commit is contained in:
@@ -229,6 +229,11 @@ namespace TodoAPI2.Models
|
|||||||
var alldep = (from x in emp.GetDeptMapping()
|
var alldep = (from x in emp.GetDeptMapping()
|
||||||
where x.id == dep || x.id2 == dep
|
where x.id == dep || x.id2 == dep
|
||||||
select x.id);
|
select x.id);
|
||||||
|
var option_1 = new external_linkageViewModel();
|
||||||
|
option_1.id_guid = Guid.Empty;
|
||||||
|
option_1.external_name = "ทั้งหมด";
|
||||||
|
var option_all = new List<external_linkageViewModel>();
|
||||||
|
option_all.Add(option_1);
|
||||||
var alleva = (from x in _repository.Context.eva_create_evaluation
|
var alleva = (from x in _repository.Context.eva_create_evaluation
|
||||||
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
||||||
where x.employee_id == emp_id
|
where x.employee_id == emp_id
|
||||||
@@ -247,10 +252,10 @@ namespace TodoAPI2.Models
|
|||||||
orderby x.fullname
|
orderby x.fullname
|
||||||
select new external_linkageViewModel { external_id = x.id, external_name = x.fullname }
|
select new external_linkageViewModel { external_id = x.id, external_name = x.fullname }
|
||||||
).ToList();
|
).ToList();
|
||||||
i.item_evaluation_round_search = (from x in _repository.Context.eva_performance_plan
|
i.item_evaluation_round_search = option_all.Union((from x in _repository.Context.eva_performance_plan
|
||||||
orderby x.fiscal_year descending, x.theTime descending
|
orderby x.fiscal_year descending, x.theTime descending
|
||||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||||
).ToList();
|
)).ToList();
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,6 +269,11 @@ namespace TodoAPI2.Models
|
|||||||
var alldep = (from x in emp.GetDeptMapping()
|
var alldep = (from x in emp.GetDeptMapping()
|
||||||
where x.id == dep || x.id2 == dep
|
where x.id == dep || x.id2 == dep
|
||||||
select x.id);
|
select x.id);
|
||||||
|
var option_1 = new external_linkageViewModel();
|
||||||
|
option_1.id_guid = Guid.Empty;
|
||||||
|
option_1.external_name = "ทั้งหมด";
|
||||||
|
var option_all = new List<external_linkageViewModel>();
|
||||||
|
option_all.Add(option_1);
|
||||||
var alleva = (from x in _repository.Context.eva_create_evaluation
|
var alleva = (from x in _repository.Context.eva_create_evaluation
|
||||||
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
||||||
where x.employee_id == emp_id
|
where x.employee_id == emp_id
|
||||||
@@ -282,10 +292,10 @@ namespace TodoAPI2.Models
|
|||||||
orderby x.fullname
|
orderby x.fullname
|
||||||
select new external_linkageViewModel { external_id = x.id, external_name = x.fullname }
|
select new external_linkageViewModel { external_id = x.id, external_name = x.fullname }
|
||||||
).ToList();
|
).ToList();
|
||||||
i.item_evaluation_round_search = (from x in _repository.Context.eva_performance_plan
|
i.item_evaluation_round_search = option_all.Union((from x in _repository.Context.eva_performance_plan
|
||||||
orderby x.fiscal_year descending, x.theTime descending
|
orderby x.fiscal_year descending, x.theTime descending
|
||||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||||
).ToList();
|
)).ToList();
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,6 +331,10 @@ namespace TodoAPI2.Models
|
|||||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||||
).FirstOrDefault().id_guid.ToString();
|
).FirstOrDefault().id_guid.ToString();
|
||||||
}
|
}
|
||||||
|
else if (Guid.Parse(model.evaluation_round_search) == Guid.Empty)
|
||||||
|
{
|
||||||
|
model.evaluation_round_search = null;
|
||||||
|
}
|
||||||
|
|
||||||
var allemp = emp.GetListByemployee_type(null, null);
|
var allemp = emp.GetListByemployee_type(null, null);
|
||||||
var dept = ext.GetDepartmentData();
|
var dept = ext.GetDepartmentData();
|
||||||
|
|||||||
@@ -225,6 +225,11 @@ namespace TodoAPI2.Models
|
|||||||
var alldep = (from x in emp.GetDeptMapping()
|
var alldep = (from x in emp.GetDeptMapping()
|
||||||
where x.id == dep || x.id2 == dep
|
where x.id == dep || x.id2 == dep
|
||||||
select x.id);
|
select x.id);
|
||||||
|
var option_1 = new external_linkageViewModel();
|
||||||
|
option_1.id_guid = Guid.Empty;
|
||||||
|
option_1.external_name = "ทั้งหมด";
|
||||||
|
var option_all = new List<external_linkageViewModel>();
|
||||||
|
option_all.Add(option_1);
|
||||||
var alleva = (from x in _repository.Context.eva_create_evaluation
|
var alleva = (from x in _repository.Context.eva_create_evaluation
|
||||||
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
||||||
where x.employee_id == emp_id
|
where x.employee_id == emp_id
|
||||||
@@ -245,10 +250,16 @@ namespace TodoAPI2.Models
|
|||||||
&& alleva.Contains(x.id)
|
&& alleva.Contains(x.id)
|
||||||
orderby x.fullname
|
orderby x.fullname
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
item.item_evaluation_round_search = (from x in _repository.Context.eva_performance_plan
|
|
||||||
orderby x.fiscal_year descending, x.theTime descending
|
var allround = (from y in _repository.Context.eva_create_evaluation
|
||||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
select y.performance_plan_id).ToList();
|
||||||
).ToList();
|
|
||||||
|
item.item_evaluation_round_search = option_all.Union((from x in _repository.Context.eva_performance_plan
|
||||||
|
where allround.Contains(x.id)
|
||||||
|
orderby x.fiscal_year descending, x.theTime descending
|
||||||
|
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||||
|
)).ToList();
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,6 +272,12 @@ namespace TodoAPI2.Models
|
|||||||
var alldep = (from x in emp.GetDeptMapping()
|
var alldep = (from x in emp.GetDeptMapping()
|
||||||
where x.id == dep || x.id2 == dep
|
where x.id == dep || x.id2 == dep
|
||||||
select x.id);
|
select x.id);
|
||||||
|
var option_1 = new external_linkageViewModel();
|
||||||
|
option_1.id_guid = Guid.Empty;
|
||||||
|
option_1.external_name = "ทั้งหมด";
|
||||||
|
var option_all = new List<external_linkageViewModel>();
|
||||||
|
option_all.Add(option_1);
|
||||||
|
|
||||||
var alleva = (from x in _repository.Context.eva_create_evaluation
|
var alleva = (from x in _repository.Context.eva_create_evaluation
|
||||||
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
join y in _repository.Context.eva_create_evaluation_detail on x.id equals y.create_evaluation_id
|
||||||
where x.employee_id == emp_id
|
where x.employee_id == emp_id
|
||||||
@@ -278,10 +295,15 @@ namespace TodoAPI2.Models
|
|||||||
&& alleva.Contains(x.id)
|
&& alleva.Contains(x.id)
|
||||||
orderby x.fullname
|
orderby x.fullname
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
i.item_evaluation_round_search = (from x in _repository.Context.eva_performance_plan
|
|
||||||
|
var allround = (from y in _repository.Context.eva_create_evaluation
|
||||||
|
select y.performance_plan_id).ToList();
|
||||||
|
|
||||||
|
i.item_evaluation_round_search = option_all.Union((from x in _repository.Context.eva_performance_plan
|
||||||
|
where allround.Contains(x.id)
|
||||||
orderby x.fiscal_year descending, x.theTime descending
|
orderby x.fiscal_year descending, x.theTime descending
|
||||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||||
).ToList();
|
)).ToList();
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@@ -328,6 +350,10 @@ namespace TodoAPI2.Models
|
|||||||
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
select new external_linkageViewModel { id_guid = x.id, external_name = checkNull(x.theTime) + "/" + checkNull(x.fiscal_year) }
|
||||||
).FirstOrDefault().id_guid.ToString();
|
).FirstOrDefault().id_guid.ToString();
|
||||||
}
|
}
|
||||||
|
else if(Guid.Parse(model.evaluation_round_search) == Guid.Empty)
|
||||||
|
{
|
||||||
|
model.evaluation_round_search = null;
|
||||||
|
}
|
||||||
|
|
||||||
var allemp = emp.GetListByemployee_type(null, null);
|
var allemp = emp.GetListByemployee_type(null, null);
|
||||||
var all_org_id = from i in ext.GetAllChildInDep(model.org_id) select i.external_id;
|
var all_org_id = from i in ext.GetAllChildInDep(model.org_id) select i.external_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user