Exemple #1
0
        public string Get_POS_BufferCancela(POS_Resposta resp,
                                            string nsuRCB,
                                            string nsuBanco,
                                            string valor,
                                            string dt_orig,
                                            string desc)
        {
            StringBuilder sb = new StringBuilder("00");

            sb.Append(resp.get_st_codResp().PadLeft(4, '0'));
            sb.Append("S");
            sb.Append(resp.get_st_nsuRcb().PadLeft(6, '0'));
            sb.Append(resp.get_st_nsuBanco().PadLeft(14, '0'));
            sb.Append(resp.get_st_nomeCliente().PadRight(40, ' '));
            sb.Append("290000");
            sb.Append("Cancelado".PadRight(20, ' '));
            sb.Append(resp.get_st_loja().PadLeft(15, '0'));
            sb.Append(nsuBanco.PadLeft(14, '0'));
            sb.Append(nsuRCB.PadLeft(6, '0'));
            sb.Append(resp.get_st_PAN().PadLeft(19, '0'));
            sb.Append(valor.PadLeft(12, '0'));

            DateTime tim = Convert.ToDateTime(dt_orig);

            sb.Append(tim.ToString("dd/MM/yyyy"));
            sb.Append(tim.ToString("HH:mm:ss"));

            sb.Append(DateTime.Now.ToString("dd/MM/yyyy"));
            sb.Append(DateTime.Now.ToString("HH:mm:ss"));

            return(sb.ToString());
        }
Exemple #2
0
        public string Get_POS_Buffer(POS_Resposta resp, string desc)
        {
            StringBuilder sb = new StringBuilder("00");

            sb.Append(resp.get_st_codResp().PadLeft(4, '0'));
            sb.Append("S");
            sb.Append(resp.get_st_nsuRcb().PadLeft(6, '0'));
            sb.Append(resp.get_st_nsuBanco().PadLeft(14, '0'));
            sb.Append(resp.get_st_nomeCliente().PadRight(40, ' '));
            sb.Append("004200");
            sb.Append(desc.PadRight(20, ' '));
            sb.Append(resp.get_st_loja().PadLeft(15, '0'));
            sb.Append(resp.get_st_PAN().PadLeft(14, '0'));
            sb.Append(resp.get_st_mesPri().PadLeft(2, '0'));

            sb.Append(DateTime.Now.ToString("dd/MM/yyyy"));
            sb.Append(DateTime.Now.ToString("HH:mm:ss"));

            int tamVar = resp.get_st_variavel().Length;

            sb.Append(tamVar.ToString("000"));
            sb.Append(resp.get_st_variavel());

            return(sb.ToString());
        }
Exemple #3
0
        public void recv_exec_pos_cancelaVendaEmpresarial(ref string st_msg, ref POS_Resposta pr)
        {
            DataPortable recv_dp = m_Comm.GetFirstExitPortable();

            recv_dp.GetMapValue(COMM_OUT_EXEC_POS_CANCELAVENDAEMPRESARIAL.st_msg, ref st_msg);

            DataPortable recv_dp_cont_pr = new DataPortable();

            m_Comm.GetExitPortableAtPosition(1).GetMapContainer(COMM_OUT_EXEC_POS_CANCELAVENDAEMPRESARIAL.pr, ref recv_dp_cont_pr);

            pr.Import(recv_dp_cont_pr);
        }
Exemple #4
0
/// USER [ custom_functions ]
/// USER [ custom_functions ] END

        public bool Item1()
        {
            #region - INPUT VARS -

            transaction.MemoryClean();

            tst_unit.LogTest("exec_pos_cancelaVendaEmpresarial Item1", ref m_Log);

            transaction.ut_abort = 0;

            string st_nsu_cancel = "";
            string dt_hoje       = "";
            string id_user       = "";

            POS_Entrada pe = new POS_Entrada();

            #endregion

/// USER [ setup_test_1 ]
/// USER [ setup_test_1 ] END

            #region - MAPPING TRANSACTION -

            call_exec_pos_cancelaVendaEmpresarial(st_nsu_cancel, dt_hoje, id_user, ref pe);

            if (transaction.setup() == false)
            {
                return(false);
            }

            try
            {
                #endregion

/// USER [ execute_1 ]
/// USER [ execute_1 ] END

                #region - OUTPUT VARS -
            }
            catch (System.Exception se)
            {
                if (se.Message != "ABORT")
                {
                    MessageBox.Show(se.ToString());
                }
            }

            if (transaction.finish() == false)
            {
                return(false);
            }

            string       st_msg = "";
            POS_Resposta pr     = new POS_Resposta();

            recv_exec_pos_cancelaVendaEmpresarial(ref st_msg, ref pr);

            transaction.sendObjections(ref my_objections);

            #endregion

/// USER [ validate_1 ]
/// USER [ validate_1 ] END

            pr.Clear();

            return(true);
        }