protected void btnIngresarCorreo_Click(object sender, EventArgs e)
        {
            iftMonitoreoCriticaNotificacion objMonitoreoCriticaNotificacion = new iftMonitoreoCriticaNotificacion();
            cMonitoreoAplicativo objCMonitoreoAplicativo = new cMonitoreoAplicativo();

            objMonitoreoCriticaNotificacion.intIdCodAppM = int.Parse(Session["intIdCodAppM"].ToString());
            objMonitoreoCriticaNotificacion.strNombreNotificacion = txtNombrePersonaNotificar.Text;
            objMonitoreoCriticaNotificacion.strCorreoNotificacion = txtCorreoNotificar.Text;
            objCMonitoreoAplicativo.insertarCriticaCorreoNotificar(objMonitoreoCriticaNotificacion);

            gvNotificaciones.DataBind();

            txtNombrePersonaNotificar.Text = "";
            txtCorreoNotificar.Text = "";

            lblMensaje.Text = "Se registro Correo a Notificar";
        }
        public void insertarCriticaCorreoNotificar(iftMonitoreoCriticaNotificacion objMonitoreoCriticaNotificacion)
        {
            using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["dbHomologacionEntities2"].ConnectionString))
            {

                #region
                using (SqlCommand command = new SqlCommand("spInsertarCriticoNotificacion", connection))
                {

                    command.CommandType = CommandType.StoredProcedure;

                    if ((objMonitoreoCriticaNotificacion.intIdCodAppM < 0 || objMonitoreoCriticaNotificacion.intIdCodAppM == null))
                    { command.Parameters.Add(new SqlParameter("@intIdCodAppM", " ")); }
                    else { command.Parameters.Add(new SqlParameter("@intIdCodAppM", objMonitoreoCriticaNotificacion.intIdCodAppM)); }

                    if ((objMonitoreoCriticaNotificacion.strNombreNotificacion.Length == 0 || objMonitoreoCriticaNotificacion.strNombreNotificacion == null))
                    { command.Parameters.Add(new SqlParameter("@strNombreNotificacion", " ")); }
                    else { command.Parameters.Add(new SqlParameter("@strNombreNotificacion", objMonitoreoCriticaNotificacion.strNombreNotificacion)); }

                    if ((objMonitoreoCriticaNotificacion.strCorreoNotificacion.Length == 0 || objMonitoreoCriticaNotificacion.strCorreoNotificacion == null))
                    { command.Parameters.Add(new SqlParameter("@strCorreoNotificacion", " ")); }
                    else { command.Parameters.Add(new SqlParameter("@strCorreoNotificacion", objMonitoreoCriticaNotificacion.strCorreoNotificacion)); }

                    connection.Open();
                    command.ExecuteNonQuery();
                }
                #endregion

            }
        }