コード例 #1
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());
        }