private static Servico PreencherTrabalho(DataTable tabela)
{
Servico ServicoBase = new Servico();
List<string> Informacoes = new List<string>();
foreach (DataRow r in tabela.Rows)
{
foreach (DataColumn c in tabela.Columns)
{
Informacoes.Add(r[c].ToString());
}
}
ServicoBase.ID = Convert.ToInt32(Informacoes[0]);
ServicoBase.IdOrdemDeServico = Convert.ToInt32(Informacoes[1]);
ServicoBase.Valor = Convert.ToDecimal(Informacoes[2]);
return ServicoBase;
}