PageModule.prototype.querySearch = function(grievanceNumber, Name,
legalEmployer, bargainingUnit, fromDate, toDate, logInUserLE, role) {
var queryParam = "";
var condition = "";
if (grievanceNumber !== null && grievanceNumber !== '' &&
grievanceNumber !== undefined) {
queryParam = "grievanceNumber LIKE '%" + grievanceNumber + "%'";
condition = " and ";
}
if (Name !== null && Name !== '' && Name !== undefined) {
queryParam = queryParam + condition + "employee LIKE '%" + Name + "%'";
condition = " and ";
}
if (legalEmployer !== null && legalEmployer !== '' && legalEmployer !==
undefined) {
queryParam = queryParam + condition + "legalEmployer = '" + legalEmployer + "'";
condition = " and ";
}
if (bargainingUnit !== null && bargainingUnit !== '' && bargainingUnit !== undefined) {
queryParam = queryParam + condition + "bargainingUnit = '" + bargainingUnit + "'";
condition = " and ";
}
if (fromDate !== null && fromDate !== '' && fromDate !== undefined) {
queryParam = queryParam + condition + "dateFiled > '" + fromDate + "'";
condition = " and ";
}
if (toDate !== null && toDate !== '' && toDate !== undefined) {
queryParam = queryParam + condition + "dateFiled < '" + toDate + "'";
condition = " and ";
}
console.log("queryParam6 : " + queryParam);
return queryParam;
};
Comments