Package br.com.sistelecom.entity

Examples of br.com.sistelecom.entity.Venda


  }

  public void novoRegistro() {
    if (validarDadosFormulario()) {
      try {
        final Venda venda = new Venda();
        venda.setIdCliente(this.getIdCliente());
        venda.setIdFuncionario(this.getIdFuncionario());
        venda.setDataVenda(new Date());
       
        final ItensController controllerItem = this.getItensController();
       
        for(Itens item: this.getItensController().getLista()){
          controllerItem.salvarItens(item)
View Full Code Here


  public void excluirRegistro(ActionEvent evento) {
   
    final String id = ((HtmlActionParameter)((HtmlAjaxCommandButton)evento.getSource()).getChildren().get(0)).getValue().toString();
    int idVenda = Integer.parseInt(id);
   
    final Venda venda = this.getDao().obterPorId(idVenda);
   
    try {
      if(venda != null){
        this.getDao().excluir(venda);
        FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO,"Pedido excluído com sucesso.",""));
View Full Code Here

  /**
   * @return the venda
   */
  public Venda getVenda() {
    if(venda == null){
      this.venda = new Venda();
    }
    return venda;
  }
View Full Code Here

      rs = ps.executeQuery();
      if (!rs.next()) {
        throw new Exception("Não foi encontrado o pedido com esse id: " + id);
      }
     
      Venda venda = new Venda();
      venda.setIdVenda(id);
      venda.setIdCliente(rs.getInt(2));
      venda.setIdFuncionario(rs.getInt(3));
      venda.setDataVenda(rs.getDate(4));
     
      return venda;
     
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of br.com.sistelecom.entity.Venda

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.