Repopulando o BO


Author
Message
Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ivan... Boa Tarde...

O BO não disponibiliza um método para 'repopular' os dados sem executar um novo Fill?

Por exemplo, com o BO carregado eu gostaria de executar um método, do tipo tabelaBO1.Recovery() e repopular o BO com os dados atualizados do banco de dados, sem ter que usar um tabelaBO1.FillDataTable("SELECT....").

Rogério Mauri Smile



Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Ola Rogério.

Em resumo, não. Você pode até implementar um Requery se achar necessário. Siga os posts a partir deste link e veja uma boa discussão sobre o assunto:

http://forum.strataframe.net/FindPost17539.aspx

Abraços.

Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
É... percebi... e foi o que eu fiz...

public void FillByView(vwTbColetaBO viewBO)
{
   
if (viewBO.Count == 0)
       
return;
    viewBO.MoveFirst();
   
string where = string.Empty; 
    d
o
   
{
        where += viewBO.IdColeta +
", ";
    }
while (viewBO.MoveNext());
    where = where.Trim();
    where = where.Remove(where.Length - 1);
   
this.FillDataTable("SELECT * FROM vwTbColeta"
       
+ " WHERE IdColeta IN ( " + where + " )");
}



Rogério Mauri Smile

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Beleza! Wink
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search