public static RemoverObjetoResponse <TipoTelefoneInfo> RemoverTipoTelefone(RemoverEntidadeRequest <TipoTelefoneInfo> pParametros) { try { LogarModificacao(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado); ConexaoDbHelper lAcessaDados = new ConexaoDbHelper(); lAcessaDados.ConnectionStringName = gNomeConexaoCadastro; using (DbCommand lDbCommand = lAcessaDados.CreateCommand(CommandType.StoredProcedure, "tipo_telefone_del_sp")) { lAcessaDados.AddInParameter(lDbCommand, "@id_tipo_telefone", DbType.Int32, pParametros.Objeto.IdTipoTelefone); lAcessaDados.ExecuteNonQuery(lDbCommand); } RemoverEntidadeResponse <TipoTelefoneInfo> response = new RemoverEntidadeResponse <TipoTelefoneInfo>() { lStatus = true }; LogCadastro.Logar(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado, LogCadastro.eAcao.Excluir); return(response); } catch (Exception ex) { LogCadastro.Logar(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado, LogCadastro.eAcao.Excluir, ex); throw ex; } }
private string ResponderExcluirJanela() { string lRetorno = string.Empty; RemoverEntidadeRequest <MonitoramentoRiscoLucroPrejuizoParametrosInfo> lRequest = new RemoverEntidadeRequest <MonitoramentoRiscoLucroPrejuizoParametrosInfo>(); lRequest.Objeto = new MonitoramentoRiscoLucroPrejuizoParametrosInfo(); if (GetIdJanela.HasValue) { lRequest.Objeto.IdJanela = this.GetIdJanela.Value; } RemoverObjetoResponse <MonitoramentoRiscoLucroPrejuizoParametrosInfo> lResponse = new PersistenciaDbIntranet().RemoverObjeto <MonitoramentoRiscoLucroPrejuizoParametrosInfo>(lRequest); lRetorno = base.RetornarSucessoAjax(lRequest, "Sucesso"); return(lRetorno); }
public static RemoverObjetoResponse <ClienteDocumentacaoEntregueInfo> RemoverClienteDocumentacaoEntregue(RemoverEntidadeRequest <ClienteDocumentacaoEntregueInfo> pParametro) { var lRetorno = new RemoverObjetoResponse <ClienteDocumentacaoEntregueInfo>(); var lAcessaDados = new AcessaDados() { ConnectionStringName = gNomeConexaoCadastro }; using (DbCommand lDbCommand = lAcessaDados.CreateCommand(CommandType.StoredProcedure, "cliente_documentacaoentregue_del")) { lAcessaDados.AddInParameter(lDbCommand, "@id_cliente_documentacaoentregue", DbType.Int32, pParametro.Objeto.IdDocumentacaoEntregue); lAcessaDados.ExecuteNonQuery(lDbCommand); } return(lRetorno); }
public static RemoverObjetoResponse <ClientePendenciaCadastralInfo> RemoverClientePendenciaCadastral(RemoverEntidadeRequest <ClientePendenciaCadastralInfo> pParametros) { try { LogarModificacao(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado); var lAcessaDados = new ConexaoDbHelper(); lAcessaDados.ConnectionStringName = gNomeConexaoCadastro; using (var lDbCommand = lAcessaDados.CreateCommand(CommandType.StoredProcedure, "cliente_pendenciacadastral_del_sp")) { lAcessaDados.AddInParameter(lDbCommand, "@id_pendencia_cadastral", DbType.Int32, pParametros.Objeto.IdPendenciaCadastral); lAcessaDados.ExecuteNonQuery(lDbCommand); } var response = new RemoverEntidadeResponse <ClientePendenciaCadastralInfo>() { lStatus = true }; LogCadastro.Logar(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado, LogCadastro.eAcao.Excluir); return(response); } catch (Exception ex) { LogCadastro.Logar(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado, LogCadastro.eAcao.Excluir, ex); throw ex; } }
public static RemoverObjetoResponse <MonitoramentoRiscoLucroPrejuizoParametrosInfo> RemoverMonitoramentoRiscoLucroPrejuizoJanelas(RemoverEntidadeRequest <MonitoramentoRiscoLucroPrejuizoParametrosInfo> pParametros) { var lRetorno = new RemoverObjetoResponse <MonitoramentoRiscoLucroPrejuizoParametrosInfo>(); var lAcessaDados = new AcessaDados(); lAcessaDados.ConnectionStringName = ClienteDbLib.gNomeConexaoRisco; using (DbCommand lDbCommand = lAcessaDados.CreateCommand(CommandType.StoredProcedure, "prc_monitores_risco_janela_del")) { lAcessaDados.AddInParameter(lDbCommand, "@id_janela", DbType.Int32, pParametros.Objeto.IdJanela); lAcessaDados.ExecuteNonQuery(lDbCommand); } return(lRetorno); }
public static RemoverObjetoResponse <ClienteProcuradorRepresentanteInfo> RemoverClienteProcuradorRepresentante(RemoverEntidadeRequest <ClienteProcuradorRepresentanteInfo> pParametros) { try { LogarModificacao(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado); ConexaoDbHelper lAcessaDados = new ConexaoDbHelper(); lAcessaDados.ConnectionStringName = gNomeConexaoCadastro; var lProcuradorRepresentante = ReceberClienteProcuradorRepresentante(new ReceberEntidadeRequest <ClienteProcuradorRepresentanteInfo>() { Objeto = pParametros.Objeto }); using (DbCommand lDbCommand = lAcessaDados.CreateCommand(CommandType.StoredProcedure, "cliente_procuradorrepresentante_del_sp")) { lAcessaDados.AddInParameter(lDbCommand, "@id_procuradorrepresentante", DbType.Int32, pParametros.Objeto.IdProcuradorRepresentante); lAcessaDados.ExecuteNonQuery(lDbCommand); } RemoverEntidadeResponse <ClienteProcuradorRepresentanteInfo> response = new RemoverEntidadeResponse <ClienteProcuradorRepresentanteInfo>() { lStatus = true }; LogCadastro.Logar(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado, LogCadastro.eAcao.Excluir); //AtualizarOperaPorContaPropria(new ClienteInfo() { IdCliente = lProcuradorRepresentante.Objeto.IdCliente }); return(response); } catch (Exception ex) { LogCadastro.Logar(pParametros.Objeto, pParametros.IdUsuarioLogado, pParametros.DescricaoUsuarioLogado, LogCadastro.eAcao.Excluir, ex); throw ex; } }
public static RemoverObjetoResponse <ClienteNaoOperaPorContaPropriaInfo> ExcluirClienteNaoOperaPorContaPropria(RemoverEntidadeRequest <ClienteNaoOperaPorContaPropriaInfo> pParametros, DbTransaction pDbTransaction) { var lRetorno = new RemoverObjetoResponse <ClienteNaoOperaPorContaPropriaInfo>(); var lAcessaDados = new ConexaoDbHelper(); lAcessaDados.ConnectionStringName = gNomeConexaoCadastro; using (DbCommand lDbCommand = lAcessaDados.CreateCommand(pDbTransaction, CommandType.StoredProcedure, "cliente_NaoOperaPorContaPropria_del_sp")) { lAcessaDados.AddInParameter(lDbCommand, "@id_cliente", DbType.Int32, pParametros.Objeto.IdCliente); lAcessaDados.ExecuteNonQuery(lDbCommand, pDbTransaction); } return(lRetorno); }
public static RemoverObjetoResponse <ClienteNaoOperaPorContaPropriaInfo> ExcluirClienteNaoOperaPorContaPropria(RemoverEntidadeRequest <ClienteNaoOperaPorContaPropriaInfo> pParametros) { var lRetorno = new RemoverObjetoResponse <ClienteNaoOperaPorContaPropriaInfo>(); return(lRetorno); }
public RemoverObjetoResponse <ParametroAlavancagemConsultaInfo> ExcluirClienteParametro(RemoverEntidadeRequest <ParametroAlavancagemConsultaInfo> pParametro) { var lRetorno = new RemoverObjetoResponse <ParametroAlavancagemConsultaInfo>(); var lAcessaDados = new AcessaDados(); lAcessaDados.ConnectionStringName = ClienteDbLib.gNomeConexaoRiscoNovoOMS; using (DbCommand lDbCommand = lAcessaDados.CreateCommand(CommandType.StoredProcedure, "prc_parametro_alavancagem_del")) { lAcessaDados.AddInParameter(lDbCommand, "@id_cliente", DbType.Int32, pParametro.Objeto.ConsultaCdCliente); lAcessaDados.ExecuteNonQuery(lDbCommand); } return(lRetorno); }