Ejemplo n.º 1
0
        public ActionResult ChatDenuncia(string Ruta, int Id = 0)
        {
            if (Id > 0)
            {
                Session["IdDenuncia"] = Id;
            }
            string link = "";
            bool   log  = Convert.ToBoolean(Session["LogOK"]);

            if (log == true)
            {
                string valor = "";
                if (Ruta == null)
                {
                    Ruta = Session["personaenvia"].ToString();
                }
                else
                {
                    Session["personaenvia"] = Ruta;
                }
                //int tipo = Convert.ToInt32(Session["Tipo"]);
                valor = Ruta;

                SqlCommand cmd;
                cmd = new SqlCommand("UPDATE Denuncias SET Estado = 1 WHERE Id='" + Id + "'");
                conex.EjecutarComando(cmd);

                return(View(ChatDAO.AbrirMensajeDenuncia(valor, Convert.ToInt32(Session["IdDenuncia"]))));
            }
            else
            {
                link = "/FrontEnd/Login";
                return(Redirect(link));
            }
        }