Example #1
0
    public static String AlteraContaSaldoInicial(string xID,
                                                 string xcod_conta,
                                                 string xdata,
                                                 string xdescricao,
                                                 string xcomplemento,
                                                 string xsaldo_i,
                                                 string xsaldo_aplicacaoD,
                                                 string xsaldo_aplicacaoB,
                                                 string xdtregistro)
    {
        string script = "UPDATE CONTAS_SALDO_INICIAL SET " +
                        " cod_conta = " + Srelib.QStr(xcod_conta) +
                        " ,data = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdata)) +
                        " ,descricao = " + Srelib.QStr(xdescricao) +
                        " ,complemento = " + Srelib.QStr(xcomplemento) +
                        " ,saldo_i = " + Srelib.forcaponto(xsaldo_i) +
                        " ,saldo_aplicacaoD = " + Srelib.forcaponto(xsaldo_aplicacaoD) +
                        " ,saldo_aplicacaoB = " + Srelib.forcaponto(xsaldo_aplicacaoB) +
                        " ,dtregistro = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtregistro)) +
                        " where ID =" + xID;

        //revisar quando mexer na cobrança bancária

        SreDblib.ExecScript(script);

        return(" ");
    }
Example #2
0
    public static String GravaTaxa(string xmes, string xano, string xnome, string xvalor)
    {
        if (xvalor.Trim() == "")
        {
            xvalor = "0";
        }

        if (xmes != string.Empty)
        {
            string script = "UPDATE TAXAS_MENSAIS " +
                            " SET " + xnome + " = " + Srelib.forcaponto(xvalor) +
                            " WHERE MES = " +
                            Srelib.QStr(xmes) +
                            " AND ANO = " +
                            Srelib.QStr(xano);

            //Srelib.QStr(Srelib.QStr0(xmes, 2)) +
            // " AND ANO = " +
            //Srelib.QStr(Srelib.QStr0(xano, 4));
            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #3
0
    public static String AlteraConta(string xID,
                                     string xcod_banco,
                                     string xcod_agencia,
                                     string xcod_conta,
                                     string xnome_agencia,
                                     string xcidade,
                                     string xuf,
                                     string xcep,
                                     string xlimite_cheque,
                                     string xconta_contabil,
                                     string xcomplemento,
                                     string xcombo)
    {
        string script = "UPDATE CONTAS SET " +
                        " cod_banco = " + Srelib.QStr(xcod_banco) +
                        " ,cod_agencia = " + Srelib.QStr(xcod_agencia) +
                        " ,cod_conta = " + Srelib.QStr(xcod_conta) +
                        " ,nome_agencia = " + Srelib.QStr(xnome_agencia) +
                        " ,cidade = " + Srelib.QStr(xcidade) +
                        " ,uf = " + Srelib.QStr(xuf) +
                        " ,cep = " + Srelib.QStr(xcep) +
                        " ,limite_cheque = " + Srelib.forcaponto(xlimite_cheque) +
                        " ,conta_contabil = " + Srelib.QStr(xconta_contabil) +
                        " ,complemento = " + Srelib.QStr(xcomplemento) +
                        " ,combo = " + Srelib.QStr(xcombo) +
                        " where ID =" + xID;

        //revisar quando mexer na cobrança bancária

        SreDblib.ExecScript(script);

        return(" ");
    }
Example #4
0
    public static String GravaSaldoInicial(string xcod_conta,
                                           string xdata,
                                           string xdescricao,
                                           string xcomplemento,
                                           string xsaldo_i,
                                           string xsaldo_aplicacaoD,
                                           string xsaldo_aplicacaoB,
                                           string xdtregistro)
    {
        if (xsaldo_i.Trim() == "")
        {
            xsaldo_i = "0.00";
        }

        if (xcod_conta != String.Empty)
        {
            string script = "INSERT INTO CONTAS_SALDO_INICIAL VALUES ( " +
                            Srelib.QStr(xcod_conta) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdata)) +
                            ", " + Srelib.QStr(xdescricao) +
                            ", " + Srelib.QStr(xcomplemento) +
                            ", " + Srelib.forcaponto(xsaldo_i) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtregistro)) +
                            ", " + Srelib.forcaponto(xsaldo_aplicacaoD) +
                            ", " + Srelib.forcaponto(xsaldo_aplicacaoB) +
                            " ) ";

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #5
0
    public static String Grava(string xcodigo,
                               string xcod_banco,
                               string xcod_agencia,
                               string xcod_conta,
                               string xnome_agencia,
                               string xcidade,
                               string xuf,
                               string xcep,
                               string xlimite_cheque,
                               string xconta_contabil,
                               string xcomplemento,
                               string xcombo)
    {
        if (xcod_banco != String.Empty)
        {
            string script = "INSERT INTO CONTAS VALUES ( " +
                            Srelib.QStr(xcodigo) +
                            ", " + Srelib.QStr(xcod_banco) +
                            ", " + Srelib.QStr(xcod_agencia) +
                            ", " + Srelib.QStr(xcod_conta) +
                            ", " + Srelib.QStr(xnome_agencia) +
                            ", " + Srelib.QStr(xcidade) +
                            ", " + Srelib.QStr(xuf) +
                            ", " + Srelib.QStr(xcep) +
                            ", " + Srelib.forcaponto(xlimite_cheque) +
                            ", " + Srelib.QStr(xconta_contabil) +
                            ", " + Srelib.QStr(xcomplemento) +
                            ", " + xcombo +
                            " ) ";

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #6
0
 public static String Grava(ref string xlancamento,
                            string xproduto,
                            string xclasse,
                            string xfornecedor,
                            string xdescricao,
                            string xdtprevista,
                            decimal xvlr_previsto,
                            string xdtrealizado,
                            decimal xvlr_realizado,
                            string xconta,
                            string xdocumento,
                            string xdtdocumento,
                            string xcheque,
                            string xcmc7,
                            string xdtcompensacao,
                            int xcontabil,
                            string xintegracao_contabil,
                            string xpedido_compra,
                            string xgrupo,
                            int xnominal)
 {
     //
     if (xlancamento != String.Empty)
     {
         //Check de Lançamento
         if (uContasPagar.LancamentoExiste(xlancamento))
         {
             xlancamento = uContasPagar.PegaNovoCodigoCPagar();
         }
         //
         string script = "INSERT INTO CONTAS_PAGAR VALUES ( " +
                         Srelib.QStr(xlancamento) +
                         ", " + Srelib.QStr(xproduto) +
                         ", " + Srelib.QStr(xclasse) +
                         ", " + Srelib.QStr(xfornecedor) +
                         ", " + Srelib.QStr(xdescricao) +
                         ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtprevista)) +
                         ", " + Srelib.forcaponto(Convert.ToString(xvlr_previsto)) +
                         ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtrealizado)) +
                         ", " + Srelib.forcaponto(Convert.ToString(xvlr_realizado)) +
                         ", " + Srelib.QStr(xconta) +
                         ", " + Srelib.QStr(xdocumento) +
                         ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtdocumento)) +
                         ", " + Srelib.QStr(xcheque) +
                         ", " + Srelib.QStr(xcmc7) +
                         ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtcompensacao)) +
                         ", " + Convert.ToString(xcontabil) +
                         ", " + Srelib.QStr(xintegracao_contabil) +
                         ", " + Srelib.QStr(xpedido_compra) +
                         ", " + Srelib.QStr(xgrupo) +
                         ", " + Convert.ToString(xnominal) +
                         " ) ";
         //
         SreDblib.ExecScript(script);
     }
     return(" ");
 }
Example #7
0
    public static String Grava(string xlancamento,
                               string xproduto,
                               string xclasse,
                               string xcliente,
                               string xdescricao,
                               string xdtprevista,
                               decimal xvlr_previsto,
                               string xdtrealizado,
                               decimal xvlr_realizado,
                               string xconta,
                               string xdocumento,
                               string xdtdocumento,
                               string xcheque,
                               string xcmc7,
                               string xdtcompensacao,
                               int xcontabil,
                               string xintegracao_contabil)
    {
        if (xlancamento != String.Empty)
        {
            //Check de Lançamento
            if (uContasReceber.LancamentoExiste(xlancamento))
            {
                xlancamento = uContasReceber.PegaNovoCodigoCReceber();
            }
            //
            string script = "INSERT INTO CONTAS_RECEBER VALUES ( " +
                            Srelib.QStr(xlancamento) +
                            ", " + Srelib.QStr(xproduto) +
                            ", " + Srelib.QStr(xclasse) +
                            ", " + Srelib.QStr(xcliente) +
                            ", " + Srelib.QStr(xdescricao) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtprevista)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xvlr_previsto)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtrealizado)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xvlr_realizado)) +
                            ", " + Srelib.QStr(xconta) +
                            ", " + Srelib.QStr(xdocumento) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtdocumento)) +
                            ", " + Srelib.QStr(xcheque) +
                            ", " + Srelib.QStr(xcmc7) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtcompensacao)) +
                            ", " + Convert.ToString(xcontabil) +
                            ", " + Srelib.QStr(xintegracao_contabil) +
                            " ) ";

            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #8
0
    public static String Altera(string xlancamento,
                                string xproduto,
                                string xclasse,
                                string xfornecedor,
                                string xdescricao,
                                string xdtprevista,
                                decimal xvlr_previsto,
                                string xdtrealizado,
                                decimal xvlr_realizado,
                                string xconta,
                                string xdocumento,
                                string xdtdocumento,
                                string xcheque,
                                string xcmc7,
                                string xdtcompensacao,
                                int xcontabil,
                                string xintegracao_contabil,
                                string xpedido_compra,
                                string xgrupo,
                                int xnominal)
    {
        if (xlancamento != String.Empty)
        {
            string script = "UPDATE CONTAS_PAGAR SET " +
                            //" lancamento = " + Srelib.QStr(xlancamento) +
                            " produto = " + Srelib.QStr(xproduto) +
                            ", classe = " + Srelib.QStr(xclasse) +
                            ", fornecedor = " + Srelib.QStr(xfornecedor) +
                            ", descricao = " + Srelib.QStr(xdescricao) +
                            ", data_prevista = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtprevista)) +
                            ", vlr_previsto = " + Srelib.forcaponto(Convert.ToString(xvlr_previsto)) +
                            ", data_realizado = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtrealizado)) +
                            ", vlr_realizado = " + Srelib.forcaponto(Convert.ToString(xvlr_realizado)) +
                            ", conta = " + Srelib.QStr(xconta) +
                            ", documento = " + Srelib.QStr(xdocumento) +
                            ", data_documento = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtdocumento)) +
                            ", cheque = " + Srelib.QStr(xcheque) +
                            ", cmc7 = " + Srelib.QStr(xcmc7) +
                            ", dtcompensacao = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtcompensacao)) +
                            ", contabil = " + Convert.ToString(xcontabil) +
                            ", integracao_contabil = " + Srelib.QStr(xintegracao_contabil) +
                            ", pedido_compra = " + Srelib.QStr(xpedido_compra) +
                            ", grupo = " + Srelib.QStr(xgrupo) +
                            ", nominal = " + Convert.ToString(xnominal) +
                            "  where lancamento = " + Srelib.QStr(xlancamento);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #9
0
    public static String GravaTaxa(DateTime xdata, string xnome, string xvalor)
    {
        if (xdata != Convert.ToDateTime("01/01/1900"))
        {
            string script = "UPDATE TAXAS_DIARIAS " +
                            "SET " + xnome + " = " + Srelib.forcaponto(xvalor) +
                            "WHERE DATA = " +
                            Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xdata)));

            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #10
0
    public static String Altera(string xID,
                                string xcodigo,
                                string xapelido,
                                string xnome,
                                string xcomissao_base)
    {
        string script = "UPDATE corretores SET " +
                        " codigo = " + xcodigo +
                        " ,apelido = " + Srelib.QStr(xapelido) +
                        " ,nome = " + Srelib.QStr(xnome) +
                        " ,comissao_base = " + Srelib.forcaponto(xcomissao_base) +
                        " where ID =" + xID;

        SreDblib.ExecScript(script);

        return(" ");
    }
Example #11
0
    public static String GravaLancamento(string xcodigo_conta,
                                         string xlancamento,
                                         string xproduto,
                                         string xclasse,
                                         string xpedido_compra,
                                         string xdata,
                                         string xdescricao,
                                         string xcomplemento,
                                         string xsaldo_i,
                                         string xcredito,
                                         string xdebito,
                                         string xsaldo_f,
                                         string xsaldo_aplicacaoD,
                                         string xsaldo_aplicacaoB,
                                         string xsaldo_total,
                                         string xcheque,
                                         string xcmc7,
                                         string xdtregistro)
    {
        if (xcodigo_conta != String.Empty)
        {
            string script = "INSERT INTO conta_" + Srelib.QStr0(xcodigo_conta.Trim(), 5) + " VALUES ( " +
                            Srelib.QStr(xcodigo_conta) +
                            ", " + Srelib.QStr(xlancamento) +
                            ", " + Srelib.QStr(xproduto) +
                            ", " + Srelib.QStr(xclasse) +
                            ", " + Srelib.QStr(xpedido_compra) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdata)) +
                            ", " + Srelib.QStr(xdescricao) +
                            ", " + Srelib.QStr(xcomplemento) +
                            ", " + Srelib.forcaponto(xsaldo_i) +
                            ", " + Srelib.forcaponto(xcredito) +
                            ", " + Srelib.forcaponto(xdebito) +
                            ", " + Srelib.forcaponto(xsaldo_f) +
                            ", " + Srelib.forcaponto(xsaldo_aplicacaoD) +
                            ", " + Srelib.forcaponto(xsaldo_aplicacaoB) +
                            ", " + Srelib.forcaponto(xsaldo_total) +
                            ", " + Srelib.QStr(xcheque) +
                            ", " + Srelib.QStr(xcmc7) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtregistro)) +
                            " ) ";

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #12
0
    public static String AlteraGrupo(string xID,
                                     string xproduto,
                                     string xgrupo,
                                     string xgrupo_tipo,
                                     string xdescricao,
                                     string xquantidade,
                                     string xnum_inicial,
                                     string xnum_final,
                                     Boolean xativo,
                                     DateTime xdtbase_vlr_venda,
                                     string xvlr_venda,
                                     string xobserva_1,
                                     string xobserva_2)
    {
        if (xdescricao != String.Empty)
        {
            if (xvlr_venda == String.Empty)
            {
                xvlr_venda = "0";
            }

            string script = "UPDATE PRODUTO_GRUPO SET " +
                            " produto = " + Srelib.QStr(xproduto) +
                            " ,grupo = " + Srelib.QStr(xgrupo) +
                            " ,grupo_tipo = " + Srelib.QStr(xgrupo_tipo) +
                            " ,descricao = " + Srelib.QStr(xdescricao) +
                            " ,quantidade = " + xquantidade +
                            " ,num_inicio = " + xnum_inicial +
                            " ,num_final = " + xnum_final +
                            " ,ativo = " + Convert.ToString(Convert.ToInt16(xativo)) +
                            " ,dtbase_vlr_venda = " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xdtbase_vlr_venda))) +
                            " ,vlr_venda = " + Srelib.forcaponto(xvlr_venda) +
                            " ,observa_1 = " + Srelib.QStr(xobserva_1) +
                            " ,observa_2 = " + Srelib.QStr(xobserva_2) +
                            " where ID =" + xID;


            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #13
0
    public static String AlteraUnidadeVenda(string xproduto,
                                            string xgrupo,
                                            string xunidade,
                                            string xparte,
                                            decimal xvlr_total,
                                            decimal xvlr_1,
                                            string xproprietario_1,
                                            decimal xvlr_2,
                                            string xproprietario_2)
    {
        string script = "";

        if (xparte == "0" || xparte == "1")
        {
            script = "UPDATE PRODUTO_UNIDADES SET " +
                     " vlr_total = " + Srelib.forcaponto(Convert.ToString(xvlr_total)) +
                     " ,vlr_1 = " + Srelib.forcaponto(Convert.ToString(xvlr_1)) +
                     " ,proprietario_1 = " + xproprietario_1 +
                     " where " +
                     " produto = " + Srelib.QStr(xproduto) +
                     " and grupo = " + Srelib.QStr(xgrupo) +
                     " and unidade = " + Srelib.QStr(xunidade) +
                     " and parte = " + Srelib.QStr(xparte);

            SreDblib.ExecScript(script);
        }
        if (xparte == "2")
        {
            script = "UPDATE PRODUTO_UNIDADES SET " +
                     " vlr_2 = " + Srelib.forcaponto(Convert.ToString(xvlr_2)) +
                     " ,proprietario_2 = " + xproprietario_2 +
                     " where " +
                     " produto = " + Srelib.QStr(xproduto) +
                     " and grupo = " + Srelib.QStr(xgrupo) +
                     " and unidade = " + Srelib.QStr(xunidade) +
                     " and parte = " + Srelib.QStr("1");

            SreDblib.ExecScript(script);
        }

        return(" ");
    }
Example #14
0
    public static String Grava(string xcodigo,
                               string xapelido,
                               string xnome,
                               string xcomissao_base)
    {
        if ((xapelido != String.Empty) && (xnome != String.Empty))
        {
            string script = "INSERT INTO corretores VALUES ( " +
                            xcodigo +
                            ", " + Srelib.QStr(xapelido) +
                            ", " + Srelib.QStr(xnome) +
                            ", " + Srelib.forcaponto(xcomissao_base) +
                            " ) ";

            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #15
0
    public static String GravaGrupo(string xproduto,
                                    string xgrupo,
                                    string xgrupo_tipo,
                                    string xdescricao,
                                    string xquantidade,
                                    string xnum_inicial,
                                    string xnum_final,
                                    Boolean xativo,
                                    DateTime xdtbase_vlr_venda,
                                    string xvlr_venda,
                                    string xobserva_1,
                                    string xobserva_2)
    {
        if (xdescricao != String.Empty)
        {
            if (xvlr_venda == String.Empty)
            {
                xvlr_venda = "0";
            }

            string script = "INSERT INTO PRODUTO_GRUPO VALUES ( " +
                            Srelib.QStr(xproduto) +
                            ", " + Srelib.QStr(xgrupo) +
                            ", " + Srelib.QStr(xgrupo_tipo) +
                            ", " + Srelib.QStr(xdescricao) +
                            ", " + xquantidade +
                            ", " + xnum_inicial +
                            ", " + xnum_final +
                            ", " + Convert.ToString(Convert.ToInt16(xativo)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xdtbase_vlr_venda))) +
                            ", " + Srelib.forcaponto(xvlr_venda) +
                            ", " + Srelib.QStr(xobserva_1) +
                            ", " + Srelib.QStr(xobserva_2) +
                            " ) ";

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #16
0
    private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
    {
        //
        string valor = Convert.ToString(GetCurrentColumnValue("vlr_previsto"));

        //
        if (valor.Trim() == "0,00")
        {
            if (rbvalores == "P")
            {
                e.Cancel = true;
            }
        }
        lvalor.Text = Srelib.forcaponto(valor);
        //
        DateTime emissao = Convert.ToDateTime(GetCurrentColumnValue("data_prevista"));
        //
        ValorExtenso xExt = new ValorExtenso();
        String       xAux;

        xAux = xExt.ValExtenso(Convert.ToDouble(valor));
        lvalorextenso1.Text = xAux;
        lvalorextenso2.Text = " ";
        //
        Int32 fornecedor = Convert.ToInt32(GetCurrentColumnValue("fornecedor"));

        lnominal.Text = uFornecedores.PegaNomeFornecedor(fornecedor);
        //
        lemissaoextenso.Text = uEmpresa.PegaCidade(uEmpresa.PegaMatriz()) + ", " + Srelib.DataExtenso(DateTime.Now);
        //
        //Compensação
        if (rbcompensacao == "1")
        {
            //Compensação na Data da emissão do Cheque
            string lancamento = Convert.ToString(GetCurrentColumnValue("lancamento"));
            //
            uContasReceber.GravaCompensacao(lancamento, DateTime.Now.ToString().Substring(0, 10), "0");
        }
    }
    protected void GridListagem_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxGridView gridView = (ASPxGridView)sender;

        //
        string ID             = "";
        string cod_banco      = "";
        string cod_agencia    = "";
        string cod_conta      = "";
        string nome_agencia   = "";
        string cidade         = "";
        string uf             = "";
        string cep            = "";
        string limite_cheque  = "0";
        string conta_contabil = "";
        string complemento    = "";
        string combo          = "1";

        //
        //
        if (e.NewValues["ID"] != null)
        {
            ID = e.NewValues["ID"].ToString();
        }
        else
        {
            ID = uContas.PegaNovoID();
        }
        if (e.NewValues["cod_banco"] != null)
        {
            cod_banco = e.NewValues["cod_banco"].ToString();
        }
        if (e.NewValues["cod_agencia"] != null)
        {
            cod_agencia = e.NewValues["cod_agencia"].ToString();
        }
        if (e.NewValues["cod_conta"] != null)
        {
            cod_conta = e.NewValues["cod_conta"].ToString();
        }
        if (e.NewValues["nome_agencia"] != null)
        {
            nome_agencia = e.NewValues["nome_agencia"].ToString();
        }
        if (e.NewValues["cidade"] != null)
        {
            cidade = e.NewValues["cidade"].ToString();
        }
        if (e.NewValues["uf"] != null)
        {
            uf = e.NewValues["uf"].ToString();
        }
        if (e.NewValues["cep"] != null)
        {
            cep = e.NewValues["cep"].ToString();
        }
        if (e.NewValues["limite_cheque"] != null)
        {
            limite_cheque = e.NewValues["limite_cheque"].ToString();
        }
        if (e.NewValues["conta_contabil"] != null)
        {
            conta_contabil = e.NewValues["conta_contabil"].ToString();
        }
        if (e.NewValues["complemento"] != null)
        {
            complemento = e.NewValues["complemento"].ToString();
        }
        if (e.NewValues["combo"] != null)
        {
            combo = e.NewValues["combo"].ToString();
        }
        //Criar o registro da Conta
        uContas.Grava(ID,
                      cod_banco,
                      cod_agencia,
                      cod_conta,
                      nome_agencia,
                      cidade,
                      uf,
                      cep,
                      limite_cheque,
                      conta_contabil,
                      complemento,
                      combo);

        //Criar arquivo para lançamentos
        uContas.CriarTabelaContasCorrentes(ID);
        //
        //Gravar Saldo Inicial da Conta
        uContas.GravaSaldoInicial(ID,
                                  "01/01/1900",
                                  "SALDO INICIAL",
                                  " ",
                                  Srelib.forcaponto("0.00"),
                                  Srelib.forcaponto("0.00"),
                                  Srelib.forcaponto("0.00"),
                                  DateTime.Now.ToString().Substring(0, 10)
                                  );


        gridView.CancelEdit();
        e.Cancel = true;

        //Usando Classe uLog.MakeLog - Gravando Log
        fwObs_Log = "INCLUI CONTAS: " + ID + "/" + cod_banco;
        SqlParameter[] param_log = { new SqlParameter("@login",    (String)Session["CodUsuario"]),
                                     new SqlParameter("@tabela",   fWtabela),
                                     new SqlParameter("@operacao", "CONTAS"),
                                     new SqlParameter("@obs",      "INCLUI"),
                                     new SqlParameter("@acao",     fwObs_Log) };
        uLog.MakeLog(param_log);

        //
        AtualizaGrid();
    }
Example #18
0
    public static String Altera(string xID,
                                string xproduto,
                                string xgrupo,
                                string xunidade,
                                string xparte,
                                decimal xmetragem_total,
                                decimal xvlr_total,
                                decimal xvlr_1,
                                decimal xmetragem_1,
                                string xinscricao_1,
                                string xproprietario_1,
                                Int16 xquitado_1,
                                Int16 xescritura_1,
                                string xdtescritura_1,
                                string xcartorio_1,
                                string xlivro_1,
                                string xfolha_1,
                                Int16 xprocesso_1,
                                string xobs_1,
                                decimal xvlr_2,
                                decimal xmetragem_2,
                                string xinscricao_2,
                                string xproprietario_2,
                                Int16 xquitado_2,
                                Int16 xescritura_2,
                                string xdtescritura_2,
                                string xcartorio_2,
                                string xlivro_2,
                                string xfolha_2,
                                Int16 xprocesso_2,
                                string xobs_2,
                                decimal xarea_privativa_coletiva_m2,
                                decimal xarea_privativa_terraco_coberto_m2,
                                decimal xarea_privativa_terraco_descoberto_m2,
                                decimal xarea_comum_m2,
                                decimal xarea_garagem_m2,
                                decimal xarea_hobby_box_m2,
                                decimal xarea_total_m2,
                                decimal xfracao_ideal_m2,
                                decimal xfracao_ideal_percentual,
                                string xhobby_box_numero,
                                string xhobby_box_localizacao,
                                string xnumero_garagem_01,
                                string xnumero_garagem_02,
                                string xnumero_garagem_03,
                                string xnumero_garagem_04,
                                string xnumero_garagem_05,
                                string xvagas_localizacao,
                                Int16 xvagas_quantidade)
    {
        if (xID != String.Empty)
        {
            string script = "UPDATE PRODUTO_UNIDADES SET " +
                            //" produto = " + Srelib.QStr(xproduto) +
                            //" grupo = " + Srelib.QStr(xgrupo) +
                            //" unidade = " + Srelib.QStr(xunidade) +
                            " parte = " + Srelib.QStr(xparte) +
                            " ,metragem_total = " + Srelib.forcaponto(Convert.ToString(xmetragem_total)) +
                            " ,vlr_total = " + Srelib.forcaponto(Convert.ToString(xvlr_total)) +
                            " ,vlr_1 = " + Srelib.forcaponto(Convert.ToString(xvlr_1)) +
                            " ,metragem_1 = " + Srelib.forcaponto(Convert.ToString(xmetragem_1)) +
                            " ,inscricao_1 = " + Srelib.QStr(xinscricao_1) +
                            " ,proprietario_1 = " + Srelib.QStr(xproprietario_1) +
                            //" quitado_1 = " + (xquitado_1) +
                            " ,escritura_1 = " + (xescritura_1) +
                            " ,dtescritura_1 = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtescritura_1)) +
                            " ,cartorio_1 = " + Srelib.QStr(xcartorio_1) +
                            " ,livro_1 = " + Srelib.QStr(xlivro_1) +
                            " ,folha_1 = " + Srelib.QStr(xfolha_1) +
                            " ,processo_1 = " + (xprocesso_1) +
                            " ,obs_1 = " + Srelib.QStr(xobs_1) +
                            " ,vlr_2 = " + Srelib.forcaponto(Convert.ToString(xvlr_2)) +
                            " ,metragem_2 = " + Srelib.forcaponto(Convert.ToString(xmetragem_2)) +
                            " ,inscricao_2 = " + Srelib.QStr(xinscricao_2) +
                            " ,proprietario_2 = " + Srelib.QStr(xproprietario_2) +
                            //" quitado_2 = " + (xquitado_2) +
                            " ,escritura_2 = " + (xescritura_2) +
                            " ,dtescritura_2 = " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtescritura_2)) +
                            " ,cartorio_2 = " + Srelib.QStr(xcartorio_2) +
                            " ,livro_2 = " + Srelib.QStr(xlivro_2) +
                            " ,folha_2 = " + Srelib.QStr(xfolha_2) +
                            " ,processo_2 = " + (xprocesso_2) +
                            " ,obs_2 = " + Srelib.QStr(xobs_2) +
                            " ,area_privativa_coletiva_m2 = " + Srelib.forcaponto(Convert.ToString(xarea_privativa_coletiva_m2)) +
                            " ,area_privativa_terraco_coberto_m2 = " + Srelib.forcaponto(Convert.ToString(xarea_privativa_terraco_coberto_m2)) +
                            " ,area_privativa_terraco_descoberto_m2 = " + Srelib.forcaponto(Convert.ToString(xarea_privativa_terraco_descoberto_m2)) +
                            " ,area_comum_m2 = " + Srelib.forcaponto(Convert.ToString(xarea_comum_m2)) +
                            " ,area_garagem_m2 = " + Srelib.forcaponto(Convert.ToString(xarea_garagem_m2)) +
                            " ,area_hobby_box_m2 = " + Srelib.forcaponto(Convert.ToString(xarea_hobby_box_m2)) +
                            " ,area_total_m2 = " + Srelib.forcaponto(Convert.ToString(xarea_total_m2)) +
                            " ,fracao_ideal_m2 = " + Srelib.forcaponto(Convert.ToString(xfracao_ideal_m2)) +
                            " ,fracao_ideal_percentual = " + Srelib.forcaponto(Convert.ToString(xfracao_ideal_percentual)) +
                            " ,hobby_box_numero = " + Srelib.QStr(xhobby_box_numero) +
                            " ,hobby_box_localizacao = " + Srelib.QStr(xhobby_box_localizacao) +
                            " ,numero_garagem_01 = " + Srelib.QStr(xnumero_garagem_01) +
                            " ,numero_garagem_02 = " + Srelib.QStr(xnumero_garagem_02) +
                            " ,numero_garagem_03 = " + Srelib.QStr(xnumero_garagem_03) +
                            " ,numero_garagem_04 = " + Srelib.QStr(xnumero_garagem_04) +
                            " ,numero_garagem_05 = " + Srelib.QStr(xnumero_garagem_05) +
                            " ,vagas_localizacao = " + Srelib.QStr(xvagas_localizacao) +
                            " ,vagas_quantidade = " + xvagas_quantidade +
                            " where ID =" + xID;

            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #19
0
    public static String Grava(string xproduto,
                               string xgrupo,
                               string xunidade,
                               string xparte,
                               decimal xmetragem_total,
                               decimal xvlr_total,
                               decimal xvlr_1,
                               decimal xmetragem_1,
                               string xinscricao_1,
                               string xproprietario_1,
                               Int16 xquitado_1,
                               Int16 xescritura_1,
                               string xdtescritura_1,
                               string xcartorio_1,
                               string xlivro_1,
                               string xfolha_1,
                               Int16 xprocesso_1,
                               string xobs_1,
                               decimal xvlr_2,
                               decimal xmetragem_2,
                               string xinscricao_2,
                               string xproprietario_2,
                               Int16 xquitado_2,
                               Int16 xescritura_2,
                               string xdtescritura_2,
                               string xcartorio_2,
                               string xlivro_2,
                               string xfolha_2,
                               Int16 xprocesso_2,
                               string xobs_2,
                               decimal xarea_privativa_coletiva_m2,
                               decimal xarea_privativa_terraco_coberto_m2,
                               decimal xarea_privativa_terraco_descoberto_m2,
                               decimal xarea_comum_m2,
                               decimal xarea_garagem_m2,
                               decimal xarea_hobby_box_m2,
                               decimal xarea_total_m2,
                               decimal xfracao_ideal_m2,
                               decimal xfracao_ideal_percentual,
                               string xhobby_box_numero,
                               string xhobby_box_localizacao,
                               string xnumero_garagem_01,
                               string xnumero_garagem_02,
                               string xnumero_garagem_03,
                               string xnumero_garagem_04,
                               string xnumero_garagem_05,
                               string xvagas_localizacao,
                               Int16 xvagas_quantidade)
    {
        if (xproduto != String.Empty)
        {
            string script = "INSERT INTO produto_unidades VALUES ( " +
                            Srelib.QStr(xproduto) +
                            ", " + Srelib.QStr(xgrupo) +
                            ", " + Srelib.QStr(xunidade) +
                            ", " + Srelib.QStr(xparte) +
                            ", " + Srelib.forcaponto(Convert.ToString(xmetragem_total)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xvlr_total)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xvlr_1)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xmetragem_1)) +
                            ", " + Srelib.QStr(xinscricao_1) +
                            ", " + Srelib.QStr(xproprietario_1) +
                            ", " + (xquitado_1) +
                            ", " + (xescritura_1) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtescritura_1)) +
                            ", " + Srelib.QStr(xcartorio_1) +
                            ", " + Srelib.QStr(xlivro_1) +
                            ", " + Srelib.QStr(xfolha_1) +
                            ", " + (xprocesso_1) +
                            ", " + Srelib.QStr(xobs_1) +
                            ", " + Srelib.forcaponto(Convert.ToString(xvlr_2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xmetragem_2)) +
                            ", " + Srelib.QStr(xinscricao_2) +
                            ", " + Srelib.QStr(xproprietario_2) +
                            ", " + (xquitado_2) +
                            ", " + (xescritura_2) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtescritura_2)) +
                            ", " + Srelib.QStr(xcartorio_2) +
                            ", " + Srelib.QStr(xlivro_2) +
                            ", " + Srelib.QStr(xfolha_2) +
                            ", " + (xprocesso_2) +
                            ", " + Srelib.QStr(xobs_2) +
                            ", " + Srelib.forcaponto(Convert.ToString(xarea_privativa_coletiva_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xarea_privativa_terraco_coberto_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xarea_privativa_terraco_descoberto_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xarea_comum_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xarea_garagem_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xarea_hobby_box_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xarea_total_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xfracao_ideal_m2)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xfracao_ideal_percentual)) +
                            ", " + Srelib.QStr(xhobby_box_numero) +
                            ", " + Srelib.QStr(xhobby_box_localizacao) +
                            ", " + Srelib.QStr(xnumero_garagem_01) +
                            ", " + Srelib.QStr(xnumero_garagem_02) +
                            ", " + Srelib.QStr(xnumero_garagem_03) +
                            ", " + Srelib.QStr(xnumero_garagem_04) +
                            ", " + Srelib.QStr(xnumero_garagem_05) +
                            ", " + Srelib.QStr(xvagas_localizacao) +
                            ", " + (xvagas_quantidade) +
                            ", " + "0" +
                            ", " + "0" +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString("01/01/1900"))) +
                            ", " + "0" +
                            ", " + "0" +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString("01/01/1900"))) +
                            ", " + "0" +
                            ", " + "0" +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString("01/01/1900"))) +
                            ", " + "0" +
                            ", " + "0" +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString("01/01/1900"))) +
                            ", " + "0" +
                            ", " + "0" +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString("01/01/1900"))) +
                            ", " + "0" +
                            ", " + "0" +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString("01/01/1900"))) +
                            " ) ";

            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #20
0
    public static String Grava(string xcod_banco,
                               string xnome,
                               DateTime xdata,
                               string xdrive,
                               string xpasta_remessa,
                               string xpasta_retorno,
                               string xpasta_envelope,
                               string xassunto,
                               string xcaixa_postal,
                               string xmascara_remessa,
                               string xmascara_retorno,
                               string xnome_arquivo,
                               string xnumero_arquivo,
                               string xprazo_fol,
                               string xprazo_dev,
                               string xprazo_pro,
                               string xmulta,
                               string xjuros,
                               string xcomissao,
                               string xcarteira,
                               string xnum_inicial,
                               string xnum_final,
                               string xsequencia,
                               string xnumero_atual,
                               string xcomplemento)
    {
        if (xcod_banco != String.Empty)
        {
            string script = "INSERT INTO bancos_2 VALUES ( " +
                            Srelib.QStr(xcod_banco) +
                            ", " + Srelib.QStr(xnome) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xdata))) +
                            ", " + Srelib.QStr(xdrive) +
                            ", " + Srelib.QStr(xpasta_remessa) +
                            ", " + Srelib.QStr(xpasta_retorno) +
                            ", " + Srelib.QStr(xpasta_envelope) +
                            ", " + Srelib.QStr(xassunto) +
                            ", " + Srelib.QStr(xcaixa_postal) +
                            ", " + Srelib.QStr(xmascara_remessa) +
                            ", " + Srelib.QStr(xmascara_retorno) +
                            ", " + Srelib.QStr(xnome_arquivo) +
                            ", " + xnumero_arquivo +
                            ", " + xprazo_fol +
                            ", " + xprazo_dev +
                            ", " + xprazo_pro +
                            ", " + Srelib.forcaponto(xmulta) +
                            ", " + Srelib.forcaponto(xjuros) +
                            ", " + Srelib.forcaponto(xcomissao) +
                            ", " + Srelib.QStr(xcarteira) +
                            ", " + xnum_inicial +
                            ", " + xnum_final +
                            ", " + xsequencia +
                            ", " + xnumero_atual +
                            ", " + Srelib.QStr(xcomplemento) +
                            " ) ";

            //" where nome=" + Rgblib.QStr(pParametro);

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #21
0
    public static String AlteraBanco(string xID,
                                     string xcod_banco,
                                     string xnome,
                                     DateTime xdata,
                                     string xdrive,
                                     string xpasta_remessa,
                                     string xpasta_retorno,
                                     string xpasta_envelope,
                                     string xassunto,
                                     string xcaixa_postal,
                                     string xmascara_remessa,
                                     string xmascara_retorno,
                                     string xnome_arquivo,
                                     string xnumero_arquivo,
                                     string xprazo_fol,
                                     string xprazo_dev,
                                     string xprazo_pro,
                                     string xmulta,
                                     string xjuros,
                                     string xcomissao,
                                     string xcarteira,
                                     string xnum_inicial,
                                     string xnum_final,
                                     string xsequencia,
                                     string xnumero_atual,
                                     string xcomplemento)
    {
        string script = " UPDATE bancos_2 SET " +
                        " cod_banco = " + Srelib.QStr(xcod_banco) +
                        " ,nome = " + Srelib.QStr(xnome) +
                        " ,data = " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xdata))) +
                        " ,drive = " + Srelib.QStr(xdrive) +
                        " ,pasta_remessa = " + Srelib.QStr(xpasta_remessa) +
                        " ,pasta_retorno = " + Srelib.QStr(xpasta_retorno) +
                        " ,pasta_envelope = " + Srelib.QStr(xpasta_envelope) +
                        " ,assunto = " + Srelib.QStr(xassunto) +
                        " ,caixa_postal = " + Srelib.QStr(xcaixa_postal) +
                        " ,mascara_remessa = " + Srelib.QStr(xmascara_remessa) +
                        " ,mascara_retorno = " + Srelib.QStr(xmascara_retorno) +
                        " ,nome_arquivo = " + Srelib.QStr(xnome_arquivo) +
                        " ,numero_arquivo = " + Srelib.QStr(xnumero_arquivo) +
                        " ,prazo_fol = " + xprazo_fol +
                        " ,prazo_dev = " + xprazo_dev +
                        " ,prazo_pro = " + xprazo_pro +
                        " ,multa = " + Srelib.forcaponto(xmulta) +
                        " ,juros = " + Srelib.forcaponto(xjuros) +
                        " ,comissao = " + Srelib.forcaponto(xcomissao) +
                        " ,carteira = " + Srelib.QStr(xcarteira) +
                        " ,num_inicial = " + xnum_inicial +
                        " ,num_final = " + xnum_final +
                        " ,sequencia = " + xsequencia +
                        " ,numero_atual = " + xnumero_atual +
                        " ,complemento = " + Srelib.QStr(xcomplemento) +
                        " where ID =" + xID;

        //revisar quando mexer na cobrança bancária

        SreDblib.ExecScript(script);

        return(" ");
    }
Example #22
0
    public static String Grava(string xproposta,
                               string xdata_proposta,
                               string xproduto,
                               string xgrupo,
                               string xunidade,
                               string xparte,
                               string xtipoplanta,
                               string xindexadorprehabitese,
                               string xindexadorposhabitese,
                               string xjurosposhabitese,
                               string xcliente,
                               string xsexo,
                               string xcnpj,
                               string xinscmunicipal,
                               string xinscestadual,
                               string xregjuntacom,
                               string xnire,
                               string xrg,
                               string xrguf,
                               string xrgemissor,
                               string xrgemissao,
                               string xestadocivil,
                               string xregimecasamento,
                               string xnacionalidade,
                               string xprofissao,
                               string xemail1,
                               string xemail2,
                               string xemail3,
                               string xdtnascimento,
                               string xconjugenome,
                               string xconjugesexo,
                               string xconjugecpf,
                               string xconjugerg,
                               string xconjugerguf,
                               string xconjugergemissor,
                               string xconjugergemissao,
                               string xconjugenacionalidade,
                               string xconjugeprofissao,
                               string xconjugeemail1,
                               string xconjugeemail2,
                               string xconjugeemail3,
                               string xconjugedtnascimento,
                               string xendereco,
                               string xenderecores,
                               string xenderecoresnumero,
                               string xenderecorescomplem,
                               string xbairrores,
                               string xcidaderes,
                               string xufres,
                               string xcepres,
                               string xfone1res,
                               string xfone2res,
                               string xfone3res,
                               string xenderecocom,
                               string xenderecocomnumero,
                               string xenderecocomcomplem,
                               string xbairrocom,
                               string xcidadecom,
                               string xufcom,
                               string xcepcom,
                               string xfone1com,
                               string xfone2com,
                               string xfone3com,
                               string xativo,
                               Decimal xcomissaopermanencia,
                               string xtabelaprice,
                               Decimal xvalor_venda,
                               Decimal xsinal,
                               Decimal xsaldo,
                               string xplano1_parcelas_qtd,
                               Decimal xplano1_parcelas_vlr,
                               string xplano1_parcelas_vencimento,
                               string xplano2_parcelas_qtd,
                               Decimal xplano2_parcelas_vlr,
                               string xplano2_parcelas_vencimento,
                               string xplano3_parcelas_qtd,
                               Decimal xplano3_parcelas_vlr,
                               string xplano3_parcelas_vencimento,
                               string xplano4_parcelas_qtd,
                               Decimal xplano4_parcelas_vlr,
                               string xplano4_parcelas_vencimento,
                               string xplano5_parcelas_qtd,
                               Decimal xplano5_parcelas_vlr,
                               string xplano5_parcelas_vencimento,
                               string xplano6_parcelas_qtd,
                               Decimal xplano6_parcelas_vlr,
                               string xplano6_parcelas_vencimento,
                               string xplano7_parcelas_qtd,
                               Decimal xplano7_parcelas_vlr,
                               string xplano7_parcelas_vencimento,
                               string xplano8_parcelas_qtd,
                               Decimal xplano8_parcelas_vlr,
                               string xplano8_parcelas_vencimento,
                               string xobs,
                               string xcorretor)
    {
        string yproposta = ProximaProposta();

        //
        if (xproduto != String.Empty)
        {
            //
            string script = "INSERT INTO proposta VALUES ( " +
                            yproposta +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdata_proposta.ToString().Substring(0, 10))) +
                            ", " + xproduto +
                            ", " + xgrupo +
                            ", " + xunidade +
                            ", " + xparte +
                            ", " + Srelib.QStr(xtipoplanta) +
                            ", " + Srelib.QStr(xindexadorprehabitese) +
                            ", " + Srelib.QStr(xindexadorposhabitese) +
                            ", " + Srelib.QStr(xjurosposhabitese) +
                            ", " + Srelib.QStr(xcliente) +
                            ", " + Srelib.QStr(xsexo) +
                            ", " + Srelib.QStr(xcnpj) +
                            ", " + Srelib.QStr(xinscmunicipal) +
                            ", " + Srelib.QStr(xinscestadual) +
                            ", " + Srelib.QStr(xregjuntacom) +
                            ", " + Srelib.QStr(xnire) +
                            ", " + Srelib.QStr(xrg) +
                            ", " + Srelib.QStr(xrguf) +
                            ", " + Srelib.QStr(xrgemissor) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xrgemissao.ToString().Substring(0, 10))) +
                            ", " + Srelib.QStr(xestadocivil) +
                            ", " + Srelib.QStr(xregimecasamento) +
                            ", " + Srelib.QStr(xnacionalidade) +
                            ", " + Srelib.QStr(xprofissao) +
                            ", " + Srelib.QStr(xemail1) +
                            ", " + Srelib.QStr(xemail2) +
                            ", " + Srelib.QStr(xemail3) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xdtnascimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.QStr(xconjugenome) +
                            ", " + Srelib.QStr(xconjugesexo) +
                            ", " + Srelib.QStr(xconjugecpf) +
                            ", " + Srelib.QStr(xconjugerg) +
                            ", " + Srelib.QStr(xconjugerguf) +
                            ", " + Srelib.QStr(xconjugergemissor) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xconjugergemissao.ToString().Substring(0, 10))) +
                            ", " + Srelib.QStr(xconjugenacionalidade) +
                            ", " + Srelib.QStr(xconjugeprofissao) +
                            ", " + Srelib.QStr(xconjugeemail1) +
                            ", " + Srelib.QStr(xconjugeemail2) +
                            ", " + Srelib.QStr(xconjugeemail3) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xconjugedtnascimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.QStr(xendereco) +
                            ", " + Srelib.QStr(xenderecores) +
                            ", " + Srelib.QStr(xenderecoresnumero) +
                            ", " + Srelib.QStr(xenderecorescomplem) +
                            ", " + Srelib.QStr(xbairrores) +
                            ", " + Srelib.QStr(xcidaderes) +
                            ", " + Srelib.QStr(xufres) +
                            ", " + Srelib.QStr(xcepres) +
                            ", " + Srelib.QStr(xfone1res) +
                            ", " + Srelib.QStr(xfone2res) +
                            ", " + Srelib.QStr(xfone3res) +
                            ", " + Srelib.QStr(xenderecocom) +
                            ", " + Srelib.QStr(xenderecocomnumero) +
                            ", " + Srelib.QStr(xenderecocomcomplem) +
                            ", " + Srelib.QStr(xbairrocom) +
                            ", " + Srelib.QStr(xcidadecom) +
                            ", " + Srelib.QStr(xufcom) +
                            ", " + Srelib.QStr(xcepcom) +
                            ", " + Srelib.QStr(xfone1com) +
                            ", " + Srelib.QStr(xfone2com) +
                            ", " + Srelib.QStr(xfone3com) +
                            ", " + xativo +
                            ", " + Srelib.forcaponto(Convert.ToString(xcomissaopermanencia)) +
                            ", " + xtabelaprice +
                            ", " + Srelib.forcaponto(Convert.ToString(xvalor_venda)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xsinal)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xsaldo)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano1_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano1_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano1_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano2_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano2_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano2_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano3_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano3_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano3_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano4_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano4_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano4_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano5_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano5_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano5_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano6_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano6_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano6_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano7_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano7_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano7_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano8_parcelas_qtd)) +
                            ", " + Srelib.forcaponto(Convert.ToString(xplano8_parcelas_vlr)) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(xplano8_parcelas_vencimento.ToString().Substring(0, 10))) +
                            ", " + Srelib.QStr(xobs) +
                            ", " + xcorretor +
                            ")";

            SreDblib.ExecScript(script);
        }
        return(" ");
    }
Example #23
0
    public String AlteraBordero(String pXml)
    {
        // Conexao Conn = new Conexao(pXml);
        if (bordvinc.Trim() == "")
        {
            bordvinc = "0";
        }
        String Qry = "EXEC GN_ALTERA_BORDERO " +
                     Srelib.QStr(empresa) + "," +
                     Srelib.QStr(cedente) + "," +
                     tipo_operacao + "," +
                     bordero + "," +
                     Srelib.QStr(Srelib.DataQuery(data_oper, DM.FormatoData)) + "," +
                     Srelib.QStr(Srelib.DataQuery(data_cadastro, DM.FormatoData)) + "," +
                     dmais + "," +
                     criterio + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tdesc)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tserv)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tiss)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(txiof)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(pmpx)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(pmp0)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vtt)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(df)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(ts)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(iss)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(iof)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(db)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(liquido)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(recompra)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(pago)) + "," +
                     nche + "," +
                     ndup + "," +
                     ndoc + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cpmf)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vche)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vdup)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vdoc)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vcpmf)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tche)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tdup)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tdoc)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tcpmf)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(adicional)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2("0.00")) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbnche)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbndup)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbndoc)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbcpmf)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbvche)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbvdup)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbvdoc)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbvcpmf)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbtche)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbtdup)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbtdoc)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cbtcpmf)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(totcb)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(npis)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(nfin)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(niss)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(niof)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vpis)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vfin)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(viss)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(viof)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tpis)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tfin)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tiss2)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tiof)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(totimp)) + "," +
                     tipo_custo + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cdbano)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cdbmes)) + "," +
                     Srelib.forcaponto(dc) + "," +
                     Srelib.forcaponto(du) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tover)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(totcc)) + "," +
                     ccdmais + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(jb)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(iof_custos)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vjb)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(viof_custos)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vtac)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(lucro)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(margem)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(margem30)) + "," +
                     tipo_cdi + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(treceita)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tdespesa)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tmora)) + "," +
                     Srelib.QStr("") + "," +
                     Srelib.QStr(gerente) + "," +
                     ntitulos + "," +
                     Srelib.QStr(obs1) + "," +
                     Srelib.QStr(obs2) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tdesconto)) + "," +
                     Srelib.QStr(Srelib.DataQuery(dataatual, DM.FormatoData)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(perc_retencao_ir)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(perc_retencao2_total)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(retencao_ir)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(retencao2_total)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(perc_retencao_pis)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(perc_retencao_cofins)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(perc_retencao_csll)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(retencao_pis)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(retencao_cofins)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(retencao_csll)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(nirpj)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(virpj)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tirpj)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(ncsocial)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vcsocial)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tcsocial)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(txsaq)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(valsaque)) + "," +
                     Srelib.QStr("INCLUSÃO BORDERÔ") + "," +
                     Srelib.QStr("VIA GESTOR") + "," +
                     Srelib.QStr("") + "," +
                     Srelib.QStr(Srelib.DataQuery(data, DM.FormatoData)) + "," +
                     numero + "," +
                     bordvinc;



        DataSet    _StProc = new DataSet();
        SqlCommand Command = new SqlCommand(Qry, DM.ConexaoSessao);

        Command.CommandTimeout = 99999;
        SqlDataAdapter DA = new SqlDataAdapter();

        DA.TableMappings.Add("Table", "calcbor");
        DA.SelectCommand = Command;
        DA.Fill(_StProc);
        DataTable DT;

        DT = _StProc.Tables["calcbor"];
        DataRow DR = DT.Rows[0];

        cms = Convert.ToString(DR["cms"]);

        return(cms);
    }
Example #24
0
    public void CalculaBordero(Boolean lPrimeira, String pXml)
    {
        // Conexao Conn = new Conexao(pXml);

        if ((adicional == "") || (adicional == null))
        {
            adicional = "0.00";
        }
        Double naux = Convert.ToDouble(adicional) + Convert.ToDouble(PegaValorSerasa(pXml));

        adicional = Srelib.PadDouble(Convert.ToString(naux));

        String Qry = "EXEC CALCULA_BOR " +
                     Srelib.QStr(empresa) + "," +
                     Srelib.QStr(cedente) + "," +
                     tipo_operacao + "," +
                     bordero + "," +
                     Srelib.QStr(Srelib.DataQuery(data_oper, DM.FormatoData)) + "," +
                     Srelib.QStr(Srelib.DataQuery(data_cadastro, DM.FormatoData)) + "," +
                     dmais + "," +
                     criterio + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tdesc)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tserv)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tiss)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(txiof)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(tmora)) + "," +
                     lcalc + "," +
                     Srelib.QStr(tipograva) + "," +
                     Srelib.QStr(iof_ts) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cpmf)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(custo_che)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(custo_dup)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(custo_doc)) + "," +
                     cobserv + "," +
                     cobiof + "," +
                     cobiss + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(recompra)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(custo_che2)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(custo_dup2)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(custo_doc2)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(pis)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(fin)) + "," +
                     Srelib.QStr(df_no_pis) + "," +
                     Srelib.QStr(df_no_fim) + "," +
                     Srelib.QStr(zera_custos) + "," +
                     tipo_custo + "," +
                     tipo_cdi + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cdbano)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cdbmes)) + "," +
                     dc + "," +
                     du + "," +
                     ccdmais + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(juros_bancarios)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(iof_custos)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(vtac)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(npis)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(nfin)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(niss)) + "," +
                     visao + "," +
                     ndoc + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(adicional)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(nirpj)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(ncsocial)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(txsaq)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(valsaque)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2(cpmf2)) + "," +
                     Srelib.forcaponto(Srelib.TrNumeroString2("0.00"));


        DataSet    _StProc = new DataSet();
        SqlCommand Command = new SqlCommand(Qry, DM.ConexaoSessao);

        Command.CommandTimeout = 99999;
        SqlDataAdapter DA = new SqlDataAdapter();

        DA.TableMappings.Add("Table", "calcbor");
        DA.SelectCommand = Command;
        DA.Fill(_StProc);
        DataTable DT;

        DT = _StProc.Tables["calcbor"];
        DataRow DR = DT.Rows[0];

        // moradefault = Convert.ToString(DR["taxamora"]);

        if (lPrimeira)
        {
            nche                 = Convert.ToString(DR["nche"]);
            ndup                 = Convert.ToString(DR["ndup"]);
            cpmf                 = Convert.ToString(DR["cpmf"]);
            vche                 = Convert.ToString(DR["custo_che"]);
            vdup                 = Convert.ToString(DR["custo_dup"]);
            vdoc                 = Convert.ToString(DR["custo_doc"]);
            tche                 = Convert.ToString(DR["tche"]);
            tdup                 = Convert.ToString(DR["tdup"]);
            tdoc                 = Convert.ToString(DR["tdoc"]);
            adicional            = Convert.ToString(DR["adicional"]);
            txsaque              = Convert.ToDouble(DR["txsaque"]);
            valsaque             = Convert.ToString(DR["valsaque"]);
            cbcpmf               = Convert.ToString(DR["cbcpmf"]);
            cbnche               = Convert.ToString(DR["cbnche"]);
            cbndup               = Convert.ToString(DR["cbndup"]);
            cbndoc               = Convert.ToString(DR["cbndoc"]);
            cbndoc               = ndoc;
            cbvche               = Convert.ToString(DR["custo_che2"]);
            cbvdup               = Convert.ToString(DR["custo_dup2"]);
            cbvdoc               = Convert.ToString(DR["custo_doc2"]);
            cbtche               = Convert.ToString(DR["cbtche"]);
            cbtdup               = Convert.ToString(DR["cbtdup"]);
            cbtdoc               = Convert.ToString(DR["cbtdoc"]);
            tipo_custo           = Convert.ToString(DR["tipo_custo"]);
            tipo_cdi             = Convert.ToString(DR["tipo_cdi"]);
            cdbano               = Convert.ToString(DR["cdbano"]);
            cdbmes               = Convert.ToString(DR["cdbmes"]);
            dc                   = Convert.ToString(DR["dc"]);
            du                   = Convert.ToString(DR["du"]);
            ccdmais              = Convert.ToString(DR["ccdmais"]);
            jb                   = Convert.ToString(DR["juros_bancarios"]);
            iof_custos           = Convert.ToString(DR["iof_custos"]);
            vtac                 = Convert.ToString(DR["vtac"]);
            db                   = Convert.ToString(DR["kdb"]);
            liquido              = Convert.ToString(DR["kliquido"]);
            perc_retencao_ir     = Convert.ToString(DR["perc_retencao_ir"]);
            perc_retencao2_total = Convert.ToString(DR["perc_retencao2_total"]);
            retencao_ir          = Convert.ToString(DR["retencao_ir"]);
            retencao2_total      = Convert.ToString(DR["retencao2_total"]);
            perc_retencao_pis    = Convert.ToString(DR["perc_retencao_pis"]);
            perc_retencao_cofins = Convert.ToString(DR["perc_retencao_cofins"]);
            perc_retencao_csll   = Convert.ToString(DR["perc_retencao_csll"]);
            retencao_pis         = Convert.ToString(DR["retencao_pis"]);
            retencao_cofins      = Convert.ToString(DR["retencao_cofins"]);
            retencao_csll        = Convert.ToString(DR["retencao_csll"]);
            recompra             = Convert.ToString(DR["recompra"]);
            pago                 = Convert.ToString(DR["kpago"]);
            vcpmf                = Convert.ToString(DR["kvcpmf"]);
            tcpmf                = Convert.ToString(DR["ktcpmf"]);
            treceita             = Convert.ToString(DR["treceita"]);
            tdespesa             = Convert.ToString(DR["tdespesa"]);
            lucro                = Convert.ToString(DR["lucro"]);
            margem               = Convert.ToString(DR["margem"]);
            margem30             = Convert.ToString(DR["margem30"]);
            totimp               = Convert.ToString(DR["totimp"]);
            cdbmes               = Convert.ToString(DR["cdbmes"]);
            tover                = Convert.ToString(DR["tover"]);
            totcc                = Convert.ToString(DR["totcc"]);
            vjb                  = Convert.ToString(DR["vjb"]);
            viof_custos          = Convert.ToString(DR["viof_custos"]);
        }

        lPrimeira = false;
        empresa   = Convert.ToString(DR["empresa"]);
        cedente   = Convert.ToString(DR["cedente"]);
        nbord     = bordero;

        data_oper     = String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(DR["data_oper"]));
        data_cadastro = String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(DR["data_cadastro"]));

        dmais     = Convert.ToString(DR["dmais"]);
        criterio  = Convert.ToString(DR["criterio"]);
        tdesc     = Convert.ToString(DR["tdesc"]);
        tserv     = Convert.ToString(DR["tserv"]);
        tiss      = Convert.ToString(DR["tiss"]);
        txiof     = Convert.ToString(DR["txiof"]);
        tmora     = Convert.ToString(DR["tmora"]);
        vtt       = Convert.ToString(DR["ktotaltitulos"]);
        tdesconto = Convert.ToString(DR["totaldesconto"]);
        df        = Convert.ToString(DR["ktotaldesagio"]);
        pmpx      = Convert.ToString(DR["kpmpx"]);
        pmp0      = Convert.ToString(DR["kpmp0"]);
        ts        = Convert.ToString(DR["kts"]);
        iss       = Convert.ToString(DR["kiss"]);
        niof      = Convert.ToString(DR["niof"]);
        viof      = Convert.ToString(DR["viof"]);
        tiof      = Convert.ToString(DR["tiof"]);
        iof       = Convert.ToString(DR["iof"]);
        cbvcpmf   = Convert.ToString(DR["kcbvcpmf"]);
        cbtcpmf   = Convert.ToString(DR["kcbtcpmf"]);
        totcb     = Convert.ToString(DR["ktotcb"]);
        npis      = Convert.ToString(DR["npis"]);
        nfin      = Convert.ToString(DR["nfin"]);
        niss      = Convert.ToString(DR["niss"]);
        vpis      = Convert.ToString(DR["vpis"]);
        tpis      = Convert.ToString(DR["tpis"]);
        vfin      = Convert.ToString(DR["vfin"]);
        tfin      = Convert.ToString(DR["tfin"]);
        viss      = Convert.ToString(DR["viss"]);
        tiss2     = Convert.ToString(DR["tiss2"]);
        obs1      = "IMPORTADO DA APROVAÇÃO - GESTOR";
        obs2      = "";
        nirpj     = Convert.ToString(DR["nirpj"]);
        virpj     = Convert.ToString(DR["virpj"]);
        tirpj     = Convert.ToString(DR["tirpj"]);
        ncsocial  = Convert.ToString(DR["ncsocial"]);
        vcsocial  = Convert.ToString(DR["vcsocial"]);
        tcsocial  = Convert.ToString(DR["tcsocial"]);
        // gerente       =   ""; // _Cedente.PegaGerente(xCedente);
        ntitulos = Convert.ToString(DR["numtit"]);
        status   = "1";

        // Conn.SqlConn.Close();
    }
Example #25
0
    private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
    {
        //
        string parcela = Convert.ToString(GetCurrentColumnValue("parcela"));
        string tipo    = Convert.ToString(GetCurrentColumnValue("tipo"));

        lnumero.Text = parcela + " Tipo: (" + tipo + ")";
        //
        string vencimento = Convert.ToString(GetCurrentColumnValue("data_vencimento")).Substring(0, 10);

        lvencimento.Text = vencimento;
        //
        string pagamento = Convert.ToString(GetCurrentColumnValue("data_pagamento")).Substring(0, 10);

        lpagamento.Text = pagamento;
        //
        string vlr_parcela = Convert.ToString(GetCurrentColumnValue("vlr_parcela"));

        lvalorparcela.Text = Srelib.forcaponto(vlr_parcela);
        //
        //
        string vlr_pagamento = Convert.ToString(GetCurrentColumnValue("vlr_pagamento"));

        lvalorpagamento.Text = Srelib.forcaponto(vlr_pagamento);
        //
        double diferenca = Convert.ToDouble(GetCurrentColumnValue("vlr_pagamento")) -
                           Convert.ToDouble(GetCurrentColumnValue("vlr_parcela"));

        //
        lvaloracrescimos.Text = "0,00";
        lvalordesconto.Text   = "0,00";
        if (diferenca != 0)
        {
            if (diferenca > 0)
            {
                lvaloracrescimos.Text = Srelib.forcaponto(Convert.ToString(diferenca));
            }
            else
            {
                lvalordesconto.Text = Srelib.forcaponto(Convert.ToString(diferenca * -1));
            }
        }
        //
        Int32 produto = Convert.ToInt32(GetCurrentColumnValue("produto"));

        lvinculo2.Text = uProduto.PegaProdutoDescricao(produto);
        //
        Int32 grupo   = Convert.ToInt32(GetCurrentColumnValue("grupo"));
        Int32 unidade = Convert.ToInt32(GetCurrentColumnValue("unidade"));
        Int32 parte   = Convert.ToInt32(GetCurrentColumnValue("parte"));
        Int32 id      = Convert.ToInt32(GetCurrentColumnValue("ID"));

        //
        lvinculo3.Text = "Bloco No. " + grupo.ToString() + " Unidade No. " + unidade.ToString();
        lvinculo3.Text = " " + lvinculo3.Text + " Parte No. " + parte.ToString();
        //
        //lvencimentoextenso.Text = Srelib.DataExtenso(Convert.ToDateTime(vencimento));
        //
        lnomeempresa.Text = uEmpresa.PegaNome(uEmpresa.PegaMatriz());
        //
        lcnpjempresa.Text = Srelib.FormataCPFCNPJ(uEmpresa.PegaCnpj(uEmpresa.PegaMatriz()));
        //
        ValorExtenso xExt = new ValorExtenso();
        String       xAux;

        xAux = xExt.ValExtenso(Convert.ToDouble(vlr_pagamento));
        lvalorextenso1.Text = xAux;
        lvalorextenso2.Text = " ";
        //
        lcidadeestadoextenso.Text = uEmpresa.PegaCidade(uEmpresa.PegaMatriz()) + ", " + uEmpresa.PegaEstado(uEmpresa.PegaMatriz()) + ".";
        //
        lemissaoextenso.Text = uEmpresa.PegaCidade(uEmpresa.PegaMatriz()) + ", " + Srelib.DataExtenso(DateTime.Now);
        //
        //
        string cliente = uVendas.PegaProprietário(produto.ToString(), grupo.ToString(), unidade.ToString(), "0");

        lemitentenome.Text = uContato.PegaNomeID(cliente);
        lemitentecpf.Text  = Srelib.FormataCPFCNPJ(uContato.PegaCpfCnpjID(cliente));
        //
        //
        ////TITULO RECIBO
        //uParcelas.GravaRecibo(produto.ToString(), grupo.ToString(), unidade.ToString(), parte.ToString(), id.ToString(), recibo.ToString());
        //uParametros.AlteraMigracao("PROXIMO RECIBO", Convert.ToString(Convert.ToInt64(recibo) + 1));
    }
    protected void GridListagem_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
    {
        ASPxGridView gridView = (ASPxGridView)sender;
        //
        DataSet dsnomecolunas = uTaxasDiarias.PegaDadosTaxasDiariasNomeColunas();
        //
        string ID   = "";
        string data = "";

        string[] nome_taxa          = new string[1000];
        string[] valor              = new string[1000];
        string   nome_taxa_corrente = "";

        //
        for (int i = 0; i < 1000; i++)
        {
            nome_taxa[i] = "";
            valor[i]     = "";
        }
        //
        ID   = e.NewValues["ID"].ToString();
        data = e.NewValues["data"].ToString().Substring(0, 10);
        //
        //ignora id, mes, ano
        Int32 j = 0;

        for (int i = 1; i < dsnomecolunas.Tables[0].Rows.Count; i++)
        {
            nome_taxa_corrente = dsnomecolunas.Tables[0].Rows[i]["COLUMN_NAME"].ToString();
            nome_taxa[j]       = nome_taxa_corrente;
            valor[j]           = "0";
            if (e.NewValues[nome_taxa_corrente] != null)
            {
                valor[j] = e.NewValues[nome_taxa_corrente].ToString();
            }
            j++;
        }
        //
        string string_altera = "";

        for (int i = 1; i < j; i++)
        {
            string_altera = string_altera +
                            nome_taxa[i] + " = " + Srelib.forcaponto(valor[i]) + ", ";
        }
        //
        string_altera = string_altera.Substring(0, string_altera.Length - 2);

        uTaxasDiarias.AlteraTaxas(ID,
                                  data,
                                  string_altera);


        gridView.CancelEdit();
        e.Cancel = true;

        //Usando Classe uLog.MakeLog - Gravando Log
        fwObs_Log = "ALTERA TAXAS DIARIAS: " + data;
        SqlParameter[] param_log = { new SqlParameter("@login",    (String)Session["CodUsuario"]),
                                     new SqlParameter("@tabela",   fWtabela),
                                     new SqlParameter("@operacao", "TAXAS DIARIAS"),
                                     new SqlParameter("@obs",      "ALTERA"),
                                     new SqlParameter("@acao",     fwObs_Log) };
        uLog.MakeLog(param_log);

        //
        AtualizaGrid();
    }
Example #27
0
    protected void GridListagem_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxGridView gridView = (ASPxGridView)sender;

        //
        DataSet dsnomecolunas = uTaxasMensais.PegaDadosTaxasMensaisNomeColunas();
        //
        string ID  = "";
        string mes = "";
        string ano = "";

        string[] nome_taxa          = new string[1000];
        string[] valor              = new string[1000];
        string   nome_taxa_corrente = "";

        //
        for (int i = 0; i < 1000; i++)
        {
            nome_taxa[i] = "";
            valor[i]     = "";
        }
        //
        //ID = e.NewValues["ID"].ToString();
        mes = e.NewValues["mes"].ToString();
        ano = e.NewValues["ano"].ToString();
        //
        //String
        //ignora id, mes, ano
        Int32 j = 0;

        for (int i = 3; i < dsnomecolunas.Tables[0].Rows.Count; i++)
        {
            nome_taxa_corrente = dsnomecolunas.Tables[0].Rows[i]["COLUMN_NAME"].ToString();
            nome_taxa[j]       = nome_taxa_corrente;
            valor[j]           = "0";
            if (e.NewValues[nome_taxa_corrente] != null)
            {
                valor[j] = e.NewValues[nome_taxa_corrente].ToString();
            }
            j++;
        }
        //
        string string_altera = "";

        for (int i = 0; i < j; i++)
        {
            string_altera = string_altera +
                            Srelib.forcaponto(valor[i]) + ", ";
        }
        //
        string_altera = string_altera.Substring(0, string_altera.Length - 2);
        //
        //String2
        //
        //ignora id, mes, ano
        j = 0;
        for (int i = 1; i < dsnomecolunas.Tables[0].Rows.Count; i++)
        {
            nome_taxa_corrente = dsnomecolunas.Tables[0].Rows[i]["COLUMN_NAME"].ToString();
            nome_taxa[j]       = nome_taxa_corrente;
            valor[j]           = "0";
            if (e.NewValues[nome_taxa_corrente] != null)
            {
                valor[j] = e.NewValues[nome_taxa_corrente].ToString();
            }
            j++;
        }
        //
        string string_altera2 = "";

        for (int i = 0; i < j; i++)
        {
            string_altera2 = string_altera2 +
                             nome_taxa[i] + " = " + Srelib.forcaponto(valor[i]) + ", ";
        }
        //
        string_altera2 = string_altera2.Substring(0, string_altera2.Length - 2);
        //
        //
        uTaxasMensais.IncluiTaxas(ID,
                                  mes,
                                  ano,
                                  string_altera,
                                  string_altera2);


        gridView.CancelEdit();
        e.Cancel = true;


        //Usando Classe uLog.MakeLog - Gravando Log
        fwObs_Log = "INCLUI TAXAS MENSAIS: " + mes + "/" + ano;
        SqlParameter[] param_log = { new SqlParameter("@login",    (String)Session["CodUsuario"]),
                                     new SqlParameter("@tabela",   fWtabela),
                                     new SqlParameter("@operacao", "TAXAS MENSAIS"),
                                     new SqlParameter("@obs",      "INCLUI"),
                                     new SqlParameter("@acao",     fwObs_Log) };
        uLog.MakeLog(param_log);

        //
        AtualizaGrid();
    }
Example #28
0
    public static String Altera(string xID,
                                string xtipo,
                                string xdescricao,
                                string xconta,
                                string xcnpj,
                                string xenderecocom,
                                string xenderecocomnumero,
                                string xenderecocomcomplem,
                                string xbairrocom,
                                string xcidadecom,
                                string xufcom,
                                string xcepcom,
                                string xfone1com,
                                string xfone2com,
                                string xfone3com,
                                string xemail1,
                                string xemail2,
                                string xemail3,
                                string xarea,
                                string xsituacao_obra,
                                DateTime xhabitese,
                                decimal xcub,
                                string xobs1,
                                string xobs2,
                                string xobs3,
                                string xobs4,
                                string xobs5,
                                Boolean xativo,
                                string xcodpis)
    {
        string script = "UPDATE PRODUTO SET " +
                        " descricao = " + Srelib.QStr(xdescricao) +
                        " ,conta = " + Srelib.QStr(xconta) +
                        " ,cnpj = " + Srelib.QStr(xcnpj) +
                        " ,enderecocom = " + Srelib.QStr(xenderecocom) +
                        " ,enderecocomnumero = " + Srelib.QStr(xenderecocomnumero) +
                        " ,enderecocomcomplem = " + Srelib.QStr(xenderecocomcomplem) +
                        " ,bairrocom = " + Srelib.QStr(xbairrocom) +
                        " ,cidadecom = " + Srelib.QStr(xcidadecom) +
                        " ,ufcom = " + Srelib.QStr(xufcom) +
                        " ,cepcom = " + Srelib.QStr(xcepcom) +
                        " ,fone1com = " + Srelib.QStr(xfone1com) +
                        " ,fone2com = " + Srelib.QStr(xfone2com) +
                        " ,fone3com = " + Srelib.QStr(xfone3com) +
                        " ,email1 = " + Srelib.QStr(xemail1) +
                        " ,email2 = " + Srelib.QStr(xemail2) +
                        " ,email3 = " + Srelib.QStr(xemail3) +
                        " ,area = " + Srelib.QStr(xarea) +
                        " ,situacao_obra = " + Srelib.QStr(xsituacao_obra) +
                        " ,habitese = " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xhabitese))) +
                        " ,cub = " + Srelib.forcaponto(Convert.ToString(xcub)) +
                        " ,obs1 = " + Srelib.QStr(xobs1) +
                        " ,obs2 = " + Srelib.QStr(xobs2) +
                        " ,obs3 = " + Srelib.QStr(xobs3) +
                        " ,obs4 = " + Srelib.QStr(xobs4) +
                        " ,obs5 = " + Srelib.QStr(xobs5) +
                        " ,ativo = " + Convert.ToInt16(Convert.ToInt16(xativo)) +
                        " ,codpis = " + Srelib.QStr(xcodpis) +
                        " where ID =" + xID;

        SreDblib.ExecScript(script);

        return(" ");
    }
Example #29
0
    public static String Grava(string xnumproduto,
                               string xtipo,
                               string xdescricao,
                               string xconta,
                               string xcnpj,
                               string xenderecocom,
                               string xenderecocomnumero,
                               string xenderecocomcomplem,
                               string xbairrocom,
                               string xcidadecom,
                               string xufcom,
                               string xcepcom,
                               string xfone1com,
                               string xfone2com,
                               string xfone3com,
                               string xemail1,
                               string xemail2,
                               string xemail3,
                               string xarea,
                               string xsituacao_obra,
                               DateTime xhabitese,
                               decimal xcub,
                               string xobs1,
                               string xobs2,
                               string xobs3,
                               string xobs4,
                               string xobs5,
                               Boolean xativo,
                               string xcodpis)
    {
        if (xdescricao != String.Empty)
        {
            string script = "INSERT INTO PRODUTO VALUES ( " +
                            xnumproduto +
                            ", " + Srelib.QStr(xtipo) +
                            ", " + Srelib.QStr(xdescricao) +
                            ", " + Srelib.QStr(xconta) +
                            ", " + Srelib.QStr(xcnpj) +
                            ", " + Srelib.QStr(xenderecocom) +
                            ", " + Srelib.QStr(xenderecocomnumero) +
                            ", " + Srelib.QStr(xenderecocomcomplem) +
                            ", " + Srelib.QStr(xbairrocom) +
                            ", " + Srelib.QStr(xcidadecom) +
                            ", " + Srelib.QStr(xufcom) +
                            ", " + Srelib.QStr(xcepcom) +
                            ", " + Srelib.QStr(xfone1com) +
                            ", " + Srelib.QStr(xfone2com) +
                            ", " + Srelib.QStr(xfone3com) +
                            ", " + Srelib.QStr(xemail1) +
                            ", " + Srelib.QStr(xemail2) +
                            ", " + Srelib.QStr(xemail3) +
                            ", " + Srelib.QStr(xarea) +
                            ", " + Srelib.QStr(xsituacao_obra) +
                            ", " + Srelib.QStr(Srelib.DataAmericanasembarra(Convert.ToString(xhabitese))) +
                            ", " + Srelib.forcaponto(Convert.ToString(xcub)) +
                            ", " + Srelib.QStr(xobs1) +
                            ", " + Srelib.QStr(xobs2) +
                            ", " + Srelib.QStr(xobs3) +
                            ", " + Srelib.QStr(xobs4) +
                            ", " + Srelib.QStr(xobs5) +
                            ", " + Convert.ToString(Convert.ToInt16(xativo)) +
                            ", " + Srelib.QStr(xcodpis) +
                            " ) ";

            //Inserir se não existe

            SreDblib.ExecScript(script);
        }
        return(" ");
    }