Example #1
0
        public override int buscarRegistros()
        {
            TList_CadTpProduto lista = TCN_CadTpProduto.Busca(TP_Produto.Text,
                                                              DS_TpProduto.Text,
                                                              string.Empty,
                                                              st_servico.Checked ? "S" : string.Empty,
                                                              st_composto.Checked ? "S" : string.Empty,
                                                              st_mprima.Checked ? "S" : string.Empty,
                                                              st_semente.Checked ? "S" : string.Empty,
                                                              st_mprimasemente.Checked ? "S" : string.Empty,
                                                              st_consumoInterno.Checked? "S" : string.Empty,
                                                              st_industrializado.Checked ? "S" : string.Empty,
                                                              st_patrimonio.Checked ? "S" : string.Empty,
                                                              null);

            if (lista != null)
            {
                if (lista.Count > 0)
                {
                    this.Lista = lista;
                    BS_CadTpProduto.DataSource = lista;
                }
                else
                if ((vTP_Modo == TTpModo.tm_Standby) || (vTP_Modo == TTpModo.tm_busca))
                {
                    BS_CadTpProduto.Clear();
                }
                return(lista.Count);
            }
            else
            {
                return(0);
            }
        }