Пример #1
0
        public ActionResult Pesquisa(FormCollection collection)
        {
            DateTime thisDay = DateTime.Now;

            String pesquisa1 = collection["pesquisa1"].Trim();
            String pesquisa2 = collection["pesquisa2"].Trim();

            var mes           = thisDay.ToString("MM");
            var ano           = thisDay.ToString("yyyy");
            var mesreferencia = mes + "/" + ano;

            Usuarios user = new Usuarios();

            if (UsuarioRepostorio.GetUsuario().Equals(""))
            {
                ViewBag.acesso        = false;
                ViewBag.nome          = "";
                ViewBag.descricao     = "";
                ViewBag.mesreferencia = "";
            }
            else
            {
                user                  = UsuarioRepostorio.GetUsuarioLogado();
                ViewBag.nome          = user.nome;
                ViewBag.descricao     = user.descricao;
                ViewBag.mesreferencia = mesreferencia;
                ViewBag.acesso        = true;
            }

            return(View());
        }
Пример #2
0
        public ActionResult Index(int?pagina, string op = null)
        {
            DateTime thisDay = DateTime.Now;


            if (UsuarioRepostorio.GetUsuario().Equals(""))
            {
            }

            var mes           = thisDay.ToString("MM");
            var ano           = thisDay.ToString("yyyy");
            var mesreferencia = mes + "/" + ano;

            Usuarios user = new Usuarios();

            if (UsuarioRepostorio.GetUsuario().Equals(""))
            {
                ViewBag.acesso        = false;
                ViewBag.nome          = "";
                ViewBag.descricao     = "";
                ViewBag.mesreferencia = "";
            }
            else
            {
                user                  = UsuarioRepostorio.GetUsuarioLogado();
                ViewBag.nome          = user.nome;
                ViewBag.descricao     = user.descricao;
                ViewBag.mesreferencia = mesreferencia;
                ViewBag.acesso        = true;
            }

            return(View());
        }