public List <pDataManu> RelatorioManutencaoStatus(string Status) { pDataManu P = new pDataManu(); DataTable DT = new Dao().RelatorioManutencaoStatus(Status); List <pDataManu> LC = new List <pDataManu>(); for (int i = 0; i < DT.Rows.Count; i++) { LC.Add(new pDataManu() { Cod_Manutencao = Convert.ToInt32(DT.Rows[i]["Cod_Manutencao"]), Cliente = new pCliente() { Cod_Cliente = Convert.ToInt32(DT.Rows[i]["Cod_ClienteFK"]), Nome = DT.Rows[i]["Nome"].ToString() }, //P.Cod_ClienteFK = Convert.ToInt32(DT.Rows[i]["Cod_ClienteFK"]); Modelo = DT.Rows[i]["Modelo"].ToString(), Marca = DT.Rows[i]["Marca"].ToString(), NumSerie = DT.Rows[i]["NumSerie"].ToString(), DataEntrada = Convert.ToDateTime(DT.Rows[i]["DataEntrada"]), DataSaida = Convert.ToDateTime(DT.Rows[i]["DataSaida"]), Status = DT.Rows[i]["Status"].ToString(), Observacao = DT.Rows[i]["Observacao"].ToString(), ValorMObra = Convert.ToDecimal(DT.Rows[i]["ValorMObra"]), FormaPagamento = DT.Rows[i]["FormaPagamento"].ToString(), Matr_FuncFK = Convert.ToInt32(DT.Rows[i]["Matr_FuncFK"]) //Funcionario = new pFuncionario() { Matr_Func = Convert.ToInt32(DT.Rows[i]["Matr_FuncFK"]), Nome = DT.Rows[i]["Nome"].ToString() } }); } return(LC); }
public List<pDataManu> RelatorioManutencaoStatus(string Status) { pDataManu P = new pDataManu(); DataTable DT = new Dao().RelatorioManutencaoStatus(Status); List<pDataManu> LC = new List<pDataManu>(); for (int i = 0; i < DT.Rows.Count; i++) { LC.Add(new pDataManu() { Cod_Manutencao = Convert.ToInt32(DT.Rows[i]["Cod_Manutencao"]), Cliente = new pCliente() { Cod_Cliente = Convert.ToInt32(DT.Rows[i]["Cod_ClienteFK"]), Nome = DT.Rows[i]["Nome"].ToString() }, //P.Cod_ClienteFK = Convert.ToInt32(DT.Rows[i]["Cod_ClienteFK"]); Modelo = DT.Rows[i]["Modelo"].ToString(), Marca = DT.Rows[i]["Marca"].ToString(), NumSerie = DT.Rows[i]["NumSerie"].ToString(), DataEntrada = Convert.ToDateTime(DT.Rows[i]["DataEntrada"]), DataSaida = Convert.ToDateTime(DT.Rows[i]["DataSaida"]), Status = DT.Rows[i]["Status"].ToString(), Observacao = DT.Rows[i]["Observacao"].ToString(), ValorMObra = Convert.ToDecimal(DT.Rows[i]["ValorMObra"]), FormaPagamento = DT.Rows[i]["FormaPagamento"].ToString(), Matr_FuncFK = Convert.ToInt32(DT.Rows[i]["Matr_FuncFK"]) //Funcionario = new pFuncionario() { Matr_Func = Convert.ToInt32(DT.Rows[i]["Matr_FuncFK"]), Nome = DT.Rows[i]["Nome"].ToString() } }); } return LC; }