示例#1
0
        public ActionResult Pesquisa(string tag)
        {
            if (string.IsNullOrWhiteSpace(tag))
            {
                return(RedirectToAction("Index"));
            }
            List <String> tags         = tag.Split(' ').ToList();
            List <Peca>   listaRetorno = tBll.LerPecasInterseccaoTags(tags);

            return(View(listaRetorno));
        }
示例#2
0
        private void btnPesquisar_Click(object sender, EventArgs e)
        {
            string      tag          = txtTag.Text;
            List <Peca> listaRetorno = null;

            if (checkBox1.Checked)
            {
                var tags = tag.Split(' ').ToList();
                listaRetorno = bll.LerPecasInterseccaoTags(tags);
            }
            else
            {
                listaRetorno = bll.LerPecasComATag(tag);
            }
            this.dataGridView1.DataSource = listaRetorno;
        }