private void buscar_soccen_benef(string dni) { Buscadores buscar_ = new Buscadores(); //buscar_.get_titular(dni); buscar_.get_beneficiario(dni); if (buscar_.dat_soc != null) { mostrar_datos_personales(buscar_); mostrar_foto(buscar_.dat_soc.foto, buscar_.dat_soc.estado); } else { Buscadores buscar = new Buscadores(); //buscar.get_beneficiario(dni); buscar.get_titular(dni); if (buscar.dat_soc != null) { mostrar_datos_personales(buscar); mostrar_foto(buscar.dat_soc.foto, buscar.dat_soc.estado); } else { //picbox_socio.Image = entrega_cupones.Properties.Resources.imagen_no_disponible_PNG; lbl_apto.Text = "SOCIO NO ENCONTRADO"; } } }
private void mostrar_datos_personales(Buscadores datos_personales) { lbl_nombre.Text = datos_personales.dat_soc.nombre; lbl_dni.Text = datos_personales.dat_soc.dni; lbl_sexo.Text = datos_personales.dat_soc.sexo.ToString(); lbl_nro_socio.Text = datos_personales.dat_soc.nrosocio.ToString(); }
private void buscar_socio() { //2726954776100046488819 fiore //2726954776127269547761 string dato = txt_buscar.Text;//txt_buscar.Text.Substring(2, 8); if (dato.Length > 11) { if (dato.Substring(11, 3) == "000") // entonces es socio beneficiario sino es titular { Buscadores buscar = new Buscadores(); dato = dato.Substring(14, 8); buscar.get_beneficiario(dato); mostrar_datos_personales(buscar); mostrar_foto(buscar.dat_soc.foto, buscar.dat_soc.estado); } else //es socio titular { Buscadores buscar = new Buscadores(); dato = dato.Substring(2, 8); buscar.get_titular(dato); mostrar_datos_personales(buscar); mostrar_foto(buscar.dat_soc.foto, buscar.dat_soc.estado); } } else { if (dato.Length > 6 && dato.Length <= 8) // Se ingreso un DNI por tipeo { buscar_soccen_benef(dato); } else { if (dato.Length > 8 && dato.Length <= 10) { if ((dato.Length == 9)) { buscar_soccen_benef(dato.Substring(1, 8)); } else { buscar_soccen_benef(dato.Substring(2, 8)); } } else { //picbox_socio.Image = entrega_cupones.Pro lbl_apto.Text = "SOCIO NO ENCONTRADO"; } } } }
private void Estudio_Juridico_Load(object sender, EventArgs e) { try { Buscadores buscar = new Buscadores(); cargar_cbx_inspectores(); var a = buscar.get_actas_involucradas(lbl_cuit.Text); dgv_actas_estudio.DataSource = a.ToList(); } catch (Exception ex) { MessageBox.Show("" + ex.Message); throw; } }
private void cargar_cbx_inspectores() { try { Buscadores buscar = new Buscadores(); cbx_estudios.DisplayMember = "apellido"; cbx_estudios.ValueMember = "id_inspector"; cbx_estudios.DataSource = buscar.get_inspectores().Where(x => x.esEstudio == 1).OrderBy(x => x.apellido).ToList(); } catch (Exception ex) { MessageBox.Show("" + ex.Message); throw; } //Buscadores buscar = new Buscadores(); //cbx_estudios.DisplayMember = "apellido"; //cbx_estudios.ValueMember = "id_inspector"; //cbx_estudios.DataSource = buscar.get_inspectores().Where(x=>x.esEstudio == 1).OrderBy(x => x.apellido).ToList(); }
private bool obtener_usuario() { Buscadores buscar = new Buscadores(); buscar.GetUsuario(txt_usuario.Text, txt_contraseña.Text); if (buscar.dat_soc.Id > 0) { id_usuario = buscar.dat_soc.Id; usuario = buscar.dat_soc.nombre; dni = buscar.dat_soc.dni; rol = buscar.dat_soc.empresa; // Aqui almaceno el rol del usuario rolID = buscar.dat_soc.nrosocio; return(true); } else { return(false); } }
private void MostrarMensajesAlCobrador() { Buscadores busc = new Buscadores(); Cobrador cbr = new Cobrador(); using (var context = new lts_sindicatoDataContext()) { var novedades = (from a in context.Novedades where a.MensajeAlCobrador == 1 && a.EstadoMensajeAlCobrador == 0 join b in context.AsignarCobranza on a.CUIT equals b.CUIT where b.CobradorID == CobradorId select new { a.Fecha, a.Novedad, Empresa = busc.GetEmpresaPorCUIT(b.CUIT), NroDeAsig = a.NumeroDeAsignacion, Emisor = cbr.GetNombreDeCobradorPorID(Convert.ToInt32(a.Usuario)) }).OrderBy(x => x.Fecha); dgv_Novedades.DataSource = novedades.ToList(); this.dgv_Novedades.DefaultCellStyle.WrapMode = DataGridViewTriState.True; } }