protected void ImgEliminaTele_Click(object sender, ImageClickEventArgs e) { try { if (DdlMotivo2.SelectedValue == "0") { new FuncionesDAO().FunShowJSMessage("Seleccione Motivo..!", this); return; } if (string.IsNullOrEmpty(TxtObservacion2.Text.Trim())) { new FuncionesDAO().FunShowJSMessage("Ingrese Observación..!", this); return; } GridViewRow _gvrow = (GridViewRow)(sender as Control).Parent.Parent; _telefono = GrdvTelefonos.DataKeys[_gvrow.RowIndex].Values["Telefono"].ToString(); new ConsultaDatosDAO().FunConsultaDatos(88, int.Parse(ViewState["codigoCEDE"].ToString()), int.Parse(ViewState["codigoPERS"].ToString()), int.Parse(ViewState["codigoCLDE"].ToString()), "", _telefono, "", Session["Conectar"].ToString()); SoftCob_ACCIONGESTION _newaccion = new SoftCob_ACCIONGESTION(); { _newaccion.acci_tipoaccion = "ELIMINAR TELEFONO"; _newaccion.acci_idmotivo = int.Parse(DdlMotivo2.SelectedValue); _newaccion.acci_observacion = TxtObservacion2.Text.Trim().ToUpper(); _newaccion.acci_codigocpce = int.Parse(ViewState["codigoCPCE"].ToString()); _newaccion.acci_identificacion = ViewState["Identificacion"].ToString(); _newaccion.acci_operacion = ""; _newaccion.acci_gestoranterior = 0; _newaccion.acci_gestoractual = 0; _newaccion.acci_datoanterior = _telefono; _newaccion.acci_auxv1 = ""; _newaccion.acci_auxv2 = ""; _newaccion.acci_auxv3 = ""; _newaccion.acci_auxi1 = int.Parse(ViewState["codigoPERS"].ToString()); _newaccion.acci_auxi2 = 0; _newaccion.acci_auxi3 = 0; _newaccion.acci_fechacreacion = DateTime.Now; _newaccion.acci_usuariocreacion = int.Parse(Session["usuCodigo"].ToString()); _newaccion.acci_terminalcreacion = Session["MachineName"].ToString(); } new CedenteDAO().FunInsertarAccionGestion(_newaccion); new FuncionesDAO().FunShowJSMessage("Teléfono eliminado con éxito..!", this); _dts = new ConsultaDatosDAO().FunConsultaDatos(35, int.Parse(ViewState["codigoCEDE"].ToString()), int.Parse(ViewState["codigoPERS"].ToString()), int.Parse(ViewState["codigoCLDE"].ToString()), "", "", "", Session["Conectar"].ToString()); GrdvTelefonos.DataSource = _dts; GrdvTelefonos.DataBind(); DdlMotivo2.SelectedValue = "0"; TxtObservacion2.Text = ""; } catch (Exception ex) { Lblerror.Text = ex.ToString(); } }
private void FunCargarDatos() { try { _dts = new ConsultaDatosDAO().FunConsultaDatos(203, 0, 0, 0, "", ViewState["Cedula"].ToString(), "", Session["Conectar"].ToString()); GrdvDatos.DataSource = _dts.Tables[0]; GrdvDatos.DataBind(); GrdvTelefonos.DataSource = _dts.Tables[1]; GrdvTelefonos.DataBind(); } catch (Exception ex) { Lblerror.Text = ex.ToString(); } }
protected void BtnBuscar_Click(object sender, EventArgs e) { try { if (DdlBuscarPor.SelectedValue == "0") { new FuncionesDAO().FunShowJSMessage("Seleccione Opcion de Busqueda..!", this); return; } if (string.IsNullOrEmpty(TxtCriterio.Text.Trim())) { new FuncionesDAO().FunShowJSMessage("Ingrese Crierio para buscar..!", this); return; } _dts = new ConsultaDatosDAO().FunConsultaDatos(181, int.Parse(DdlBuscarPor.SelectedValue), 0, 0, "", TxtCriterio.Text.Trim(), "", Session["Conectar"].ToString()); GrdvCelular.DataSource = _dts.Tables[0]; GrdvCelular.DataBind(); if (_dts.Tables[0].Rows.Count > 0) { PnlTelefonoClaro.Visible = true; } else { PnlTelefonoClaro.Visible = false; } GrdvTelefonos.DataSource = _dts.Tables[1]; GrdvTelefonos.DataBind(); if (_dts.Tables[1].Rows.Count > 0) { PnlTelefonoCNT.Visible = true; } else { PnlTelefonoCNT.Visible = false; } } catch (Exception ex) { Lblerror.Text = ex.ToString(); } }
protected void FunCargarMatenimiento() { try { _dts = new ConsultaDatosDAO().FunConsultaDatos(32, int.Parse(ViewState["codigoPERS"].ToString()), 0, 0, "", "", "", Session["Conectar"].ToString().ToString()); ViewState["Identificacion"] = _dts.Tables[0].Rows[0]["Cedula"].ToString(); GrdvDatosDeudor.DataSource = _dts; GrdvDatosDeudor.DataBind(); _dts = new ConsultaDatosDAO().FunConsultaDatos(58, int.Parse(ViewState["codigoCPCE"].ToString()), 0, 0, "", "", "", Session["Conectar"].ToString().ToString()); ViewState["Catalogo"] = _dts.Tables[0].Rows[0]["Descripcion"].ToString(); _dts = new ConsultaDatosDAO().FunConsultaDatos(33, int.Parse(ViewState["codigoCEDE"].ToString()), int.Parse(ViewState["codigoCPCE"].ToString()), int.Parse(ViewState["codigoCLDE"].ToString()), ViewState["Catalogo"].ToString(), "", "", Session["Conectar"].ToString().ToString()); GrdvDatosObligacion.DataSource = _dts; GrdvDatosObligacion.DataBind(); _dts = new ConsultaDatosDAO().FunConsultaDatos(35, int.Parse(ViewState["codigoCEDE"].ToString()), int.Parse(ViewState["codigoPERS"].ToString()), int.Parse(ViewState["codigoCLDE"].ToString()), "", "", "", Session["Conectar"].ToString()); GrdvTelefonos.DataSource = _dts; GrdvTelefonos.DataBind(); _dts = new ConsultaDatosDAO().FunConsultaDatos(96, int.Parse(ViewState["codigoCLDE"].ToString()), 0, 0, "", "", "", Session["Conectar"].ToString()); GrdvGestiones.DataSource = _dts; GrdvGestiones.DataBind(); } catch (Exception ex) { Lblerror.Text = ex.ToString(); } }
private void FunCargarDatos(string numerodocumento) { try { _dts = new ConsultaDatosDAO().FunConsultaDatos(184, 0, 0, 0, "", numerodocumento.Substring(0, 4), ViewState["Cedula"].ToString(), Session["Conectar"].ToString()); if (_dts.Tables[0].Rows.Count > 0) //REGISTRO CIVIL { LblNombres.Text = _dts.Tables[0].Rows[0]["Nombres"].ToString(); Grdvdatosper1.DataSource = _dts.Tables[0]; Grdvdatosper1.DataBind(); Grdvdatosper2.DataSource = _dts.Tables[0]; Grdvdatosper2.DataBind(); } if (_dts.Tables[1].Rows.Count > 0) //IESS { Tbldatosiess.Visible = true; Grdvdatosiess1.DataSource = _dts.Tables[1]; Grdvdatosiess1.DataBind(); Grdvdatosiess2.DataSource = _dts.Tables[1]; Grdvdatosiess2.DataBind(); } else { Tbldatosiess.Visible = false; } if (_dts.Tables[2].Rows.Count > 0) //SRI { TblSRI.Visible = true; GrdvSri1.DataSource = _dts.Tables[2]; GrdvSri1.DataBind(); GrdvSri2.DataSource = _dts.Tables[2]; GrdvSri2.DataBind(); } else { TblSRI.Visible = false; } if (_dts.Tables[3].Rows.Count > 0) //DIRECCION { TrDireccion.Visible = true; GrdvDireccion.DataSource = _dts.Tables[3]; GrdvDireccion.DataBind(); } else { TrDireccion.Visible = false; } if (_dts.Tables[4].Rows.Count > 0) //TELEFONOS { TrTelefonos.Visible = true; GrdvTelefonos.DataSource = _dts.Tables[4]; GrdvTelefonos.DataBind(); } else { TrTelefonos.Visible = false; } if (_dts.Tables[5].Rows.Count > 0) //EMPRESA { TrEmpresa.Visible = true; GrdvEmpresa.DataSource = _dts.Tables[5]; GrdvEmpresa.DataBind(); } else { TrEmpresa.Visible = false; } if (_dts.Tables[6].Rows.Count > 0) //ARBOL { Tblarbol.Visible = true; ViewState["Arbol"] = _dts.Tables[6]; GrdvDatos.DataSource = _dts.Tables[6]; GrdvDatos.DataBind(); GrdvDatos.UseAccessibleHeader = true; GrdvDatos.HeaderRow.TableSection = TableRowSection.TableHeader; } else { Tblarbol.Visible = false; } } catch (Exception ex) { Lblerror.Text = ex.ToString(); } }