public void InserirPedido() { List<pFuncionario> LF = Session["Login"] as List<pFuncionario>; pPedido P = new pPedido(); P.ValorTotal = Convert.ToDecimal(TotalC.Text); P.FormaPagamento = FormaP.Text; P.DataPagamento = Convert.ToDateTime(DataH.Text); int Cod = Convert.ToInt32(ddlCliente.SelectedValue); P.Cod_ClienteFK = Cod; P.Cod_Pedido = Convert.ToInt32(lblCodPedido.Text); P.Matr_FuncFK = LF[0].Matr_Func; mPedido M = new mPedido(); M.InsPedido(P); }
public List <pPedido> RelatorioFinanceiroVenda(DateTime DataPagamento) { Dao D = new Dao(); DataTable DT = D.RelatorioFinanceiroVenda(DataPagamento); List <pPedido> LC = new List <pPedido>(); for (int i = 0; i < DT.Rows.Count; i++) { pPedido P = new pPedido(); P.Cod_Pedido = Convert.ToInt32(DT.Rows[i]["Cod_Pedido"]); P.ValorTotal = Convert.ToDecimal(DT.Rows[i]["ValorTotal"]); P.FormaPagamento = DT.Rows[i]["FormaPagamento"].ToString(); LC.Add(P); } return(LC); }
public void InserirPedido() { List <pFuncionario> LF = Session["Login"] as List <pFuncionario>; pPedido P = new pPedido(); P.ValorTotal = Convert.ToDecimal(TotalC.Text); P.FormaPagamento = FormaP.Text; P.DataPagamento = Convert.ToDateTime(DataH.Text); int Cod = Convert.ToInt32(ddlCliente.SelectedValue); P.Cod_ClienteFK = Cod; P.Cod_Pedido = Convert.ToInt32(lblCodPedido.Text); P.Matr_FuncFK = LF[0].Matr_Func; mPedido M = new mPedido(); M.InsPedido(P); }
public List<pPedido> RelatorioFinanceiroVenda(DateTime DataPagamento) { Dao D = new Dao(); DataTable DT = D.RelatorioFinanceiroVenda(DataPagamento); List<pPedido> LC = new List<pPedido>(); for (int i = 0; i < DT.Rows.Count; i++) { pPedido P = new pPedido(); P.Cod_Pedido = Convert.ToInt32(DT.Rows[i]["Cod_Pedido"]); P.ValorTotal = Convert.ToDecimal(DT.Rows[i]["ValorTotal"]); P.FormaPagamento = DT.Rows[i]["FormaPagamento"].ToString(); LC.Add(P); } return LC; }
public void InsPedido(pPedido P) { Dao D = new Dao(); D.InsPedido(P.ValorTotal, P.FormaPagamento, P.DataPagamento, P.Cod_ClienteFK, P.Matr_FuncFK); }