public bool Update(SISPedido_TO pSISPedidoTO, bool pOpcao) { bool lresultado = false; try { using (var transacao = TransactionScopeDefault.CreateTransactionScope()) { if (pSISPedidoTO.tag != null) { if (pSISPedidoTO.tag.Equals("tag_FecharPedido")) { new SISPedido_DAO().UpDate(pSISPedidoTO); } if (pSISPedidoTO.tag.Equals("AlterarProduto")) { //new SISProduto_DAO().UpDate(pSISPedidoTO); } if (pSISPedidoTO.tag.Equals("ExcluirProduto")) { //new SISProduto_DAO().Delete(pSISPedidoTO); } } transacao.Complete(); lresultado = true; } } catch (Exception) { throw; } return(lresultado); }
public bool Save(SISPedido_TO pPedidoTO, bool pOpcao) { bool lresultado = false; try { using (var transacao = TransactionScopeDefault.CreateTransactionScope()) { if (pPedidoTO.tag != null) { if (pPedidoTO.tag.Equals("PedidoNovo")) { new SISPedido_DAO().Save(pPedidoTO); } if (pPedidoTO.tag.Equals("PedidoAberto")) { pPedidoTO.query = string.Format("WHERE PED_STATUS = 'ATENDIMENTO'"); new SISPedido_DAO().GetPedidoAberto(pPedidoTO); } } transacao.Complete(); lresultado = true; } } catch (Exception) { throw; } return(lresultado); }
public bool Save(SISItemPedido_TO pItemPedidoTO, bool pOpcao) { bool lresultado = false; try { using (var transacao = TransactionScopeDefault.CreateTransactionScope()) { if (pItemPedidoTO.tag != null) { if (pItemPedidoTO.tag.Equals("ItemNovo")) { new SISItemPedido_DAO().Save(pItemPedidoTO); } } transacao.Complete(); lresultado = true; } } catch (Exception) { throw; } return(lresultado); }
public bool Delete(SISCategoria_TO pSISCategoriaTO, bool pOpcao) { bool lresultado = false; try { using (var transacao = TransactionScopeDefault.CreateTransactionScope()) { if (pSISCategoriaTO.tag != null) { if (pSISCategoriaTO.tag.Equals("tag_ExcluirCategoria")) { new SISCategoria_DAO().Delete(pSISCategoriaTO); } if (pSISCategoriaTO.tag.Equals("tag_ExcluirItem")) { new SISCategoria_DAO().Delete(pSISCategoriaTO); } } transacao.Complete(); lresultado = true; } } catch (Exception) { throw; } return(lresultado); }
public bool Save(SISCategoria_TO pCategoriaTO, bool pOpcao) { bool lresultado = false; try { using (var transacao = TransactionScopeDefault.CreateTransactionScope()) { if (pCategoriaTO.tag != null) { if (pCategoriaTO.tag.Equals("SalvarCategoria")) { new SISCategoria_DAO().Save(pCategoriaTO); } if (pCategoriaTO.tag.Equals("AtualizaCategoria")) { new SISCategoria_DAO().UpDate(pCategoriaTO); } } transacao.Complete(); lresultado = true; } } catch (Exception) { throw; } return(lresultado); }
public bool Save(SISEstoque_TO pEstoqueTO, bool pOpcao) { bool lresultado = false; try { //SISCliente_TO SISClienteTO = new SISCliente_TO(); //SISEndereco_TO SISEnderecoTO = new SISEndereco_TO(); using (var transacao = TransactionScopeDefault.CreateTransactionScope()) { if (pEstoqueTO.tag != null) { if (pEstoqueTO.tag.Equals("ProdNovoEstoque")) { new SISEstoque_DAO().Save(pEstoqueTO); } if (pEstoqueTO.tag.Equals("ProdAtualizarEstoque")) { new SISEstoque_DAO().UpDate(pEstoqueTO); } //if (pEstoqueTO.tag.Equals("ExcluirProduto")) //{ // new SISEstoque_DAO().Delete(pEstoqueTO); //} } transacao.Complete(); lresultado = true; } } catch (Exception) { throw; } return(lresultado); }