コード例 #1
0
        public ActionResult ReporteTV()
        {
            if (Session["Usuario"] == null)
            {
                string  macAddresses = "", lnsUsuario = "";
                BLAdmin admin = new BLAdmin();
                macAddresses = System.Web.HttpContext.Current.Request.UserHostAddress;
                lnsUsuario   = admin.ObtenerUsuario(macAddresses);

                if (lnsUsuario.Trim() != "XXXX")
                {
                    Session["Usuario"] = lnsUsuario;
                    ReporteProduccionModelo rp = new ReporteProduccionModelo();
                    return(View(rp));
                }
                else
                {
                    return(RedirectToAction("Login", "Login"));
                }
            }
            else
            {
                ReporteProduccionModelo rp = new ReporteProduccionModelo();
                return(View(rp));
            }
        }