protected void EnviarTarea(int codigoProyecto, string tipoActividad, string accion, string nombreActividad)
        {
            var codigoInterventor = ActividadPlanOperativo.GetInterventorId(codigoProyecto);

            if (codigoInterventor != null)
            {
                AgendarTarea agenda = new AgendarTarea(
                    codigoInterventor.GetValueOrDefault(),
                    "Actividad de " + tipoActividad + " " + accion + " - Proyecto " + codigoProyecto,
                    "Revisar actividad de " + tipoActividad + " - Actividad --> " + nombreActividad + "<br>Observaciones:</br> Aprobado por gerente interventor de manera masiva.",
                    codigoProyecto.ToString(),
                    2,
                    "0",
                    false,
                    1,
                    true,
                    false,
                    usuario.IdContacto,
                    "CodProyecto=" + codigoProyecto,
                    "",
                    "Catálogo Actividad" + tipoActividad);

                agenda.Agendar();
            }
        }
Exemple #2
0
        protected void Button1_click(object sender, EventArgs e)
        {
            if (ListBox1.Items.Count != 0)
            {
                string listausuarios = " ";

                foreach (ListItem li in ListBox1.Items)
                {
                    if (li.Selected)
                    {
                        listausuarios = listausuarios + " " + li.Text + " ";

                        bool wrequiererespuesta = false;

                        if (ddl_respuesta.SelectedValue.Trim() == "Sí")
                        {
                            wrequiererespuesta = true;
                        }

                        AgendarTarea agenda = new AgendarTarea(Int32.Parse(li.Value), tb_tarea.Text, tb_descripcion.Text, plan_seleccionado.Value, int.Parse(ddl_usuarios.SelectedValue), "0", Convert.ToBoolean(ddl_avisar.SelectedValue), Int32.Parse(ddl_urgencia.SelectedValue.ToString()), false, wrequiererespuesta, usuario.IdContacto, null, null, null);
                        agenda.Agendar();
                    }
                }

                if (ddl_avisar.SelectedValue == "Sí" || ddl_avisar.SelectedValue == "True")
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('Se ha enviado correo a los siguiente usuarios: " + listausuarios + "');window.location='TareasAgendar.aspx'", true);
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('Tarea " + tb_tarea.Text + " Agendada');window.location='TareasAgendar.aspx'", true);
                }
            }
        }
        /// <summary>
        /// Agendar tarea a jefe de unidad
        /// </summary>
        /// <param name="codigoNuevoProyecto">Codigo del proyecto que fue creado</param>
        public void agendarTareaJefeUnidad(int codigoNuevoProyecto)
        {
            using (Datos.FonadeDBDataContext db = new Datos.FonadeDBDataContext(System.Configuration.ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString))
            {
                var jefeDeUnidad = (from institucion in consultas.Db.InstitucionContacto where institucion.FechaFin == null && institucion.CodInstitucion == usuario.CodInstitucion select institucion).FirstOrDefault();

                if (jefeDeUnidad != null)
                {
                    AgendarTarea nuevaTarea = new AgendarTarea(
                        jefeDeUnidad.CodContacto,
                        "Registro Plan de Negocio",
                        "Registro Plan de Negocio",
                        codigoNuevoProyecto.ToString(),
                        1,
                        "0",
                        true,
                        0,
                        true,
                        true,
                        usuario.IdContacto,
                        string.Empty,
                        string.Empty,
                        string.Empty);
                    nuevaTarea.Agendar();
                }
            }
        }
        public void modificar(int id_Riesgo, String Riesgo, String Mitigacion, String Observacion, String CodEjeFuncional)
        {
            datosEntrada();
            txtSQL = "select CodCoordinador from interventor where codcontacto=" + usuario.IdContacto;

            var reader = consultas.ObtenerDataTable(txtSQL, "text"); // ejecutaReader(txtSQL, 1);

            if (reader.Rows.Count > 0)
            {
                if (reader.Rows.Count > 0)
                {
                    int codInter = Convert.ToInt32(reader.Rows[0].ItemArray[0].ToString());

                    txtSQL = @"Insert into InterventorRiesgoTMP (Id_riesgo,CodProyecto,Riesgo,Mitigacion,CodejeFuncional,Observacion,Tarea) " +
                             "values (" + id_Riesgo + "," + CodProyecto + ",'" + Riesgo + "','" + Mitigacion + "', " + HttpContext.Current.Session["CodEjeFuncional"].ToString() + ", '" + Observacion + "','Modificar')";

                    AgendarTarea agenda = new AgendarTarea(
                        codInter, "Modificar", Riesgo, CodProyecto, 2, "0", false, 1, false, false, usuario.IdContacto, "Modificar", "", "");
                    //                codInter, "Modificar", Riesgo, CodProyecto, id_Riesgo, "0", false, 1, false, false, usuario.IdContacto, "Modificar", "", "");


                    agenda.Agendar();

                    ejecutaReader(txtSQL, 2);
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('No tiene ningún coordinador asignado.');", true);
                    return;
                }
            }
        }
Exemple #5
0
        protected void Button1_click(object sender, EventArgs e)
        {
            if (ListBox1.Items.Count != 0)
            {
                string listausuarios = "<ul>";

                foreach (ListItem li in ListBox1.Items)
                {
                    if (li.Selected)
                    {
                        listausuarios = listausuarios + "<li>" + li.Text + "</li>";

                        AgendarTarea agenda = new AgendarTarea(Int32.Parse(li.Value), tb_tarea.Text, tb_descripcion.Text, DropDownList1.SelectedValue, 1, "0", false, Int32.Parse(ddl_urgencia.SelectedValue.ToString()), false, false, usuario.IdContacto, null, null, null);

                        agenda.Agendar();

                        string txtSQL;

                        txtSQL = "SELECT Max(Id_TareaUsuario) FROM TareaUsuario WHERE CodContactoAgendo = " + usuario.IdContacto;

                        var reader = consultas.ObtenerDataTable(txtSQL, "text"); // ejecutaReader(txtSQL, 1);

                        if (reader.Rows.Count > 0)
                        {
                            if (reader.Rows.Count > 0)
                            {
                                txtSQL = "INSERT INTO TareaUsuarioRepeticion (Fecha, CodTareaUsuario, Parametros) VALUES (" + "Getdate()," + reader.Rows[0].ItemArray[0].ToString() + ",'" + Int32.Parse(li.Value) + tb_tarea.Text + tb_descripcion.Text + DropDownList1.SelectedValue + 1 + "0" + false + Int32.Parse(ddl_urgencia.SelectedValue.ToString()) + false + false + usuario.IdContacto + null + null + null + "'" + ")";

                                ejecutaReader(txtSQL, 2);
                            }
                        }

                        if (ddl_avisar.SelectedValue == "Sí")
                        {
                        }
                    }
                }
                listausuarios = listausuarios + "</ul>";
                if (ddl_avisar.SelectedValue == "Sí")
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('se ha enviado correo a los siguiente usuarios: " + listausuarios + "')", true);
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('Tarea " + tb_tarea.Text + " Agendada')", true);
                }
            }
        }
Exemple #6
0
        protected void agendarTareaGerente(int codigoGerenteInterventor, int codigoProyecto, int idRiesgoTmp)
        {
            AgendarTarea agenda = new AgendarTarea(
                codigoGerenteInterventor,
                "Revisión Riesgos al Plan Operativo",
                "Revisión Adición, Modificación o Borrado de Riesgos del interventor al Plan Operativo",
                codigoProyecto.ToString(),
                23,
                "0",
                false,
                1,
                false,
                false,
                usuario.IdContacto,
                idRiesgoTmp.ToString(),
                "",
                "");

            agenda.Agendar();
        }
        private void TareaAgendar(int codActivdad, int codProyecto, int agendo, int paraQuien, string nomProyecto, string nomActividad, string asunto, string detalle)
        {
            AgendarTarea agenda = new AgendarTarea
                                      (paraQuien,
                                      asunto,
                                      "Revisar la actividad de Producción " + nomProyecto + " - Actividad --> " + nomActividad + " Observaciones: " + detalle.Trim(),
                                      codProyecto.ToString(),
                                      2,
                                      "0",
                                      true,
                                      1,
                                      true,
                                      false,
                                      agendo,
                                      "CodProyecto=" + codProyecto.ToString(),
                                      "",
                                      "Catálogo Actividad Producción");

            agenda.Agendar();
        }
Exemple #8
0
        protected void EnviarTarea(int codigoProyecto, int remitente, int destinatario, string accion, string tarea, int idTarea)
        {
            AgendarTarea agenda = new AgendarTarea(
                destinatario,
                accion + " de tarea especial de interventoria " + tarea + " " + " - Proyecto " + codigoProyecto,
                "Revisar tarea especial de interventoria ---> " + tarea + " Ver tarea en Tarea especiales de interventoria mediante este enlace.",
                codigoProyecto.ToString(),
                33,
                "0",
                false,
                1,
                true,
                false,
                remitente,
                "tareaEspecial=" + idTarea,
                "",
                "Tarea especial de interventoria");

            agenda.Agendar();
        }
        /// <summary>
        /// Mauricio Arias Olave.
        /// 16/05/2014.
        /// Enviar Email "método de FONADE clásico".
        /// </summary>
        /// <param name="txtFrom">De:</param>
        /// <param name="txtSubject">Para:</param>
        /// <param name="txtMessage">Cuerpo del mensaje.</param>
        private void EnviarMail(string txtFrom, string txtSubject, string txtMessage)
        {
            //Inicializar variables.
            DataTable RSContacto = new DataTable();
            DataTable RS         = new DataTable();

            try
            {
                //Consulta.
                txtSQL = "Select nombres, apellidos, identificacion from contacto where id_contacto = " + usuario.IdContacto;

                //Asignar resultados de la consulta a variable DataTable
                RSContacto = consultas.ObtenerDataTable(txtSQL, "text");

                //Información de los emprendedores de la Empresa.
                txtSQL = " SELECT Empresa.razonsocial, Empresa.codproyecto, ProyectoContacto.CodContacto " +
                         " FROM Empresa INNER JOIN ProyectoContacto ON Empresa.codproyecto = ProyectoContacto.CodProyecto " +
                         " WHERE (ProyectoContacto.CodRol = " + Datos.Constantes.CONST_RolEmprendedor + ") " +
                         " AND (ProyectoContacto.Inactivo = 0) " +
                         " AND (Empresa.Nit = '" + DD_Empresas.SelectedValue + "')";

                //Asignar resultados de la consulta anterior a variable DataTable.
                RS = consultas.ObtenerDataTable(txtSQL, "text");

                //Recorrer filas del DataTable anterior para generar tareas pendientes.
                for (int i = 0; i < RS.Rows.Count; i++)
                {
                    string Mensaje = "<br/><br/><br/>" + RSContacto.Rows[0]["nombres"].ToString() + " " + RSContacto.Rows[0]["apellidos"].ToString() +
                                     "<br/>C.C. " + RSContacto.Rows[0]["identificacion"].ToString();

                    //Instancia de la clase "Tarea".
                    AgendarTarea tarea = new AgendarTarea(Int32.Parse(RSContacto.Rows[0]["identificacion"].ToString()), "Visita de Interventoría",
                                                          Mensaje, RS.Rows[i]["CodProyecto"].ToString(), Datos.Constantes.CONST_Generica, "0", true, 1, true, false,
                                                          usuario.IdContacto, "", "", "Adicionar Visita");
                    //Agendar tarea.
                    tarea.Agendar();
                }
            }
            catch { }
        }
Exemple #10
0
        public void eliminar(int id_Riesgo)
        {
            datosEntrada();
            txtSQL = "select CodCoordinador from interventor where codcontacto=" + usuario.IdContacto; //1

            var reader = consultas.ObtenerDataTable(txtSQL, "text");                                   // ejecutaReader(txtSQL, 1);

            if (reader.Rows.Count > 0)
            {
                if (reader.Rows.Count > 0)
                {
                    int codInter = Convert.ToInt32(reader.Rows[0].ItemArray[0].ToString());
                    txtSQL = "SELECT * FROM InterventorRiesgo  WHERE Id_riesgo=" + id_Riesgo;

                    reader = consultas.ObtenerDataTable(txtSQL, "text"); // ejecutaReader(txtSQL, 1);


                    if (reader.Rows.Count > 0)
                    {
                        if (reader.Rows.Count > 0)
                        {
                            txtSQL = @"Insert into InterventorRiesgoTMP (Id_riesgo,CodProyecto,Riesgo,Mitigacion,CodejeFuncional,Observacion,Tarea) " +
                                     "values (" + id_Riesgo + "," + CodProyecto + ",'" + reader.Rows[0].ItemArray[2].ToString() + "','" + reader.Rows[0].ItemArray[3].ToString() + "', " + reader.Rows[0].ItemArray[4].ToString() + ", '" + reader.Rows[0].ItemArray[5].ToString() + "','Borrar')";

                            AgendarTarea agenda = new AgendarTarea(
                                codInter, "Borrar", reader.Rows[0].ItemArray[2].ToString(), CodProyecto, id_Riesgo, "0", false, 1, false, false, usuario.IdContacto, "Borrar", "", "");
                            agenda.Agendar();

                            ejecutaReader(txtSQL, 2);
                        }
                        else
                        {
                            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('No tiene ningún coordinador asignado.');", true);
                            return;
                        }
                    }
                }
            }
        }
Exemple #11
0
        protected void ActivarProyecto(string IdProyecto)
        {
            var query = (from p in consultas.Db.Proyecto
                         where p.Id_Proyecto == Convert.ToInt32(IdProyecto) &&
                         p.CodInstitucion == usuario.CodInstitucion
                         select p).First();

            query.Inactivo            = false;
            query.MotivoDesactivacion = null;
            consultas.Db.SubmitChanges();

            var queryNombre = (from p in consultas.Db.Proyecto
                               where p.Id_Proyecto == Convert.ToInt32(IdProyecto)
                               select new { p.NomProyecto }).First();
            string       nombreProyecto = queryNombre.NomProyecto;
            AgendarTarea agenda         = new AgendarTarea(usuario.IdContacto, "Asignar Asesor",
                                                           "Asignar Asesor a el proyecto " + nombreProyecto, IdProyecto, 3, "0",
                                                           false,
                                                           1, true, false, usuario.IdContacto, "CodProyecto=" + IdProyecto, "",
                                                           "Asignar Asesor");

            agenda.Agendar();
        }
Exemple #12
0
        /// <summary>
        /// Según FONADE clásico, hace una acción y luego carga/dibuja nuevamente la información...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnEnviar_Click(object sender, EventArgs e)
        {
            //Inicializar variables.
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
            SqlCommand    cmd = new SqlCommand();
            DataTable     RS  = new DataTable();

            if (Aprobado.SelectedValue == "Si")
            {
                #region Si es aprobado.

                txtSQL = " UPDATE PagoActividad SET FechaInterventor=Getdate(), Estado = " + Constantes.CONST_EstadoCoordinador + ", " +
                         " ObservaInterventor = '" + ObservacionesInter.Text + "' WHERE Id_PagoActividad = " + CodPagoActividad;

                try
                {
                    cmd = new SqlCommand(txtSQL, con);

                    if (con != null)
                    {
                        if (con.State != ConnectionState.Open)
                        {
                            con.Open();
                        }
                    }
                    cmd.CommandType = CommandType.Text;
                    cmd.ExecuteNonQuery();
                    //con.Close();
                    //con.Dispose();
                    cmd.Dispose();
                }
                catch { }
                finally {
                    con.Close();
                    con.Dispose();
                }
                #endregion
            }
            else
            {
                #region Si no es aprobado, se le devuelve al emprendedor.

                txtSQL = " UPDATE PagoActividad SET FechaInterventor=Getdate(), Estado = " + Constantes.CONST_EstadoEdicion + ", " +
                         " ObservaInterventor = '" + ObservacionesInter.Text + "' WHERE Id_PagoActividad = " + CodPagoActividad;

                try
                {
                    con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
                    cmd = new SqlCommand(txtSQL, con);

                    if (con != null)
                    {
                        if (con.State != ConnectionState.Open)
                        {
                            con.Open();
                        }
                    }
                    cmd.CommandType = CommandType.Text;
                    cmd.ExecuteNonQuery();
                    //con.Close();
                    //con.Dispose();
                    cmd.Dispose();
                }
                catch { }
                finally {
                    con.Close();
                    con.Dispose();
                }
                #endregion

                #region Se generan tareas para los emprendedores
                //Numero de la tarea
                txtSQL = "SELECT Id_TareaPrograma FROM TareaPrograma WHERE NomTareaPrograma = 'Revisión de Solicitud de Pago - Emprendedor'";
                RS     = consultas.ObtenerDataTable(txtSQL, "text");

                int CodTareaPrograma = 32;

                if (RS.Rows.Count > 0)
                {
                    CodTareaPrograma = Int32.Parse(RS.Rows[0]["Id_TareaPrograma"].ToString());
                }
                #endregion

                #region Tipo de pago, parametro del programa

                txtSQL = " SELECT TipoPago FROM PagoActividad WHERE Id_PagoActividad = " + CodPagoActividad;

                RS = consultas.ObtenerDataTable(txtSQL, "text");

                int CodTipoPago = 1;
                if (RS.Rows.Count > 0)
                {
                    CodTipoPago = Int32.Parse(RS.Rows[0]["TipoPago"].ToString());
                }

                #endregion

                #region Emprendedores del proyecto

                txtSQL = " SELECT CodContacto FROM ProyectoContacto " +
                         " WHERE CodProyecto = " + CodProyecto +
                         " AND Inactivo = 0 AND CodRol = " + Constantes.CONST_RolEmprendedor;
                RS = consultas.ObtenerDataTable(txtSQL, "text");

                foreach (DataRow row in RS.Rows)
                {
                    string param = "";
                    param = "Accion=Editar&CodProyecto=" + CodProyecto + "&CodPagoActividad=" + CodPagoActividad + "&CodEstado=" + Constantes.CONST_EstadoEdicion + "&TipoPago=" + CodTipoPago;
                    AgendarTarea agenda = new AgendarTarea
                                              (Int32.Parse(row["CodContacto"].ToString()),
                                              "Revisar Solicitud de Pago",
                                              "Revisar Solicitud de Pago No. " + CodPagoActividad + "<br/>" + ObservacionesInter.Text,
                                              CodProyecto,
                                              CodTareaPrograma,
                                              "0",
                                              true,
                                              1,
                                              true,
                                              false,
                                              usuario.IdContacto,
                                              param,
                                              "",
                                              "Firma Coordinador");

                    agenda.Agendar();
                }

                #endregion
            }

            //Cargar la información.
            //Vaciar los campos.
            //Session[""] = null;
            lbl_loaded_actividad_cargo.Text = "";
            lbl_tipo_seleccionado.Text      = "";
            lbl_mes_seleccionado.Text       = "";
            ddl_Concepto.Items.Clear();
            ddl_CodPagoBeneficiario.Items.Clear();
            ddl_CodPagoForma.Items.Clear();
            Observaciones.Text         = "";
            CantidadDinero.Text        = "";
            pnl_PagosActividad.Visible = true;
            CargarDatos();
            pnl_Datos.Visible = false;
        }
Exemple #13
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (HttpContext.Current.Session["IdTarea"] == null)
                {
                    throw new ApplicationException("No se pudo obtener el codigo de la tarea.");
                }
                var idTarea = Convert.ToInt32(HttpContext.Current.Session["IdTarea"]);
                var tarea   = getTarea(idTarea);
                if (tarea == null)
                {
                    throw new ApplicationException("No se pudo obtener la información de la tarea.");
                }

                if (tarea.RequiereRespuesta)
                {
                    FieldValidate.ValidateString("Observación de respuesta", txtObservaciones.Text, true);
                }

                using (Datos.FonadeDBDataContext db = new Datos.FonadeDBDataContext(System.Configuration.ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString))
                {
                    var tareaUsuario = db.TareaUsuarioRepeticions.Single(filter => filter.Id_TareaUsuarioRepeticion.Equals(tarea.IdTareaUsuarioRepeticion));
                    if (chkFinalizada.Checked)
                    {
                        tareaUsuario.FechaCierre = DateTime.Now;
                        txtObservaciones.Enabled = false;
                        chkFinalizada.Enabled    = false;
                        btnSave.Enabled          = false;
                        btnSave.Visible          = false;
                    }

                    tareaUsuario.Respuesta = txtObservaciones.Text;

                    if (tarea.RequiereRespuesta)
                    {
                        AgendarTarea agenda = new AgendarTarea(
                            tarea.CodigoContactoAgendo,
                            "Respuesta para " + tarea.Asunto + (chkFinalizada.Checked.Equals(true) ? " (Final) " : " (Parcial) "),
                            "Actividad : " + tarea.Descripcion + " <BR> Respuesta : " + txtObservaciones.Text,
                            tarea.IdProyecto == null ? "null" : tarea.IdProyecto.ToString(),
                            tarea.CodigoTarea,
                            "0",
                            tarea.RecordatorioEmail,
                            tarea.NivelUrgencia,
                            false,
                            false,
                            tarea.CodigoContactoDestinatario,
                            null,
                            null,
                            null
                            );
                        agenda.Agendar();
                    }
                    db.SubmitChanges();
                    lblError.Visible = false;

                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('Información guardada exitosamente.');", true);
                }
            }
            catch (ApplicationException ex)
            {
                lblError.Visible = true;
                lblError.Text    = "Advertencia, detalle : " + ex.Message;
            }
            catch (Exception ex)
            {
                lblError.Visible = true;
                lblError.Text    = "Sucedio un error al guardar la información, detalle : " + ex.Message;
            }
        }
        /// <summary>
        /// Diego Quiñonez
        /// realiza el tranlado del plan de negocio
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btntrasladar_Click(object sender, EventArgs e)
        {
            try
            {
                txtSQL = "UPDATE proyecto SET CodInstitucion = " + ddlnombreunidad.SelectedValue + "," + "  CodCiudad = " + ddlciudad.SelectedValue +
                         "  , CodSubsector = " + ddlsubsector.SelectedValue + "  WHERE Id_Proyecto= " + id_ProyectoEval;

                ejecutaReader(txtSQL, 2);

                txtSQL = " INSERT INTO LogTrasladoProyectos VALUES(getdate()," + usuario.IdContacto + "," + txtIdSubsector.Text + "," + ddlnombreunidad.SelectedValue + ",'" + txtSQL + "')";

                ejecutaReader(txtSQL, 2);

                txtSQL = "  UPDATE ProyectoContacto SET FechaFin = getdate(), " + "  Inactivo = 1 " + "  FROM rol " + "  WHERE id_rol =  CodRol " +
                         "  AND	 Nombre LIKE '%Asesor%'" + "  AND   CodProyecto= " + id_ProyectoEval;

                ejecutaReader(txtSQL, 2);

                //Inicializar variables
                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);

                SqlCommand cmd = new SqlCommand(" SELECT Distinct CodContacto " + " FROM institucioncontacto, Institucion " + " WHERE inactivo = 0 " +
                                                " AND Id_Institucion = codinstitucion " + " AND codinstitucion = " + txtIdSubsector.Text, con);



                con.Open();
                SqlDataReader reader = cmd.ExecuteReader();

                if (reader.Read())
                {
                    AgendarTarea agenda = new AgendarTarea
                                              (Convert.ToInt32(reader["CodContacto"].ToString()),
                                              "Asignar Asesor a proyecto",
                                              "Debe asginar un asesor al proyecto" + lblnombreproyecto.Text + ". Número de proyecto: " + id_ProyectoEval,
                                              id_ProyectoEval,
                                              2,
                                              "0",
                                              true,
                                              1,
                                              true,
                                              false,
                                              usuario.IdContacto,
                                              "",
                                              "",
                                              "Traslado Planes");

                    agenda.Agendar();
                }

                con.Close();
                con.Dispose();

                id_ProyectoEval = null;
                Id_ciudadEval   = null;

                pnlprincipal.Visible = true;
                pnlprincipal.Enabled = true;

                pnltransaldar.Visible = false;
                pnltransaldar.Enabled = false;

                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('Información guardada correctamente !');", true);
            }
            catch (Exception)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('Sucedio un error, intentelo de nuevo!');", true);
            }
        }
Exemple #15
0
        /// <summary>
        /// De acuerdo al valor del parámetro, ejecutará la acción "Crear, Actualizar, etc".
        /// </summary>
        /// <param name="accion"></param>
        private void Acciones(String accion)
        {
            // 2014/12/30 RAlvaradoT Se crea un objeto conexion y un Comando para poder hacer los Insert y updates
            SqlConnection cnn  = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
            SqlConnection cnn_ = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());

            SqlCommand cmd = new SqlCommand();

            //Inicializar variables.
            DataTable Rs          = new DataTable();
            DataTable RsActividad = new DataTable();

            #region Verifica si los campos de textp contienen el caracter "'".

            if (TB_Riesgo.Text.Trim() != "")
            {
                if (TB_Riesgo.Text.Contains("'"))
                {
                    TB_Riesgo.Text = TB_Riesgo.Text.Replace("'", "");
                }
            }

            if (TB_Mitigacion.Text.Trim() != "")
            {
                if (TB_Mitigacion.Text.Contains("'"))
                {
                    TB_Mitigacion.Text = TB_Mitigacion.Text.Replace("'", "");
                }
            }

            if (txtobservacion.Text.Trim() != "")
            {
                if (txtobservacion.Text.Contains("'"))
                {
                    txtobservacion.Text = txtobservacion.Text.Replace("'", "");
                }
            }

            #endregion

            switch (accion)
            {
            case "Crear":
                if (usuario.CodGrupo == Constantes.CONST_Interventor)
                {
                    #region Sólo puede crear el INTERVENTOR.

                    datosEntrada();
                    string riesgo       = TB_Riesgo.Text;
                    string mitigacion   = TB_Mitigacion.Text;
                    string ejefuncional = ddlejefuncional.SelectedValue;
                    string observacion  = txtobservacion.Text;
                    String NomProyecto  = "";

                    //Nombre del proyecto.
                    var nmb = consultas.ObtenerDataTable("SELECT NomProyecto FROM Proyecto WHERE Id_Proyecto = " + CodProyecto, "text");
                    if (nmb.Rows.Count > 0)
                    {
                        NomProyecto = nmb.Rows[0]["NomProyecto"].ToString();
                    }
                    nmb = null;

                    if (usuario.CodGrupo == Constantes.CONST_Interventor)
                    {
                        txtSQL = "select CodCoordinador from interventor where codcontacto=" + usuario.IdContacto;

                        var rd = consultas.ObtenerDataTable(txtSQL, "text"); // ejecutaReader(txtSQL, 1);

                        if (rd.Rows.Count > 0)
                        {
                            if (rd.Rows.Count > 0)
                            {
                                int codInter = Convert.ToInt32(rd.Rows[0].ItemArray[0].ToString());
                                txtSQL = "select max(Id_Riesgo)+1 as Id_Riesgo from InterventorRiesgoTMP";
                                string ActividadTmp;
                                rd = consultas.ObtenerDataTable(txtSQL, "text"); // ejecutaReader(txtSQL, 1);
                                if (rd.Rows.Count > 0)
                                {
                                    if (rd.Rows.Count > 0)
                                    {
                                        ActividadTmp = rd.Rows[0].ItemArray[0].ToString();
                                    }
                                    else
                                    {
                                        ActividadTmp = "1";
                                    }

                                    txtSQL = @"Insert into InterventorRiesgoTMP (Id_riesgo,CodProyecto,Riesgo,Mitigacion,CodejeFuncional,Observacion) " +
                                             "values (" + ActividadTmp + "," + CodProyecto + ",'" + riesgo + "','" + mitigacion + "', " + ejefuncional + ", '" + observacion + "')";

                                    //Agendar la tarea...
                                    AgendarTarea agenda =
                                        new AgendarTarea(
                                            codInter,
                                            "Revisión Riesgos al Plan Operativo",
                                            "Revisión Adición, Modificación o Borrado de Riesgos del interventor al Plan Operativo " + NomProyecto,
                                            CodProyecto,
                                            22,
                                            "0",
                                            false,
                                            1,
                                            true,
                                            false,
                                            usuario.IdContacto,
                                            "Accion=Editar&CodProyecto=" + CodProyecto + "&CodRiesgo=" + ActividadTmp,
                                            "",
                                            "");
                                    agenda.Agendar();

                                    //NOTA: Se usa para "ingresar" datos en tablas "que por x o y motivos NO tienen llave primaria".
                                    //ejecutaReader(txtSQL, 2);
                                    // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona

                                    cnn_.Open();
                                    cmd             = cnn_.CreateCommand();
                                    cmd.CommandText = txtSQL;
                                    cmd.CommandType = CommandType.Text;
                                    cmd.Connection  = cnn_;
                                    cmd.ExecuteNonQuery();
                                    cmd.Dispose();
                                    cnn_.Close();
                                    cnn_.Dispose();
                                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                                    return;
                                }
                            }
                            else
                            {
                                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                                return;
                            }
                        }
                        else
                        {
                            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('No tiene ningún coordinador asignado.');window.opener.location.reload();window.close();", true);
                            return;
                        }
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                        return;
                    }

                    #endregion
                }
                if (usuario.CodGrupo == Constantes.CONST_GerenteInterventor && HttpContext.Current.Session["Tarea"].ToString() == "Adicionar")
                {
                    //Si está aprobado...
                    if (Aprobar.Checked)
                    {
                        #region Gerente Interventor "Adicionar"...

                        //TRAE LOS REGISTROS DE LA TABLA TEMPORAL
                        txtSQL      = " select * from InterventorRiesgoTMP where CodProyecto=" + CodProyecto + " and Id_riesgo=" + CodRiesgo;
                        RsActividad = consultas.ObtenerDataTable(txtSQL, "text");

                        //INSERTA LOS NUEVOS REGISTROS EN LA TABLA DEFINITIVA
                        txtSQL = " Insert into InterventorRiesgo (CodProyecto,Riesgo,Mitigacion,CodejeFuncional,Observacion) " +
                                 " values (" + CodProyecto + ",'" + TB_Riesgo.Text.Trim() + "','" + TB_Mitigacion.Text.Trim() + "', "
                                 + RsActividad.Rows[0]["CodEjeFuncional"].ToString() + ", '" + txtobservacion.Text.Trim() + "')";

                        //Ejecutar consulta.
                        //ejecutaReader(txtSQL, 2);
                        // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                        cmd             = cnn.CreateCommand();
                        cmd.CommandText = txtSQL;
                        cmd.CommandType = CommandType.Text;
                        cmd.Connection  = cnn;
                        cmd.ExecuteNonQuery();
                        cmd.Dispose();

                        //Actualizar fecha modificación del tab
                        prActualizarTabInter(txtTab, CodProyecto);
                        //bRepetido = false

                        //BORRAR EL REGISTRO YA INSERTADO DE LA TABLA TEMPORAL
                        txtSQL = "DELETE FROM InterventorRiesgoTMP where CodProyecto=" + CodProyecto + " and Id_riesgo=" + CodRiesgo;

                        //Ejecutar consulta.
                        //ejecutaReader(txtSQL, 2);
                        // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                        cmd             = cnn.CreateCommand();
                        cmd.CommandText = txtSQL;
                        cmd.CommandType = CommandType.Text;
                        cmd.Connection  = cnn;
                        cmd.ExecuteNonQuery();
                        cmd.Dispose();

                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                        return;

                        #endregion
                    }
                }
                break;

            case "Actualizar":
                if (usuario.CodGrupo == Constantes.CONST_Interventor)
                {
                    #region Interventor.

                    //Verifica si el interventor tiene un coordinador asignado
                    txtSQL = "select CodCoordinador from interventor where codcontacto=" + usuario.IdContacto;
                    Rs     = consultas.ObtenerDataTable(txtSQL, "text");

                    if (Rs.Rows.Count > 0)
                    {
                        //Asigna la tarea al coordinador
                        txtSQL = " Insert into InterventorRiesgoTMP (Id_riesgo,CodProyecto,Riesgo,Mitigacion,CodejeFuncional,Observacion,Tarea) " +
                                 " values (" + CodRiesgo + "," + CodProyecto + ",'" + TB_Riesgo.Text.Trim() + "','" + TB_Mitigacion.Text.Trim() + "', " + ddlejefuncional.SelectedValue +
                                 ", '" + txtobservacion.Text.Trim() + "','Modificar')";

                        //Ejecutar consulta.
                        //ejecutaReader(txtSQL, 2);
                        // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                        cmd             = cnn.CreateCommand();
                        cmd.CommandText = txtSQL;
                        cmd.CommandType = CommandType.Text;
                        cmd.Connection  = cnn;
                        cmd.ExecuteNonQuery();
                        cmd.Dispose();

                        //Agendar la tarea...
                        AgendarTarea agenda =
                            new AgendarTarea(
                                Int32.Parse(Rs.Rows[0]["CodCoordinador"].ToString()),
                                "Revisión Riesgos al Plan Operativo",
                                "Revisión Adición, Modificación o Borrado de Riesgos del interventor al Plan Operativo " + NomProyecto,
                                CodProyecto,
                                22,
                                "0",
                                false,
                                1,
                                true,
                                false,
                                usuario.IdContacto,
                                "Accion=Editar&CodProyecto=" + CodProyecto + "&CodRiesgo=" + CodRiesgo,
                                "",
                                "");
                        agenda.Agendar();

                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                        return;
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('No tiene ningún coordinador asignado.');window.opener.location.reload();window.close();", true);
                        return;
                    }

                    #endregion
                }
                if (usuario.CodGrupo == Constantes.CONST_CoordinadorInterventor)
                {
                    #region Coordinador Interventor...

                    //Si está aprobado...
                    if (Aprobar.Checked)
                    {
                        #region Coordinador Interventor.

                        txtSQL = " UPDATE InterventorRiesgoTMP SET ChequeoCoordinador=1" +
                                 " where CodProyecto=" + CodProyecto + " and Id_riesgo=" + CodRiesgo;

                        //Ejecutar consulta.
                        //ejecutaReader(txtSQL, 2);
                        // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                        cmd             = cnn.CreateCommand();
                        cmd.CommandText = txtSQL;
                        cmd.CommandType = CommandType.Text;
                        cmd.Connection  = cnn;
                        cmd.ExecuteNonQuery();
                        cmd.Dispose();

                        txtSQL = " select Id_grupo from Grupo " +
                                 " where NomGrupo = 'Gerente Interventor' ";
                        RsActividad = consultas.ObtenerDataTable(txtSQL, "text");

                        txtSQL = " select CodContacto from GrupoContacto " +
                                 " where CodGrupo =" + RsActividad.Rows[0]["Id_grupo"].ToString();
                        RsActividad = consultas.ObtenerDataTable(txtSQL, "text");

                        //Agendar la tarea...
                        AgendarTarea agenda =
                            new AgendarTarea(
                                Int32.Parse(RsActividad.Rows[0]["CodContacto"].ToString()),
                                "Revisión Riesgos al Plan Operativo",
                                "Revisión Adición, Modificación o Borrado de Riesgos del interventor al Plan Operativo " + NomProyecto,
                                CodProyecto,
                                23,
                                "0",
                                false,
                                1,
                                true,
                                false,
                                usuario.IdContacto,
                                "Accion=Editar&CodProyecto=" + CodProyecto + "&CodRiesgo=" + CodRiesgo,
                                "",
                                "");
                        agenda.Agendar();

                        #endregion
                    }

                    //Cierra al final la ventana "Emergente".
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                    return;

                    #endregion
                }
                //if (usuario.CodGrupo == Constantes.CONST_GerenteInterventor && HttpContext.Current.Session["Tarea"].ToString() == "Adicionar")
                // le estan enviando tareas de riesgos en modificar y adicionar, por lo tanto debe actualizar y cerrar la tarea
                if (usuario.CodGrupo == Constantes.CONST_GerenteInterventor && (HttpContext.Current.Session["Tarea"].ToString() == "Modificar" || HttpContext.Current.Session["Tarea"].ToString() == "Adicionar"))
                {
                    #region Gerente Interventor "Modificar"...

                    //Si está aprobado...
                    if (Aprobar.Checked)
                    {
                        #region Gerente Interventor.

                        //TRAE LOS REGISTROS DE LA TABLA TEMPORAL
                        txtSQL      = "select * from InterventorRiesgoTMP where CodProyecto=" + CodProyecto + " and Id_riesgo=" + CodRiesgo;
                        RsActividad = consultas.ObtenerDataTable(txtSQL, "text");

                        //ACTUALIZA LOS REGISTROS EN LA TABLA DEFINITIVA
                        txtSQL = " UPDATE InterventorRiesgo " +
                                 " SET Riesgo = '" + TB_Riesgo.Text.Trim() + "', " +
                                 " Mitigacion = '" + TB_Mitigacion.Text.Trim() + "', " +
                                 " CodEjeFuncional = '" + ddlejefuncional.SelectedValue + "', " +
                                 " Observacion = '" + txtobservacion.Text.Trim() + "' " +
                                 " WHERE Id_Riesgo=" + CodRiesgo +
                                 " and CodProyecto = " + CodProyecto;

                        //Ejecutar consulta.
                        //ejecutaReader(txtSQL, 2);
                        // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                        try
                        {
                            if (cnn.State == ConnectionState.Closed || cnn.State == ConnectionState.Broken)
                            {
                                cnn.Open();
                            }
                            cmd             = cnn.CreateCommand();
                            cmd.CommandText = txtSQL;
                            cmd.CommandType = CommandType.Text;
                            cmd.Connection  = cnn;
                            cmd.ExecuteNonQuery();
                            cmd.Dispose();

                            //Actualizar fecha modificación del tab
                            prActualizarTabInter(txtTab, CodProyecto);
                            //bRepetido = false

                            //BORRAR EL REGISTRO YA ACTUALIZADO DE LA TABLA TEMPORAL
                            txtSQL = "DELETE FROM InterventorRiesgoTMP where CodProyecto=" + CodProyecto + " and Id_riesgo=" + CodRiesgo;

                            //Ejecutar consulta.
                            //ejecutaReader(txtSQL, 2);
                            // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                            cmd             = cnn.CreateCommand();
                            cmd.CommandText = txtSQL;
                            cmd.CommandType = CommandType.Text;
                            cmd.Connection  = cnn;
                            cmd.ExecuteNonQuery();
                            cmd.Dispose();
                        }
                        finally {
                            cnn.Close();
                            cnn.Dispose();
                        }
                        #endregion
                    }

                    //Cierra al final la ventana "Emergente".
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                    return;

                    #endregion
                }
                break;

            case "Borrar":
                if (usuario.CodGrupo == Constantes.CONST_Interventor)
                {
                    #region Sólo puede eliminar riesgos si es INTERVENTOR.

                    //Verifica si el interventor tiene un coordinador asignado
                    txtSQL = "select CodCoordinador from interventor where codcontacto=" + usuario.IdContacto;
                    Rs     = consultas.ObtenerDataTable(txtSQL, "text");

                    if (Rs.Rows.Count > 0)
                    {
                        //Asigna la tarea al coordinador
                        txtSQL      = "SELECT * FROM InterventorRiesgo WHERE Id_riesgo=" + CodRiesgo;
                        RsActividad = consultas.ObtenerDataTable(txtSQL, "text");

                        txtSQL = " Insert into InterventorRiesgoTMP (Id_riesgo,CodProyecto,Riesgo,Mitigacion,CodejeFuncional,Observacion,Tarea) " +
                                 " values (" + CodRiesgo + "," + CodProyecto + ",'" + RsActividad.Rows[0]["Riesgo"].ToString() + "','" + RsActividad.Rows[0]["Mitigacion"].ToString() + "', "
                                 + RsActividad.Rows[0]["CodEjeFuncional"].ToString() + ", '" + RsActividad.Rows[0]["Observacion"].ToString() + "','Borrar')";

                        //Ejecutar consulta.
                        //ejecutaReader(txtSQL, 2);
                        // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                        cmd             = cnn.CreateCommand();
                        cmd.CommandText = txtSQL;
                        cmd.CommandType = CommandType.Text;
                        cmd.Connection  = cnn;
                        cmd.ExecuteNonQuery();

                        //Agendar la tarea...
                        AgendarTarea agenda =
                            new AgendarTarea(
                                Int32.Parse(Rs.Rows[0]["CodCoordinador"].ToString()),
                                "Revisión Riesgos al Plan Operativo",
                                "Revisión Adición, Modificación o Borrado de Riesgos del interventor al Plan Operativo " + NomProyecto,
                                CodProyecto,
                                22,
                                "0",
                                false,
                                1,
                                true,
                                false,
                                usuario.IdContacto,
                                "Accion=Editar&CodProyecto=" + CodProyecto + "&CodRiesgo=" + CodRiesgo,
                                "",
                                "");
                        agenda.Agendar();

                        //Al terminar, se cierra la ventana "emergente".
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                        return;
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "alert('No tiene ningún coordinador asignado.');window.opener.location.reload();window.close();", true);
                        return;
                    }

                    #endregion
                }
                if (usuario.CodGrupo == Constantes.CONST_GerenteInterventor && HttpContext.Current.Session["Tarea"].ToString() == "Adicionar")
                {
                    #region Gerente Interventor "Borrar"...

                    //BORRA LOS REGISTROS EN LA TABLA DEFINITIVA
                    txtSQL = "DELETE FROM InterventorRiesgo WHERE Id_riesgo=" + CodRiesgo;

                    //Ejecutar consulta.
                    //ejecutaReader(txtSQL, 2);
                    // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                    cmd             = cnn.CreateCommand();
                    cmd.CommandText = txtSQL;
                    cmd.CommandType = CommandType.Text;
                    cmd.Connection  = cnn;
                    cmd.ExecuteNonQuery();

                    //Actualizar fecha modificación del tab
                    prActualizarTabInter(txtTab, CodProyecto);

                    //BORRAR EL REGISTRO YA INSERTADO DE LA TABLA TEMPORAL
                    txtSQL = "DELETE FROM InterventorRiesgoTMP where CodProyecto=" + CodProyecto + " and Id_riesgo=" + CodRiesgo;

                    //Ejecutar consulta.
                    //ejecutaReader(txtSQL, 2);
                    // 2014/12/30 RAlvaradoT Se cambia la forma de Insertar Actualizar datos pues la anterior no funciona
                    cmd             = cnn.CreateCommand();
                    cmd.CommandText = txtSQL;
                    cmd.CommandType = CommandType.Text;
                    cmd.Connection  = cnn;
                    cmd.ExecuteNonQuery();

                    //Cierra al final la ventana "Emergente".
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mensaje", "window.opener.location.reload();window.close();", true);
                    return;

                    #endregion
                }
                break;

            default:
                break;
            }
        }
Exemple #16
0
        private void EnviarNotificacion(string _Id_PagoActividad, string _Observaciones)
        {
            Datos.Consultas consultas = new Consultas();
            string          txtSQL    = "";

            //Envia Notificacion a Interventor
            txtSQL = "SELECT EmpresaInterventor.CodContacto, Empresa.CodProyecto " +
                     " FROM EmpresaInterventor " +
                     " INNER JOIN Empresa ON EmpresaInterventor.CodEmpresa = Empresa.id_empresa " +
                     " INNER JOIN PagoActividad ON Empresa.codproyecto = PagoActividad.CodProyecto " +
                     " WHERE (EmpresaInterventor.Rol = " + Constantes.CONST_RolInterventorLider + ") " +
                     " and Inactivo = 0" +
                     " AND (PagoActividad.Id_PagoActividad = " + _Id_PagoActividad + ")";

            var rsInterventores = consultas.ObtenerDataTable(txtSQL, "text");

            foreach (DataRow row_rsInterventores in rsInterventores.Rows)
            {
                AgendarTarea agenda = new AgendarTarea
                                          (Int32.Parse(row_rsInterventores["CodContacto"].ToString()),
                                          "Solicitud de Pago No. " + _Id_PagoActividad + " Rechazada por Fiduciaria",
                                          "Se ha rechazado la Solicitud de pago No " + _Id_PagoActividad + ". <BR><BR>Observaciones Fiduciaria: " + _Observaciones,
                                          row_rsInterventores["CodProyecto"].ToString(),
                                          2,
                                          "0",
                                          true,
                                          1,
                                          true,
                                          false,
                                          Usuario.IdContacto,
                                          null,
                                          null,
                                          ""); //"Firma Coordinador"

                agenda.Agendar();
            }

            rsInterventores = null;

            //Envia NOtificacion a Emprendedor
            txtSQL = " SELECT ProyectoContacto.CodContacto, ProyectoContacto.CodProyecto " +
                     " FROM PagoActividad " +
                     " INNER JOIN ProyectoContacto ON PagoActividad.CodProyecto = ProyectoContacto.CodProyecto " +
                     " WHERE (PagoActividad.Id_PagoActividad = " + _Id_PagoActividad + ") " +
                     " AND (ProyectoContacto.Inactivo = 0) " +
                     " AND (dbo.ProyectoContacto.CodRol = " + Constantes.CONST_RolEmprendedor + ")";

            var rsEmprendedores = consultas.ObtenerDataTable(txtSQL, "text");

            foreach (DataRow row_rsEmprendedores in rsEmprendedores.Rows)
            {
                AgendarTarea agenda = new AgendarTarea
                                          (Int32.Parse(row_rsEmprendedores["CodContacto"].ToString()),
                                          "Solicitud de Pago No. " + _Id_PagoActividad + " Rechazada por Fiduciaria",
                                          "Se ha rechazado la Solicitud de pago No " + _Id_PagoActividad + ". </br></br>Observaciones Fiduciaria: " + _Observaciones,
                                          row_rsEmprendedores["CodProyecto"].ToString(),
                                          2,
                                          "0",
                                          true,
                                          1,
                                          true,
                                          false,
                                          Usuario.IdContacto,
                                          null,
                                          null,
                                          ""); //"Firma Coordinador"

                agenda.Agendar();
            }

            rsEmprendedores = null;
        }