Beispiel #1
0
 private void ValidarDados(FINANCEIRO_DTO DTO)
 {
     try
     {
         if (string.IsNullOrEmpty(DTO.INDICACAO))
         {
             throw new CustomException("Favor informe a Indicação", "Dados incorretos");
         }
         if (DTO.PARCELAS <= 0)
         {
             throw new CustomException("Favor insira a quantidade de parcelas", "Dados incorretos");
         }
         if (string.IsNullOrEmpty(DTO.CONSULTOR))
         {
             throw new CustomException("Favor informe o consultor", "Dados incorretos");
         }
         if (DTO.ID_CLIENTE == 0)
         {
             throw new CustomException("Favor informe o cliente", "Dados incorretos");
         }
         if (DTO.ID_SERVICO == 0)
         {
             throw new CustomException("Favor informe o serviço", "Dados incorretos");
         }
         if (DTO.DIA_VENCIMENTO <= 0)
         {
             throw new CustomException("Favor informe o dia de vencimento", "Dados incorretos");
         }
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
Beispiel #2
0
 public frmCad_Juridico(int ID, mdi_principal mdi_Principal)
 {
     InitializeComponent();
     this.mdi_Principal  = mdi_Principal;
     this.financeiro_dto = new FINANCEIRO_BLL().Seleciona_Financeiro_By_Id_For_Juridico(ID);
     PopularDadosCliente();
     PopularDadosFinanceiro();
 }
Beispiel #3
0
 public bool Update_Financeiro(FINANCEIRO_DTO DTO)
 {
     try
     {
         ValidarDados(DTO);
         SysDAL.Grava_Historico(DTO, strConnection, SysBLL.UserLogin.NOME);
         return(DAO.Update_Financeiro(DTO));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void ValidarDados(FINANCEIRO_DTO DTO)
 {
     try
     {
         if (string.IsNullOrEmpty(DTO.CONSULTOR))
         {
             throw new CustomException("Favor informe o consultor", "Dados incorretos");
         }
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
        public frmCad_Financeiro(int ID = 0, int ID_CLIENTE = 0)
        {
            try
            {
                InitializeComponent();
                lista_forma_pagamento = new FORMA_PAGAMENTO_BLL().Lista_Forma_Pagamento();
                PopularCombos();

                if (ID_CLIENTE > 0)
                {
                    CLIENTE_DTO     = new CLIENTE_BLL().Selecione(ID_CLIENTE);
                    txtCliente.Text = CLIENTE_DTO.NOME_COMPLETO;
                    mskData.Text    = DateTime.Now.ToShortDateString();
                }
                else if (ID_CLIENTE == -1)
                {
                    SetWithNewCliente            = true;
                    txtCliente.Visible           = false;
                    btnPesquisarAdvogado.Visible = false;
                    lblCliente.Visible           = false;
                    CLIENTE_DTO = new CLIENTE_DTO();
                }

                if (ID == 0)
                {
                    FINANCEIRO_DTO = new FINANCEIRO_DTO();
                    mskData.Text   = DateTime.Now.ToShortDateString();
                }

                else
                {
                    FINANCEIRO_DTO      = FINANCEIRO_BLL.Seleciona(ID);
                    lista_boleto_cheque = new BOLETO_CHEQUE_BLL().Seleciona_by_Id_Financeiro(ID);

                    foreach (BOLETO_CHEQUE_DTO boleto_cheque in lista_boleto_cheque)
                    {
                        boleto_cheque.OPERACAO = SysDTO.Operacoes.Leitura;
                    }
                    PopularGrid();
                    PopularDados();
                    txtValor.ReadOnly       = true;
                    FINANCEIRO_DTO.OPERACAO = SysDTO.Operacoes.Alteracao;
                    cboServico.Enabled      = false;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #6
0
 private void BtnFinanceiro_Click(object sender, EventArgs e)
 {
     try
     {
         if (financeiro_dto.ID == null || financeiro_dto.ID == 0)
         {
             MessageBox.Show("Financeiro não encontrado", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         frmCad_Financeiro frmCad_Financeiro = new frmCad_Financeiro((int)financeiro_dto.ID);
         frmCad_Financeiro.ShowDialog();
         financeiro_dto         = frmCad_Financeiro.FINANCEIRO_DTO;
         financeiro_dto.CLIENTE = new CLIENTE_BLL().Selecione(financeiro_dto.ID_CLIENTE);
         PopularDadosCliente();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }