Beispiel #1
0
        public List <pDataPedido> RelatorioVenda(string FormaPagamento, DateTime Data1, DateTime Data2)
        {
            pDataPedido        P  = new pDataPedido();
            DataTable          DT = new Dao().RelatorioVenda(FormaPagamento, Data1, Data2);
            List <pDataPedido> LC = new List <pDataPedido>();

            for (int i = 0; i < DT.Rows.Count; i++)
            {
                LC.Add(new pDataPedido()
                {
                    Cod_Pedido     = Convert.ToInt32(DT.Rows[i]["Cod_Pedido"]),
                    ValorTotal     = Convert.ToDecimal(DT.Rows[i]["ValorTotal"]),
                    FormaPagamento = DT.Rows[i]["FormaPagamento"].ToString(),
                    DataPagamento  = Convert.ToDateTime(DT.Rows[i]["DataPagamento"]),
                    Cliente        = new pCliente()
                    {
                        Cod_Cliente = Convert.ToInt32(DT.Rows[i]["Cod_ClienteFK"]), Nome = DT.Rows[i]["Nome"].ToString()
                    }
                });
            }
            return(LC);
        }
Beispiel #2
0
 public List<pDataPedido> RelatorioVendaFunc(string FormaPagamento, DateTime Data1, DateTime Data2, int Matr_FuncFK)
 {
     pDataPedido P = new pDataPedido();
     DataTable DT = new Dao().RelatorioVendaFunc(FormaPagamento, Data1, Data2, Matr_FuncFK);
     List<pDataPedido> LC = new List<pDataPedido>();
     for (int i = 0; i < DT.Rows.Count; i++)
     {
         LC.Add(new pDataPedido()
         {
             Cod_Pedido = Convert.ToInt32(DT.Rows[i]["Cod_Pedido"]),
             ValorTotal = Convert.ToDecimal(DT.Rows[i]["ValorTotal"]),
             FormaPagamento = DT.Rows[i]["FormaPagamento"].ToString(),
             DataPagamento = Convert.ToDateTime(DT.Rows[i]["DataPagamento"]),
             Cliente = new pCliente() { Cod_Cliente = Convert.ToInt32(DT.Rows[i]["Cod_ClienteFK"]), Nome = DT.Rows[i]["Nome"].ToString() },
             Matr_FuncFK = Convert.ToInt32(DT.Rows[i]["Matr_FuncFK"])
         });
     }
     return LC;
 }