private bool CamposSonValidos() { if (Validators.TextoVacio(text_nombre.Text)) { return(false); } if (Validators.TextoVacio(text_descripcion.Text)) { return(false); } return(true); }
private bool CamposSonValidos() { if (Validators.TextoVacio(text_n_documento.Text)) { return(false); } if (Validators.TextoVacio(text_nombre.Text)) { return(false); } if (Validators.TextoVacio(text_apellido.Text)) { return(false); } return(true); }
private void btn_filtrar_Click(object sender, EventArgs e) { String texto = txt_filtro.Text; object lista = null; if (Validators.TextoVacio(texto) == false) { lista = Program.ctx.Desarrolladors .Where(x => x.Nombre.Contains(texto) || texto.Contains(x.Nombre) || x.Apellido.Contains(texto) || texto.Contains(x.Apellido)) .Select(x => new { DesarrolladorId = x.DesarrolladorId, SiglasDeDocumento = x.TipoDocumento.Siglas, NroDocumento = x.NroDocumento, Nombre = x.Nombre, Apellido = x.Apellido, }).ToList(); } RefrescarGrilla(lista); }
private void btn_filtrar_Click(object sender, EventArgs e) { String texto = txt_filtro.Text; object lista = null; if (Validators.TextoVacio(texto) == false) { lista = Program.ctx.Proyectoes .Where(x => x.Nombre.Contains(texto) || texto.Contains(x.Nombre) || x.Descripcion.Contains(texto) || texto.Contains(x.Descripcion)) .AsEnumerable().Select(x => new { ProyectoId = x.ProyectoId, Finalizado = x.EstaFinalizado, Fecha = x.Fecha, Nombre = x.Nombre, DesarrolladorReponsable = x.Desarrollador.Nombre + " " + x.Desarrollador.Apellido, PorcentajeAcumulado = GetAvance(x.ProyectoId), HorasTotales = GetHoras(x.ProyectoId), }).ToList(); } RefrescarGrilla(lista); }
private bool CamposSonValidos() { if (Validators.TextoVacio(text_descripcion.Text)) { return(false); } if (Validators.TextoVacio(text_avance.Text)) { return(false); } if (Validators.TextoVacio(txt_horas.Text)) { return(false); } if (Validators.TextoEsPorcetaje(text_avance.Text) == false) { MessageBox.Show("Porfavor utilize un porcentaje adecuado (0.00 - 100)!"); return(false); } return(true); }