1088 lines
No EOL
51 KiB
C#
1088 lines
No EOL
51 KiB
C#
/*===========================================================================================================================
|
||
* Instituto Costarricense de Acueductos y Alcantarillados. - 2017
|
||
* Administración de la Seguridad
|
||
* Nombre de la Pantalla: frwBusquedaSolicitud.aspx
|
||
*
|
||
* Explicación de los contenidos del archivo
|
||
*===========================================================================================================================
|
||
* HISTORIAL
|
||
*
|
||
* PERSONA DIA – MES - AÑO DESCRIPCIÓN
|
||
* Juan Pablo Monge D 14 – 09 - 2017 Se inicia con el diseño de la pagina
|
||
* …………………………………………………………
|
||
* …………………………………………………………
|
||
*===========================================================================================================================
|
||
* Derechos Reservados (C) 2017 AyA.
|
||
* ESTE CÓDIGO ES PROVEÍDO “TAL CUAL ES” SIN GARANTÍA ALGUNA
|
||
* DE NINGÚN TIPO, SEA IMPLICITA O EXPLICITA.
|
||
* NO SE PERMITE SU REPRODUCCIÓN PARCIAL O TOTAL, NI SU COMERCIALIZACIÓN
|
||
*===========================================================================================================================
|
||
*/
|
||
|
||
using System;
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using System.Data;
|
||
using System.Linq;
|
||
using System.Web;
|
||
using System.Web.UI;
|
||
using System.Web.UI.WebControls;
|
||
using System.Web.UI.HtmlControls;
|
||
|
||
using AyABL;
|
||
|
||
using AyABL.AUT.Autenticacion;
|
||
using AyABL.APL;
|
||
using AyADAL;
|
||
using System.Configuration;
|
||
using AyABL.RCS;
|
||
using AyABL.Tran;
|
||
using AyABL.TRA;
|
||
using AyABL.Usuario;
|
||
using AyABL.TRA;
|
||
using System.Text;
|
||
using System.Security.Cryptography;
|
||
using System.IO;
|
||
|
||
|
||
|
||
|
||
public partial class Forms_Trans_frwValidacionFirma : General
|
||
{
|
||
|
||
#region Inicializar Formulario (R0)
|
||
|
||
override protected void OnInit(EventArgs e) //M0
|
||
{
|
||
try
|
||
{
|
||
base.OnInit(e);
|
||
|
||
InicializarFormulario();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
MensajeError("Error en R0M0", ex);
|
||
}
|
||
}
|
||
|
||
private void InicializarFormulario() //M1
|
||
{
|
||
try
|
||
{
|
||
Response.Cache.SetCacheability(HttpCacheability.NoCache);
|
||
|
||
|
||
construirGridView();
|
||
|
||
Javascript.CheckAllGridViewItems(Page);
|
||
// EjecutarScript("inicializaTab('formulario');");
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
MensajeError("Error en R0M1", ex);
|
||
}
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region Variables (R1)
|
||
revisionfirmasolicitudBL objRevisionFirmaSolicitudBL;
|
||
|
||
GridView grvListaTemp;
|
||
string strNumSolicitudTMP = "0";
|
||
#region variables del estandar
|
||
string strPagina = string.Empty;
|
||
string strScript = string.Empty;
|
||
#endregion
|
||
|
||
|
||
#endregion
|
||
|
||
#region Eventos Formulario (R2)
|
||
|
||
protected void Page_Load(object sender, EventArgs e) //M0
|
||
{
|
||
try
|
||
{
|
||
|
||
|
||
//ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnNuevo);
|
||
ScriptManager.GetCurrent(Page).RegisterPostBackControl(grvLista);
|
||
|
||
|
||
strNumSolicitudTMP = Session["SOLICITUD"].ToString();
|
||
lblNumSolicitud.Text = strNumSolicitudTMP;
|
||
if ((!IsPostBack) && (Session.Count > 0))
|
||
{
|
||
|
||
|
||
Session["Pagina"] = "";
|
||
|
||
|
||
ComandosxMenu();
|
||
|
||
llenarGrid();
|
||
llenarDDLEncargado(true);
|
||
|
||
}
|
||
else
|
||
{
|
||
if (Session.Count == 0)
|
||
{ ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>javascript: window.parent.VentanaCerrarActividades();window.parent.VentanaCerrarFormularioAS();window.location.href = '../wfrLogin.aspx?sesion=expiro';</script>"); }
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
//{ ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>javascript: window.parent.VentanaCerrarActividades();window.parent.VentanaCerrarFormularioAP();</script>"); }
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
MensajeError("Error en R2M0", ex);
|
||
}
|
||
}
|
||
|
||
|
||
|
||
#endregion
|
||
|
||
#region Eventos Controles Web (R3)
|
||
|
||
|
||
|
||
///<summary>
|
||
///Activar el botón de Refrescar
|
||
///</summary>
|
||
///<param name="sender"></param>
|
||
///<param name="e"></param>
|
||
|
||
protected void btnRefrescar_Click(object sender, System.Web.UI.ImageClickEventArgs e) //M1
|
||
{
|
||
try
|
||
{
|
||
llenarGrid();
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
MensajeError("Error en R3M2" + MensajesAplicacion.RefrescarFallido.ToString(), ex);
|
||
}
|
||
finally
|
||
{
|
||
EjecutarScript("inicializaTab('grid');");
|
||
}
|
||
}
|
||
|
||
|
||
|
||
/// <summary>
|
||
/// Metodo que se utiliza para la paginación del Grid en caso de que el usuario desee ver mas registros
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
|
||
protected void grvLista_PageIndexChanging(object sender, GridViewPageEventArgs e) //M1
|
||
{
|
||
try
|
||
{
|
||
grvLista.PageIndex = e.NewPageIndex;
|
||
llenarGrid();
|
||
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
MensajeError("Error en R3M1", ex);
|
||
}
|
||
finally
|
||
{
|
||
EjecutarScript("inicializaTab('grid');");
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
/// <summary>
|
||
/// Metodo que se utiliza para borrar el rol del listado de roles
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
|
||
protected void grvLista_RowCommand(object sender, GridViewCommandEventArgs e) //M5
|
||
{
|
||
try
|
||
{
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
MensajeError("Error en R3M5", ex);
|
||
}
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
protected void ddlInspector_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
|
||
}
|
||
|
||
|
||
|
||
protected void btnEnviarRevision_Click(object sender, EventArgs e)
|
||
{
|
||
int nValorRetornado = 0;
|
||
try
|
||
{
|
||
//objRevisionFirmaSolicitudBL = new inspeccionasBL();
|
||
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.REVISIONREVISIONFORMULARIO = false;
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.FECHARECIBIDOREVISIONFORMULARIO = DateTime.Now;
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.FECHAREVISIONREVISIONFORMULARIO = DateTime.Now;
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.FKUSUARIOXDEPENDENCIA = int.Parse(ddlEncargadoRevision.SelectedValue);
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.FKINSPECCION = int.Parse(Session["PKINSPECCION"].ToString());
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.ASTATE = true;
|
||
|
||
//nValorRetornado = objRevisionFirmaSolicitudBL.insertarRevision(null);
|
||
//if (nValorRetornado != 0)
|
||
//{
|
||
// nValorRetornado = 0;
|
||
|
||
// objRevisionFirmaSolicitudBL.objinspeccionasEL.PKINSPECCION = int.Parse(Session["PKINSPECCION"].ToString());
|
||
// objRevisionFirmaSolicitudBL.objinspeccionasEL.FKESTADOINSPECCION = 2;//pendiente revision
|
||
|
||
// nValorRetornado = objRevisionFirmaSolicitudBL.modificarEstadoInspecciongeneral();
|
||
|
||
// if (nValorRetornado != 0)
|
||
// {
|
||
|
||
// #region Envio de correo
|
||
|
||
// string strPiePagina = "</BR> </BR></BR>AVISO DE CONFIDENCIALIDAD: este mensaje y la información incluida en él es confidencial y está dirigida únicamente al destinatario. Puede contener información privilegiada, confidencial, amparada por el secreto profesional o que no debe ser revelada. Si usted ha recibido este correo por error, por favor comunicarlo inmediatamente vía correo y tener la amabilidad de eliminarlo de su sistema. Queda notificado que no deberá copiar este mensaje, ni utilizar, divulgar, publicar o distribuir su contenido de modo alguno. Todo mensaje enviado a esta dirección de correo electrónico puede ser sujeto a inspección por alguien distinto de su receptor originario. La transmisión de correos no garantiza que el correo electrónico sea seguro o libre de error. Por consiguiente, se advierte que esta información pueda estar incompleta o ser poco precisa ya que toda información está sujeta a alterarse sin previo aviso.”";
|
||
|
||
// AyABL.TRA.correoBL objcorreoBL = new AyABL.TRA.correoBL();
|
||
// objcorreoBL.objcorreoEL.FKNUMSOLICITUD = int.Parse(Session["PKSOLICITUD"].ToString());
|
||
// // objcorreoBL.objcorreoEL.CORREO = dsActividad.Tables[0].Rows[0]["LOGINUSUARIO"].ToString() + "@aya.go.cr";
|
||
// objcorreoBL.objcorreoEL.ASUNTO = "Revisión de Criterio Técnico - SIGPC";
|
||
// objcorreoBL.objcorreoEL.CONTENIDO = "La solicitud de disponibilidad " + Session["SOLICITUD"].ToString() + " se envía para su respectiva aprobación para ver los detalles ingrese al sistema en el siguiente hipervínculo, ingrese al sistema <a href=http://" + HttpContext.Current.Request.Url.Authority + "/Forms/wfrLogin> SIGPC</a>" + strPiePagina;
|
||
// objcorreoBL.objcorreoEL.FKUSUARIO = Convert.ToInt32(ddlEncargadoRevision.SelectedValue);
|
||
// objcorreoBL.objcorreoEL.Fecha = DateTime.Now;
|
||
|
||
// nValorRetornado = objcorreoBL.insertarCorreo();
|
||
// }
|
||
//}
|
||
//llenarGrid();
|
||
// #endregion
|
||
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw ex;
|
||
}
|
||
finally
|
||
{
|
||
|
||
EjecutarScript("inicializaTab('grid');");
|
||
}
|
||
}
|
||
|
||
|
||
|
||
#endregion
|
||
|
||
#region Metodos Personalizados (R4)
|
||
|
||
/// <summary>
|
||
/// Oculta las filas que lo requieran
|
||
/// </summary>
|
||
/// <param name="p_intFila"></param>
|
||
private void mostrarFilaTabla(int p_intFila) //M0
|
||
{
|
||
|
||
try
|
||
{
|
||
switch (p_intFila)
|
||
{
|
||
case 1: divDatosSuperiores.Visible = true; divDatosInferiores.Visible = false; break;
|
||
case 2: divDatosInferiores.Visible = true; divDatosSuperiores.Visible = false; break;
|
||
}
|
||
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw ex;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Oculta las filas que lo requieran
|
||
/// </summary>
|
||
/// <param name="p_intFila"></param>
|
||
private void ComandosxMenu() //M2
|
||
{
|
||
try
|
||
{
|
||
//DataSet dsComandos = getComandos();
|
||
|
||
//if (dsComandos != null)
|
||
//{
|
||
// foreach (DataRow drTemp in dsComandos.Tables[0].Rows)
|
||
// {
|
||
// switch (drTemp["NOMBRECOMANDO"].ToString().ToUpper())
|
||
// {
|
||
//case "NUEVO":
|
||
//Div2.Visible = true;
|
||
// break;
|
||
|
||
//case "MODIFICA":
|
||
// //Inicio de variable tipo VIEWSTATE
|
||
// ViewState["PUEDEMODIFICAR"] = true;
|
||
|
||
// break;
|
||
// }
|
||
// }
|
||
//}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw ex;
|
||
}
|
||
}
|
||
|
||
|
||
|
||
/// <summary>
|
||
/// Metodo que se utiliza para contruir el Grid al inicio de la pantalla
|
||
/// </summary>
|
||
private void construirGridView() //M4
|
||
{
|
||
try
|
||
{
|
||
grvListaTemp = (GridView)tdLista.FindControl("grvLista");
|
||
|
||
GridViewBoundField bdfPk = new GridViewBoundField("PKREVISIONFIRMASOLICITUD", "PK", false, false, false);
|
||
GridViewBoundField bdfNombreCompleto = new GridViewBoundField("NOMBRECOMPLETO", "Nombre", false, false, true);
|
||
GridViewBoundField bdfFecha = new GridViewBoundField("FECHAREVISIONFIRMASOLICITUD", "Fecha asigna", true, true, true);
|
||
GridViewBoundField bdfFechaConstancia = new GridViewBoundField("FECHACONSTANCIAREVISIONFIRMASOLICITUD", "Fecha firma",true, true, true);
|
||
|
||
|
||
|
||
|
||
|
||
grvListaTemp.Columns.Add(bdfPk);
|
||
grvListaTemp.Columns.Add(bdfNombreCompleto);
|
||
grvListaTemp.Columns.Add(bdfFecha);
|
||
grvListaTemp.Columns.Add(bdfFechaConstancia);
|
||
|
||
|
||
|
||
|
||
grvListaTemp.Columns[0].ItemStyle.Width = 125;
|
||
grvListaTemp.Columns[1].HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
|
||
grvListaTemp.Columns[1].ItemStyle.HorizontalAlign = HorizontalAlign.Center;
|
||
grvListaTemp.Columns[1].ItemStyle.Width = 125;
|
||
|
||
|
||
|
||
//cuwBusquedaList.LlenarCHKLBusqueda(grvListaVisitaSolicitudTemp);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw ex;
|
||
}
|
||
}
|
||
|
||
|
||
public bool validarSesion()
|
||
{
|
||
if (
|
||
Session["PKSOLICITUD"] != null &&
|
||
Session["SOLICITUD"] != null &&
|
||
Session["PKUSUARIOXDEPENDENCIA"] != null &&
|
||
Session["LOGIN"] != null &&
|
||
Session["PKPROGRAMACION"] != null &&
|
||
Session["NACTIVIDAD"] != null &&
|
||
Session["NOMBREEMPLEADO"] != null &&
|
||
Session["DESCRIPCIONACTIVIDAD"] != null
|
||
)
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
|
||
|
||
|
||
#endregion
|
||
|
||
#region Metodos Controles a Datos (R5)
|
||
/// <summary>
|
||
/// guarda y modifica registros en la tabla.
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
private int GuardarDatosVisitaSolicitud() //M0
|
||
{
|
||
int nValorRetornado = 0;
|
||
// int nPkInspeccion = 0;
|
||
// int nPkInspeccionAS = 0;
|
||
// int nPKNegacionDisponibilidad = 0;
|
||
// int nPKPozoAguas = 0;
|
||
// int nPKDiametroPrevistaAS = 0;
|
||
|
||
// int nPKNoExisteDisponibilidadCritTecnico = 0;
|
||
// int nPKCreacionCritTec = 0;
|
||
|
||
|
||
// int nPKValorNumerico = 0;
|
||
// int nPKOtroServicioAfectaConexion = 0;
|
||
|
||
// int nPKOtrosOperadores = 0;
|
||
// int nPKExisteDisponibilidad = 0;
|
||
// int nPKCroquis = 0;
|
||
// int nPKInspeccionUbicaMedidor = 0;
|
||
// int nPKOtroMaterialPozoAguaArriba = 0;
|
||
// int nPKOtroMaterialPozoAguaAbajo = 0;
|
||
// TransaccionDAL tdlTransaccion = null;// new TransaccionDAL("SIGPC");
|
||
//// tdlTransaccion.BeginTransaction();
|
||
// try
|
||
// {
|
||
// string strModo = ViewState["MODO"].ToString();
|
||
// if (ValidarCampos())
|
||
// {
|
||
|
||
// if (strModo == "Nuevo")
|
||
// {
|
||
|
||
// nPkInspeccion = GuardarInspeccionGeneral(tdlTransaccion);
|
||
|
||
// if (nPkInspeccion != 0)
|
||
// {
|
||
// nPkInspeccionAS = GuardarInspeccionAS(nPkInspeccion, tdlTransaccion);
|
||
|
||
// if (nPkInspeccionAS != 0 )
|
||
// nPKPozoAguas = GuardarPozoAguas(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
// if(nPKPozoAguas != 0 && rblMaterialPozoAguaArriba.SelectedValue == "7")
|
||
// nPKOtroMaterialPozoAguaArriba = GuardarOtroMaterialPozoAguaArriba(nPkInspeccionAS,tdlTransaccion);
|
||
|
||
// if(nPKPozoAguas != 0 && rblMaterialPozoAguaAbajo.SelectedValue == "7")
|
||
// nPKOtroMaterialPozoAguaAbajo = GuardarOtroMaterialPozoAguaAbajo(nPkInspeccionAS,tdlTransaccion);
|
||
|
||
// if (nPkInspeccionAS != 0 && rblCuentaPrevista.SelectedValue == "1")
|
||
// nPKDiametroPrevistaAS = GuardarDiametroPrevistaAS(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
// if (nPkInspeccionAS != 0 && rblDisponibilidadAS.SelectedValue == "false")
|
||
// {
|
||
// nPKNegacionDisponibilidad = GuardarNegaciondisponibilidad(nPkInspeccionAS, tdlTransaccion);
|
||
// if(rblRequiereCCR.SelectedValue == "true")
|
||
// nPKNoExisteDisponibilidadCritTecnico = GuardarNoExisteDisponibilidadCriterioTecnico(nPkInspeccionAS, tdlTransaccion);
|
||
// if (nPKNoExisteDisponibilidadCritTecnico != 0)
|
||
// nPKCreacionCritTec = GuardarCreacionCritTec(nPKNoExisteDisponibilidadCritTecnico, tdlTransaccion);
|
||
// }
|
||
|
||
// if(chkOtrosOperadores.Checked == true && nPKNegacionDisponibilidad != 0 && nPkInspeccionAS != 0)
|
||
// nPKOtrosOperadores = GuardarOtrosOperadores(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
// if (nPkInspeccionAS != 0 && bool.Parse(rblDisponibilidadAS.SelectedValue) == true)
|
||
// nPKExisteDisponibilidad = GuardarExisteDispAlcantSan(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
// if (nPkInspeccion != 0)
|
||
// nPKInspeccionUbicaMedidor = GuardarInspeccionubicamedidor(nPkInspeccion, tdlTransaccion);
|
||
|
||
// if (nPkInspeccionAS != 0 && int.Parse(rblServiciosAfectanConexion.SelectedValue) == 5)
|
||
// nPKOtroServicioAfectaConexion = GuardarOtroServicioAfectaConexion(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
// if (nPkInspeccionAS != 0 && int.Parse(rblNuevoServicio.SelectedValue) == 5)//diametro nuevo servicio
|
||
// nPKValorNumerico = GuardarValorNuevoServicio(nPkInspeccionAS, rblDiametroNuevoServicio.SelectedValue.ToString(), tdlTransaccion);
|
||
// if (nPkInspeccionAS != 0 && int.Parse(rblNuevoServicio.SelectedValue) == 6)//distancia nuevo servicio
|
||
// nPKValorNumerico = GuardarValorNuevoServicio(nPkInspeccionAS, txtDistanciaNuevoServicio.Text, tdlTransaccion);
|
||
// //if (nPkInspeccionAS != 0 && int.Parse(rblTipoPrevista.SelectedValue) == 4) //Otro
|
||
// // nPKOtrosprevista = GuardarOtroPrevista(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
|
||
// if (nPkInspeccionAS != 0)
|
||
// nPKCroquis = GuardarCroquis(nPkInspeccion, tdlTransaccion);
|
||
|
||
|
||
|
||
// nValorRetornado = nPkInspeccionAS;
|
||
// llenarGrid();
|
||
|
||
// GuardarEventoBitacora(
|
||
// Session["LOGIN"].ToString(),
|
||
// AccionBitacora.INSERT.ToString(),
|
||
// MensajesBitacora.IngresarRegistro + ": Se ha ingresado un formulario de criterio técnico de alcantarillado sanitario " + nPkInspeccion.ToString().Trim(),
|
||
// "frwCriterioAS.aspx",
|
||
// Convert.ToInt32(ConfigurationManager.AppSettings["pkApp"])
|
||
// );
|
||
|
||
|
||
|
||
// }
|
||
|
||
|
||
// }
|
||
// #region modificar
|
||
// if (strModo == "Modificar")
|
||
// {
|
||
|
||
|
||
// objRevisionFirmaSolicitudBL = new inspeccionasBL();
|
||
// objRevisionFirmaSolicitudBL.objinspeccionasEL.FKSOLICITUD = int.Parse(Session["PKSOLICITUD"].ToString());
|
||
// objRevisionFirmaSolicitudBL.objinspeccionasEL.PKINSPECCION = int.Parse(Session["PKINSPECCION"].ToString());
|
||
// DataSet dsInspeccion = objRevisionFirmaSolicitudBL.listarInspeccionesAS(null);
|
||
|
||
// if (dsInspeccion.Tables[0].Rows.Count != 0)
|
||
// {
|
||
// nPkInspeccion = int.Parse(Session["PKINSPECCION"].ToString());
|
||
|
||
// nPkInspeccion = ModificarInspeccionGeneral(tdlTransaccion);
|
||
|
||
|
||
// if (nPkInspeccion != 0)
|
||
// {
|
||
// nPkInspeccionAS = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKINSPECCIONAS"].ToString());
|
||
// nPkInspeccionAS = ModificarInspeccionAS(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
// if (nPkInspeccionAS != 0)
|
||
// {
|
||
// nPKPozoAguas = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKPOZOAGUAS"].ToString());
|
||
// nPKPozoAguas = ModificarPozoAguas(nPKPozoAguas, tdlTransaccion);
|
||
// }
|
||
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKOTROMATERIALPOZOAGUAARRIBA"].ToString() == string.Empty)
|
||
// {
|
||
// nPKOtroMaterialPozoAguaArriba = GuardarOtroMaterialPozoAguaArriba(nPkInspeccionAS, tdlTransaccion);
|
||
// }
|
||
// else
|
||
// {
|
||
// if(nPKPozoAguas != 0 && rblMaterialPozoAguaArriba.SelectedValue == "7")
|
||
// {
|
||
// nPKOtroMaterialPozoAguaArriba = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKOTROMATERIALPOZOAGUAARRIBA"].ToString());
|
||
// nPKOtroMaterialPozoAguaArriba = ModificarOtroMaterialPozoAguaArriba(nPKOtroMaterialPozoAguaArriba, tdlTransaccion);
|
||
// }
|
||
// }
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKOTROMATERIALPOZOAGUAABAJO"].ToString() == string.Empty)
|
||
// {
|
||
// nPKOtroMaterialPozoAguaAbajo = GuardarOtroMaterialPozoAguaAbajo(nPkInspeccionAS, tdlTransaccion);
|
||
// }
|
||
// else
|
||
// {
|
||
// if(nPKPozoAguas != 0 && rblMaterialPozoAguaAbajo.SelectedValue == "7")
|
||
// {
|
||
// nPKOtroMaterialPozoAguaAbajo = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKOTROMATERIALPOZOAGUAABAJO"].ToString());
|
||
// nPKOtroMaterialPozoAguaAbajo = ModificarOtroMaterialPozoAguaAbajo(nPKOtroMaterialPozoAguaAbajo, tdlTransaccion);
|
||
// }
|
||
// }
|
||
|
||
|
||
|
||
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKDIAMETROPREVISTAAS"].ToString() == string.Empty)
|
||
// {
|
||
// nPKOtroMaterialPozoAguaAbajo = GuardarDiametroPrevistaAS(nPkInspeccionAS, tdlTransaccion);
|
||
// }
|
||
// else
|
||
// {
|
||
// if (nPkInspeccionAS != 0 && rblCuentaPrevista.SelectedValue == "1")
|
||
// {
|
||
// nPKDiametroPrevistaAS = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKDIAMETROPREVISTAAS"].ToString());
|
||
// nPKDiametroPrevistaAS = ModificarDiametroPrevistaAS(nPKDiametroPrevistaAS, tdlTransaccion);
|
||
// }
|
||
// }
|
||
// if (nPkInspeccionAS != 0 && rblDisponibilidadAS.SelectedValue == "false")
|
||
// {
|
||
|
||
// nPKNegacionDisponibilidad = ModificarNegaciondisponibilidad(nPkInspeccionAS, tdlTransaccion);
|
||
|
||
// if (rblRequiereCCR.SelectedValue == "true")
|
||
// {
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKNOEXISTEDISPONIBILIDAD"].ToString() == string.Empty)
|
||
// nPKNoExisteDisponibilidadCritTecnico = GuardarNoExisteDisponibilidadCriterioTecnico(nPkInspeccion, tdlTransaccion);
|
||
// else
|
||
// {
|
||
// nPKNoExisteDisponibilidadCritTecnico = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKNOEXISTEDISPONIBILIDAD"].ToString());
|
||
// nPKNoExisteDisponibilidadCritTecnico = ModificarNoExisteDisponibilidadCriterioTecnico(nPKNoExisteDisponibilidadCritTecnico, tdlTransaccion);
|
||
// }
|
||
// }
|
||
// if (nPKNoExisteDisponibilidadCritTecnico != 0)
|
||
// {
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKCREACIONCRITTEC"].ToString() == string.Empty)
|
||
// nPKCreacionCritTec = GuardarCreacionCritTec(nPKNoExisteDisponibilidadCritTecnico, tdlTransaccion);
|
||
// else
|
||
// {
|
||
// nPKCreacionCritTec = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKCREACIONCRITTEC"].ToString());
|
||
// nPKCreacionCritTec = ModificarCreacionCritTec(nPKCreacionCritTec, tdlTransaccion);
|
||
// }
|
||
// }
|
||
// if (chkOtrosOperadores.Checked == true)
|
||
// {
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKOTROSOPERADORES"].ToString() == string.Empty)
|
||
// nPKOtrosOperadores = GuardarOtrosOperadores(nPkInspeccionAS, tdlTransaccion);
|
||
// else
|
||
// {
|
||
// nPKOtrosOperadores = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKOTROSOPERADORES"].ToString());
|
||
// nPKOtrosOperadores = ModificarOtrosOperadores(nPKOtrosOperadores, tdlTransaccion);
|
||
// }
|
||
// }
|
||
|
||
// }
|
||
|
||
|
||
// if (nPkInspeccionAS != 0 && bool.Parse(rblDisponibilidadAS.SelectedValue) == true)
|
||
// {
|
||
// nPKExisteDisponibilidad = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKEXISTEDISPALCANTSAN"].ToString());
|
||
// nPKExisteDisponibilidad = ModificarExisteDispAlcantSan(nPKExisteDisponibilidad, tdlTransaccion);
|
||
// }
|
||
|
||
|
||
|
||
// if (nPkInspeccionAS != 0)
|
||
// {
|
||
// nPKInspeccionUbicaMedidor = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKINSPECCIONUBICAMEDIDOR"].ToString());
|
||
// nPKInspeccionUbicaMedidor = ModificarInspeccionubicamedidor(nPKInspeccionUbicaMedidor, tdlTransaccion);
|
||
// }
|
||
|
||
|
||
|
||
// //if (nPkInspeccionAS != 0)
|
||
// //{
|
||
// // nPKTipoprevista = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKTIPOPREVISTA"].ToString());
|
||
// // nPKTipoprevista = ModificarTipoPrevista(nPKTipoprevista, tdlTransaccion);
|
||
// //}
|
||
// if (nPkInspeccionAS != 0 && int.Parse(rblServiciosAfectanConexion.SelectedValue) == 5)
|
||
// {
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKOTROSERVICIOAFECTACONEXION"].ToString() == string.Empty)
|
||
// nPKOtroServicioAfectaConexion = GuardarOtroServicioAfectaConexion(nPkInspeccionAS, tdlTransaccion);
|
||
// else
|
||
// {
|
||
// nPKOtroServicioAfectaConexion = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKOTROSERVICIOAFECTACONEXION"].ToString());
|
||
// nPKOtroServicioAfectaConexion = ModificarOtroServicioAfectaConexion(nPKOtroServicioAfectaConexion, tdlTransaccion);
|
||
// }
|
||
// }
|
||
|
||
// if (nPkInspeccionAS != 0 && int.Parse(rblNuevoServicio.SelectedValue) == 5)
|
||
// {
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKVALORNUEVOSERVICIO"].ToString() == string.Empty)
|
||
// nPKValorNumerico = GuardarValorNuevoServicio(nPkInspeccionAS, rblDiametroNuevoServicio.SelectedValue.ToString(), tdlTransaccion);
|
||
// else
|
||
// {
|
||
// nPKValorNumerico = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKVALORNUEVOSERVICIO"].ToString());
|
||
// nPKValorNumerico = ModificarValorNuevoServicio(nPKValorNumerico, rblDiametroNuevoServicio.SelectedValue.ToString(), tdlTransaccion);
|
||
// }
|
||
// }
|
||
|
||
// if (nPkInspeccionAS != 0 && int.Parse(rblNuevoServicio.SelectedValue) == 6)
|
||
// {
|
||
// if (dsInspeccion.Tables[0].Rows[0]["PKVALORNUEVOSERVICIO"].ToString() == string.Empty)
|
||
// nPKValorNumerico = GuardarValorNuevoServicio(nPkInspeccionAS, txtDistanciaNuevoServicio.Text, tdlTransaccion);
|
||
// else
|
||
// {
|
||
// nPKValorNumerico = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKVALORNUEVOSERVICIO"].ToString());
|
||
// nPKValorNumerico = ModificarValorNuevoServicio(nPKValorNumerico, txtDistanciaNuevoServicio.Text, tdlTransaccion);
|
||
// }
|
||
// }
|
||
|
||
|
||
|
||
// if (nPkInspeccionAS != 0)
|
||
// {
|
||
// nPKCroquis = int.Parse(dsInspeccion.Tables[0].Rows[0]["PKCROQUIS"].ToString());
|
||
// nPKCroquis = ModificarCroquis(nPKCroquis, tdlTransaccion);
|
||
// }
|
||
|
||
// nValorRetornado = nPkInspeccionAS;
|
||
// llenarGrid();
|
||
|
||
// GuardarEventoBitacora(
|
||
// Session["LOGIN"].ToString(),
|
||
// AccionBitacora.INSERT.ToString(),
|
||
// MensajesBitacora.IngresarRegistro + ": Se ha modificado el formulario de criterio técnico de alcantarillado sanitario " + nPkInspeccion.ToString().Trim(),
|
||
// "frwCriterioAS.aspx",
|
||
// Convert.ToInt32(ConfigurationManager.AppSettings["pkApp"])
|
||
// );
|
||
|
||
|
||
|
||
// }
|
||
// }
|
||
// }
|
||
// #endregion
|
||
// }
|
||
// else
|
||
// {
|
||
// nValorRetornado = 0;
|
||
// }
|
||
|
||
// }
|
||
|
||
|
||
// catch (Exception ex)
|
||
// {
|
||
// throw ex;
|
||
// }
|
||
// finally
|
||
// {
|
||
// //tdlTransaccion.CommitTransaction();
|
||
// }
|
||
return nValorRetornado;
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
private int ModificarInspeccionGeneral(TransaccionDAL p_tdlTransaccion)
|
||
{
|
||
int pkResult = 0;
|
||
try
|
||
{
|
||
//objRevisionFirmaSolicitudBL = new inspeccionasBL();
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.PKINSPECCION = int.Parse(Session["PKINSPECCION"].ToString());
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.ESTRUCTURAEXISTENTEINSPECCION = bool.Parse(rblEstructuraExistente.SelectedValue.ToString());
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.TIPOESTRUCTURA = txtTipoEstructuraExistente.Text;
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.DISPONIBILIDADASOCIADAEXISTENTEINSPECCION = bool.Parse(rblExisteDisponibilidad.SelectedValue.ToString());
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.DESCRIPCIONDISPONIBILIDADEXISTENTEINSPECCION = txtDisponibilidadAsociada.Text;
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.CONDOMINIO = txtOficioRecepcion.Text;
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.FECHAINSPECCION = DateTime.Now;
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.FKESTADOINSPECCION = 1;//Asignada
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.FKSOLICITUD = int.Parse(Session["PKSOLICITUD"].ToString());
|
||
//objRevisionFirmaSolicitudBL.objinspeccionasEL.ASTATE = true;
|
||
|
||
//pkResult = objRevisionFirmaSolicitudBL.modificarInspecciongeneral();
|
||
}
|
||
catch (Exception ex)
|
||
{ throw ex; }
|
||
return pkResult;
|
||
}
|
||
|
||
|
||
|
||
///// <summary>
|
||
///// guarda y modifica registros en la tabla.
|
||
///// </summary>
|
||
///// <returns></returns>
|
||
/////
|
||
|
||
|
||
//private int GuardarDatosActividad(string p_accion)
|
||
//{
|
||
// int nValorRetornado = 0;
|
||
|
||
// try
|
||
// {
|
||
|
||
// string strModo = ViewState["MODO"].ToString();
|
||
// int nPkSolicitud = 0;
|
||
// int nResultadoActualizar = 0;
|
||
// string strMensajeContenido = "";
|
||
// string strAsuntoCorreo = "";
|
||
// string strPiePagina = "</BR> </BR></BR>AVISO DE CONFIDENCIALIDAD: este mensaje y la información incluida en él es confidencial y está dirigida únicamente al destinatario. Puede contener información privilegiada, confidencial, amparada por el secreto profesional o que no debe ser revelada. Si usted ha recibido este correo por error, por favor comunicarlo inmediatamente vía correo y tener la amabilidad de eliminarlo de su sistema. Queda notificado que no deberá copiar este mensaje, ni utilizar, divulgar, publicar o distribuir su contenido de modo alguno. Todo mensaje enviado a esta dirección de correo electrónico puede ser sujeto a inspección por alguien distinto de su receptor originario. La transmisión de correos no garantiza que el correo electrónico sea seguro o libre de error. Por consiguiente, se advierte que esta información pueda estar incompleta o ser poco precisa ya que toda información está sujeta a alterarse sin previo aviso.”";
|
||
|
||
// solicitudBL objSolicitudBL = new solicitudBL();
|
||
// objSolicitudBL.objSolicitudEL.PK = int.Parse(Session["PKPROGRAMACION"].ToString());
|
||
// objSolicitudBL.objSolicitudEL.ORDEN = int.Parse(Session["NACTIVIDAD"].ToString());
|
||
|
||
// DataSet dsEncargadosActividades = objSolicitudBL.dsListaActividadesEncargado(null);
|
||
|
||
// if (dsEncargadosActividades.Tables[0].Rows.Count > 0)
|
||
// {
|
||
// string strEncargadoActividad = dsEncargadosActividades.Tables[0].Rows[0]["PKRESPONSABLEACTIVIDAD"].ToString();
|
||
|
||
// ObservacionesActividadesBL objObservacionesBL = new ObservacionesActividadesBL();
|
||
// //objObservacionesBL.objobservacionesEL.FKNUMSOLICITUD = strNumSolicitudTMP;
|
||
// objObservacionesBL.objobservacionesEL.DESCRIPCION = "\n" + DateTime.Now.ToString()+ " - " + Session["NOMBREEMPLEADO"].ToString() + " - Se " + p_accion + " el formulario por parte del encargado de la revisión: " + Session["NOMBREEMPLEADO"].ToString();
|
||
// objObservacionesBL.objobservacionesEL.FKUSUARIOXDEPENDENCIA = int.Parse(Session["PKUSUARIOXDEPENDENCIA"].ToString());
|
||
// objObservacionesBL.objobservacionesEL.PKRESPONSABLEACTIVIDAD = int.Parse(strEncargadoActividad);
|
||
// objObservacionesBL.objobservacionesEL.Fecha = DateTime.Now;
|
||
// objObservacionesBL.objobservacionesEL.TIPO = 1;
|
||
// //objObservacionesBL.objobservacionesEL.FKSOLICITUD = nPKSolicitud;
|
||
// //objObservacionesBL.objobservacionesEL.USUARIO = Session["LOGIN"].ToString();
|
||
|
||
// nValorRetornado = objObservacionesBL.insertarObservacionActividad();
|
||
|
||
|
||
// if (nValorRetornado != 0)
|
||
// {
|
||
// solicitudBL objSolicitud = new solicitudBL();
|
||
// //objSolicitud.objresponsableActividadEL.PK = int.Parse(Session["PKRESPONSABLEACTIVIDAD"].ToString());
|
||
// //poner la actividad actual en estado correspondiente
|
||
// objSolicitud.objresponsableActividadEL.FECHADEVOLUCION = DateTime.Now;
|
||
|
||
// foreach (DataRow row in dsEncargadosActividades.Tables[0].Rows)
|
||
// {
|
||
|
||
// objSolicitud.objresponsableActividadEL.PK = int.Parse(row["PKRESPONSABLEACTIVIDAD"].ToString());
|
||
// if (p_accion == "aprueba")
|
||
// {
|
||
|
||
// decimal nTiempoActividad = 0;
|
||
// if (row["CLASIFICACIONSOLICITUD"].ToString() == "Crecimiento vegetativo")
|
||
// nTiempoActividad = decimal.Parse(row["TIEMPOCVACTIVIDAD"].ToString());
|
||
// if (row["CLASIFICACIONSOLICITUD"].ToString() == "Desarrollo urbanistico")
|
||
// nTiempoActividad = decimal.Parse(row["TIEMPODUACTIVIDAD"].ToString());
|
||
|
||
// char[] separadorColumna = { '.' };
|
||
// string[] strArrayTiempo = nTiempoActividad.ToString().Replace(",", ".").Split(separadorColumna);
|
||
|
||
// DateTime dtFechaRecibido = DateTime.Parse(row["FECHAASIGNACIONRESPONSABLEACTIVIDAD"].ToString()).AddDays(double.Parse(strArrayTiempo[0].ToString()));
|
||
// if (double.Parse(strArrayTiempo[1].ToString()) > 0)
|
||
// dtFechaRecibido = dtFechaRecibido.AddHours(4);
|
||
|
||
|
||
|
||
|
||
// if (dtFechaRecibido > DateTime.Now)
|
||
// objSolicitud.objresponsableActividadEL.FKESTADO = 5;//finalizada a tiempo t_sgm_estadoactividad
|
||
// else
|
||
// objSolicitud.objresponsableActividadEL.FKESTADO = 8;//finalizada fuera de tiempo t_sgm_estadoactividad
|
||
|
||
// strMensajeContenido = "La actividad " + Session["DESCRIPCIONACTIVIDAD"].ToString() + " de la solicitud N° " + Session["SOLICITUD"].ToString() + " ha sido concluida para ver los detalles, ingrese al sistema <a href=http://" + HttpContext.Current.Request.Url.Authority + "/Forms/wfrLogin.> SIGDD</a>" + strPiePagina;
|
||
// strAsuntoCorreo = "Conclusión de actividad - SIGDD";
|
||
|
||
// }
|
||
// else
|
||
// {
|
||
// objSolicitud.objresponsableActividadEL.FKESTADO = 4;//reinspeccion t_sgm_estadoactividad
|
||
// strMensajeContenido = "La actividad " + Session["DESCRIPCIONACTIVIDAD"].ToString() + " de la solicitud N° " + Session["SOLICITUD"].ToString() + " no ha sido aprobada para ver los detalles, ingrese al sistema <a href=http://" + HttpContext.Current.Request.Url.Authority + "/Forms/wfrLogin.> SIGDD</a>" + strPiePagina;
|
||
// strAsuntoCorreo = "Reinspección de actividad - SIGDD";
|
||
// }
|
||
// nResultadoActualizar = objSolicitud.actualizarActividadSolicitud();
|
||
// }
|
||
|
||
|
||
// if (p_accion == "deniega")
|
||
// {
|
||
// //Poner la actividad 2 programacion en pendiente(3)
|
||
// objSolicitudBL = new solicitudBL();
|
||
// objSolicitudBL.objSolicitudEL.PK = int.Parse(Session["PKPROGRAMACION"].ToString());
|
||
// objSolicitudBL.objSolicitudEL.ORDEN = 2;
|
||
|
||
// dsEncargadosActividades = objSolicitudBL.dsListaActividadesEncargado(null);
|
||
// foreach (DataRow row in dsEncargadosActividades.Tables[0].Rows)
|
||
// {
|
||
|
||
// objSolicitud.objresponsableActividadEL.PK = int.Parse(row["PKRESPONSABLEACTIVIDAD"].ToString()); ;
|
||
// objSolicitud.objresponsableActividadEL.FKESTADO = 3;//pendiente t_sgm_estadoactividad
|
||
// nResultadoActualizar = objSolicitud.actualizarActividadSolicitud();
|
||
// }
|
||
// }
|
||
|
||
// #region Envio de correo
|
||
|
||
|
||
|
||
|
||
// int nActividad = int.Parse(Session["NACTIVIDAD"].ToString());
|
||
// //if (nActividad > 2)
|
||
// // nActividad = 2;//SE ENVIA PARA REPROGRAMAR11
|
||
// //else
|
||
// // nActividad = 1;
|
||
|
||
|
||
// //se envia correo a los encargados de la actividad 3
|
||
// objSolicitudBL.objSolicitudEL.PK = int.Parse(Session["PKPROGRAMACION"].ToString());
|
||
// objSolicitudBL.objSolicitudEL.ORDEN = nActividad;
|
||
// dsEncargadosActividades = objSolicitudBL.dsListaActividadesEncargado(null);
|
||
// AyABL.TRA.correoBL objcorreoBL = new AyABL.TRA.correoBL();
|
||
// if (dsEncargadosActividades.Tables[0].Rows.Count > 0)
|
||
// {
|
||
// foreach (DataRow row in dsEncargadosActividades.Tables[0].Rows)
|
||
// {
|
||
// nPkSolicitud = Convert.ToInt32(row[1].ToString());//AQUI INSERTAMOS LA PK DE LA SOLICITUD
|
||
|
||
// objcorreoBL.objcorreoEL.FKNUMSOLICITUD = nPkSolicitud;
|
||
// // objcorreoBL.objcorreoEL.CORREO = dsActividad.Tables[0].Rows[0]["LOGINUSUARIO"].ToString() + "@aya.go.cr";
|
||
// objcorreoBL.objcorreoEL.ASUNTO = strAsuntoCorreo;
|
||
// objcorreoBL.objcorreoEL.CONTENIDO = strMensajeContenido;
|
||
// objcorreoBL.objcorreoEL.FKUSUARIO = Convert.ToInt32(row["FKUSUARIOXDEPENDENCIA"].ToString());
|
||
// objcorreoBL.objcorreoEL.Fecha = DateTime.Now;
|
||
|
||
// nValorRetornado = objcorreoBL.insertarCorreo();
|
||
// }
|
||
// }
|
||
// //se envia correo a los encargados de la actividad 2 para reprogramar la tarea
|
||
// objSolicitudBL.objSolicitudEL.PK = int.Parse(Session["PKPROGRAMACION"].ToString());
|
||
// objSolicitudBL.objSolicitudEL.ORDEN = 2;
|
||
// dsEncargadosActividades = objSolicitudBL.dsListaActividadesEncargado(null);
|
||
|
||
// if (dsEncargadosActividades.Tables[0].Rows.Count > 0)
|
||
// {
|
||
// foreach (DataRow row in dsEncargadosActividades.Tables[0].Rows)
|
||
// {
|
||
// nPkSolicitud = Convert.ToInt32(row[1].ToString());//AQUI INSERTAMOS LA PK DE LA SOLICITUD
|
||
|
||
// objcorreoBL.objcorreoEL.FKNUMSOLICITUD = nPkSolicitud;
|
||
// // objcorreoBL.objcorreoEL.CORREO = dsActividad.Tables[0].Rows[0]["LOGINUSUARIO"].ToString() + "@aya.go.cr";
|
||
// objcorreoBL.objcorreoEL.ASUNTO = "Devolución de actividad - SIGDD";
|
||
// objcorreoBL.objcorreoEL.CONTENIDO = strMensajeContenido;
|
||
// objcorreoBL.objcorreoEL.FKUSUARIO = Convert.ToInt32(row["FKUSUARIOXDEPENDENCIA"].ToString());
|
||
// objcorreoBL.objcorreoEL.Fecha = DateTime.Now;
|
||
|
||
// nValorRetornado = objcorreoBL.insertarCorreo();
|
||
// }
|
||
// }
|
||
|
||
// //se envia correo a los encargados de la actividad 5 para iniciar la tarea de constancia de actividad
|
||
// objSolicitudBL.objSolicitudEL.PK = int.Parse(Session["PKPROGRAMACION"].ToString());
|
||
// objSolicitudBL.objSolicitudEL.ORDEN = 5;
|
||
// dsEncargadosActividades = objSolicitudBL.dsListaActividadesEncargado(null);
|
||
|
||
// if (dsEncargadosActividades.Tables[0].Rows.Count > 0)
|
||
// {
|
||
// foreach (DataRow row in dsEncargadosActividades.Tables[0].Rows)
|
||
// {
|
||
// nPkSolicitud = Convert.ToInt32(row[1].ToString());//AQUI INSERTAMOS LA PK DE LA SOLICITUD
|
||
|
||
// objcorreoBL.objcorreoEL.FKNUMSOLICITUD = nPkSolicitud;
|
||
// // objcorreoBL.objcorreoEL.CORREO = dsActividad.Tables[0].Rows[0]["LOGINUSUARIO"].ToString() + "@aya.go.cr";
|
||
// objcorreoBL.objcorreoEL.ASUNTO = "Devolución de actividad - SIGDD";
|
||
// objcorreoBL.objcorreoEL.CONTENIDO = strMensajeContenido;
|
||
// objcorreoBL.objcorreoEL.FKUSUARIO = Convert.ToInt32(row["FKUSUARIOXDEPENDENCIA"].ToString());
|
||
// objcorreoBL.objcorreoEL.Fecha = DateTime.Now;
|
||
|
||
// nValorRetornado = objcorreoBL.insertarCorreo();
|
||
// }
|
||
// }
|
||
|
||
// #endregion
|
||
// }
|
||
// }
|
||
|
||
// //GuardarEventoBitacora(
|
||
// // Session["LOGIN"].ToString(),
|
||
// // AccionBitacora.INSERT.ToString(),
|
||
// // MensajesBitacora.IngresarRegistro + ": Se ingreso una nueva observacion por devolución de la actividad: Se aprueba el formulario por parte del encargado de la revisión: " + Session["NOMBREEMPLEADO"].ToString().Trim(),
|
||
// // "frwValidacionFirma.aspx",
|
||
// // Convert.ToInt32(ConfigurationManager.AppSettings["pkApp"])
|
||
// // );
|
||
|
||
|
||
|
||
|
||
// }
|
||
// catch (Exception ex)
|
||
// {
|
||
// throw ex;
|
||
// }
|
||
|
||
// return nValorRetornado;
|
||
//}
|
||
#endregion
|
||
|
||
#region Metodos Datos a Controles (R6)
|
||
|
||
|
||
|
||
|
||
|
||
/// <summary>
|
||
/// LLena el listado de roles de usuario
|
||
/// </summary>
|
||
private void llenarGrid() //M3
|
||
{
|
||
try
|
||
{
|
||
objRevisionFirmaSolicitudBL = new revisionfirmasolicitudBL();
|
||
objRevisionFirmaSolicitudBL.objRevisionfirmasolicitudEL.FKSOLICITUD = int.Parse(Session["PKSOLICITUD"].ToString());
|
||
DataSet dsInspeccionBL = objRevisionFirmaSolicitudBL.listarRevisionFirmas();
|
||
General.detalleGridView(dsInspeccionBL, grvLista , lblTotalDatos);
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw ex;
|
||
}
|
||
}
|
||
|
||
|
||
|
||
/// <summary>
|
||
/// Carga el grid principal
|
||
/// </summary>
|
||
/// <param name="p_Llenar"></param>
|
||
private void llenarDDLEncargado(bool p_Llenar) //M0
|
||
{
|
||
try
|
||
{
|
||
ddlEncargadoRevision.Items.Clear();
|
||
ArrayList arlCondicionesFiltroBusqueda = new ArrayList();
|
||
ActividadesBL objActividadesBL = new ActividadesBL();
|
||
|
||
objActividadesBL.objactividadesEL.Activo = true;
|
||
objActividadesBL.objactividadesEL.ORDEN = 4;//Criterio tecnico AS
|
||
objActividadesBL.objactividadesEL.FKDEPENDENCIA = int.Parse(Session["DEPENDENCIA"].ToString());
|
||
|
||
DataSet dsActividad = objActividadesBL.dsListaActividad(arlCondicionesFiltroBusqueda);
|
||
|
||
if (dsActividad.Tables[0].Rows.Count != 0)
|
||
{
|
||
ddlEncargadoRevision.DataSource = dsActividad;
|
||
ddlEncargadoRevision.DataTextField = dsActividad.Tables[0].Columns["NOMBRECOMPLETO"].ColumnName;
|
||
ddlEncargadoRevision.DataValueField = dsActividad.Tables[0].Columns["PKUSUARIOXDEPENDENCIA"].ColumnName;
|
||
ddlEncargadoRevision.DataBind();
|
||
|
||
|
||
ddlEncargadoRevision.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||
}
|
||
else
|
||
ddlEncargadoRevision.Items.Insert(0, new ListItem("----- No existen opciones -----", "-1"));
|
||
|
||
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw ex;
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
|
||
|
||
protected void grvLista_RowDataBound(object sender, GridViewRowEventArgs e)
|
||
{
|
||
try
|
||
{
|
||
GridViewRow selectedRow = e.Row;
|
||
|
||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||
{
|
||
//e.Row.Cells[6].ToolTip = "Ver formulario";
|
||
//e.Row.Cells[7].ToolTip = "Enviar a revisión";
|
||
//e.Row.Cells[7].Enabled = false;
|
||
//e.Row.Cells[7].Style.Add("opacity", "0.5");
|
||
//if (e.Row.Cells[5].Text == "Asignada")
|
||
//{
|
||
// e.Row.Cells[7].Enabled = true;
|
||
// e.Row.Cells[7].Style.Add("opacity", "1");
|
||
//}
|
||
}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
throw ex;
|
||
}
|
||
}
|
||
|
||
|
||
protected void btnActualizar_Click(object sender, EventArgs e)
|
||
{
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
} |