Example #1
0
        protected void btnFinalizar_Click(object sender, EventArgs e)
        {
            mEmpleado = cEmpleado.Obtner_Empleado(1, "director");
            string fuente      = cQuejaReclamo.nombreFuenteF(Session["idFuente"].ToString());
            string asunto      = "NUEVA FUENTE: " + fuente;
            string descripcion = "Se ha creado una neuva fuenta en la cual deberá revisar y validar todas sus acciones.";

            if (mEmpleado.email != null)
            {
                cCorreo.enviarCorreo(mEmpleado.email, asunto, descripcion);
            }

            cQuejaReclamo.actualizarStatusFuente(int.Parse(Session["idFuente"].ToString()), 1);
            ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('Ha finalizado correctamente el Informe', '', 'success');", true);
            Response.Redirect("~/Fuentes/QuejaReclamo.aspx");
        }
Example #2
0
        protected void btnEditar_Click(object sender, EventArgs e)
        {
            try
            {
                mAccionG = cAcciones.Obtner_AccionGenerada(int.Parse(Session["noAccion"].ToString()));

                bool editada = false;

                mAccionesGeneradas ag = new mAccionesGeneradas();

                mAccionG.id_fuente      = mSatisfaccionCliente.id_fuente;
                mAccionG.id_periodo     = int.Parse(ddlPeriodo.SelectedValue);
                mAccionG.descripcion    = txtDescripcion.Text;
                mAccionG.id_unidad      = int.Parse(ddlUnidad.SelectedValue);
                mAccionG.id_dependencia = int.Parse(ddlDependencia.SelectedValue);
                mAccionG.id_proceso     = int.Parse(ddlProceso.SelectedValue);
                mAccionG.id_tipo_accion = int.Parse(dllTipoAccion.SelectedValue);
                mAccionG.id_lider       = int.Parse(ddlLider.SelectedValue);
                mAccionG.id_enlace      = int.Parse(ddlEnlace.SelectedValue);

                ag.id_accion_generada = int.Parse(Session["noAccion"].ToString());
                ag.id_periodo         = int.Parse(ddlPeriodo.SelectedValue);
                ag.descripcion        = txtDescripcion.Text;
                ag.id_lider           = int.Parse(ddlLider.SelectedValue);
                ag.id_enlace          = int.Parse(ddlEnlace.SelectedValue);
                ag.id_unidad          = int.Parse(ddlUnidad.SelectedValue);
                ag.id_dependencia     = int.Parse(ddlDependencia.SelectedValue);
                ag.id_proceso         = int.Parse(ddlProceso.SelectedValue);
                ag.id_tipo_accion     = int.Parse(dllTipoAccion.SelectedValue);

                editada = cAcciones.actualizar_Accion(ag);
                cAcciones.aprobar_Accion(ag.id_accion_generada, 0);
                verColumnas(true);
                mSatisfaccionCliente         = cSatisfaccionCliente.BuscarEncabezado(txtInforme.Text, int.Parse(txtanio.Text), "6");
                gvListadoAcciones.DataSource = cSatisfaccionCliente.ListadoAcciones(mSatisfaccionCliente.id_fuente, 0, "todos", 6);
                gvListadoAcciones.DataBind();
                verColumnas(false);

                if (editada)
                {
                    if (mAccionG.aprobado == -2)
                    {
                        mEmpleado = cEmpleado.Obtner_Empleado(1, "director");
                        string fuente      = cSatisfaccionCliente.nombreFuenteF(Session["idFuente"].ToString());
                        string asunto      = "ACCIÓN CORREGIDA: " + mAccionG.id_accion_generada + " " + fuente;
                        string descripcion = "Se corrigió la acción para nueva revisión. Por favor revisar.";
                        if (mEmpleado.email != null)
                        {
                            cCorreo.enviarCorreo(mEmpleado.email, asunto, descripcion);
                        }
                    }
                    ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('La Acción ha sido actualizada correctamente', '', 'success');", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('No fue posible actualizar Acción', 'Intente de nuevo', 'error');", true);
                }
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('No fue posible actualizar Acción', 'Intente de nuevo', 'error');", true);
            }
        }
Example #3
0
        protected void btnEditar_Click(object sender, EventArgs e)
        {
            try
            {
                mAccionG = cAcciones.Obtner_AccionGenerada(int.Parse(Session["noAccion"].ToString()));

                bool existeCompromiso = false;
                bool editada          = false;

                verColumnas(true);
                foreach (GridViewRow Row in gvListadoAcciones.Rows)
                {
                    if (Row.Cells[2].Text == txtCompromiso.Text)
                    {
                        existeCompromiso = true;
                    }
                }
                verColumnas(false);

                if (!existeCompromiso ||
                    mAccionG.correlativo_compromiso == int.Parse(txtCompromiso.Text))
                {
                    mAccionesGeneradas ag = new mAccionesGeneradas();

                    mAccionG.id_fuente = mMinutaRevisionAD.id_fuente;
                    mAccionG.correlativo_compromiso = int.Parse(txtCompromiso.Text);
                    mAccionG.descripcion            = txtDescripcion.Text;
                    mAccionG.id_unidad      = int.Parse(ddlUnidad.SelectedValue);
                    mAccionG.id_dependencia = int.Parse(ddlDependencia.SelectedValue);
                    mAccionG.id_proceso     = int.Parse(ddlProceso.SelectedValue);
                    mAccionG.id_tipo_accion = int.Parse(dllTipoAccion.SelectedValue);
                    mAccionG.id_lider       = int.Parse(ddlLider.SelectedValue);
                    mAccionG.id_enlace      = int.Parse(ddlEnlace.SelectedValue);

                    ag.id_accion_generada     = int.Parse(Session["noAccion"].ToString());
                    ag.descripcion            = txtDescripcion.Text;
                    ag.id_lider               = int.Parse(ddlLider.SelectedValue);
                    ag.id_enlace              = int.Parse(ddlEnlace.SelectedValue);
                    ag.id_unidad              = int.Parse(ddlUnidad.SelectedValue);
                    ag.id_dependencia         = int.Parse(ddlDependencia.SelectedValue);
                    ag.id_proceso             = int.Parse(ddlProceso.SelectedValue);
                    ag.id_tipo_accion         = int.Parse(dllTipoAccion.SelectedValue);
                    ag.correlativo_compromiso = int.Parse(txtCompromiso.Text);

                    editada = cAcciones.actualizar_Accion(ag);
                    cAcciones.aprobar_Accion(ag.id_accion_generada, 0);
                    //verColumnas(true);
                    mMinutaRevisionAD            = cMinutaRevisionAD.BuscarEncabezado(txtInforme.Text, int.Parse(txtanio.Text), "7");
                    gvListadoAcciones.DataSource = cMinutaRevisionAD.ListadoAcciones(mMinutaRevisionAD.id_fuente, 0, "todos", 7);
                    gvListadoAcciones.DataBind();
                    //verColumnas(false);

                    if (editada)
                    {
                        if (mAccionG.aprobado == -2)
                        {
                            mEmpleado = cEmpleado.Obtner_Empleado(1, "director");
                            string fuente      = cMinutaRevisionAD.nombreFuenteF(Session["idFuente"].ToString());
                            string asunto      = "ACCIÓN CORREGIDA: " + mAccionG.id_accion_generada + " " + fuente;
                            string descripcion = "Se corrigió la acción para nueva revisión. Por favor revisar.";
                            if (mEmpleado.email != null)
                            {
                                cCorreo.enviarCorreo(mEmpleado.email, asunto, descripcion);
                            }
                        }
                        ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('La Acción ha sido actualizada correctamente', '', 'success');", true);
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('No fue posible actualizar Acción', 'Intente de nuevo', 'error');", true);
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('Ya existe Número de Hallazgo!', 'Intente con otro número', 'warning');", true);
                }
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "Mensaje", "swal('No fue posible actualizar Acción', 'Intente de nuevo', 'error');", true);
            }
        }