public ActionResult Search(ListVM.ConsultaVM Consulta, int? page, int? pagesize)
        {
            try
            {
                LogBLL.Insert(new LogDado("Search", "FolhaPagamento", _idUsuario));
                using (var db = new Context())
                {
                    var _bll = new BLL.FuncionarioBLL(db, _idUsuario);

                    var result = _bll.Search(Consulta.nome, Funcionario.ATIVO, page, pagesize, null);
                    var _result = new ListVM
                    {
                        Funcionarios = ListVM.E2VM(result, Consulta.mes, Consulta.ano),
                        Consulta = Consulta,
                        Ano = ListVM.GetAnos(),
                    };

                    return View("Index", _result);
                }
            }
            catch (Exception ex)
            {
                Util.Entity.ErroLog.Add(ex, Session.SessionID, _idUsuario);
                return RedirectToAction("Index", "Erro", new { area = string.Empty });
            }
        }
        public ActionResult Search(string filter, string status, int? page, int? pagesize)
        {
            try
            {
                LogBLL.Insert(new LogDado("Search", "Funcionario", _idUsuario));
                using (var db = new Context())
                {
                    var _bll = new BLL.FuncionarioBLL(db, _idUsuario);

                    var result = _bll.Search(filter, status, page, pagesize, null);

                    return View("Index", result);
				}
            }
            catch (Exception ex)
            {
                Util.Entity.ErroLog.Add(ex, Session.SessionID, _idUsuario);
                return RedirectToAction("Index", "Erro", new { area = string.Empty });
            }
        }		
        public JsonResult JsSearch(string filter, string tipo, string mensalista, int? page, int? pagesize)
        {
            try
            {
                using (var db = new Context())
                {
                    var _bll = new BLL.FuncionarioBLL(db, _idUsuario);

                    var result = _bll.Search(filter,Funcionario.ATIVO, page, pagesize, mensalista, tipo);

                    var list = result.Select(s => new 
                    {
                        s.idFuncionario,
                        s.nome,
                        s.tipo,
                        comissao = s.comissao ?? 0
                    });

                    return Json(new Util.Class.JsonCollection { result = list, count = result.TotalCount }, JsonRequestBehavior.AllowGet);
				}
            }
            catch (Exception ex)
            {
                Response.StatusCode = 500;
                return Json(RP.Util.Exception.Message.Get(ex), JsonRequestBehavior.AllowGet);
            }
        }