Example #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());
        }
Example #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());
        }