public static Servico Carregar(int NumeroOs)
{
DataTable tabela = new DataTable("Trabalhos");
Spartacus.Database.Generic database;
Spartacus.Database.Command cmd = new Spartacus.Database.Command();
cmd.v_text = "Select * from Trabalhos where OrdemDeServico = #idOS#";
cmd.AddParameter("idOS", Spartacus.Database.Type.INTEGER);
cmd.SetValue("idOS", NumeroOs.ToString());
try
{
database = new Spartacus.Database.Sqlite(DB.GetStrConection());
tabela = database.Query(cmd.GetUpdatedText(), "Trabalhos");
}
catch (Spartacus.Database.Exception ex)
{
ControllerArquivoLog.GeraraLog(ex);
}
return PreencherTrabalho(tabela);
}