public string getBoletos(int pNumeroPedido) { string iRetorno = ""; CarSystem.Banco.NetBoleto iBoleto = new CarSystem.Banco.NetBoleto(6); // Int64[] iCodigo = new Int64[1]; //Int64[] iCodigo=new Int64[]; Int64[] iCodigo = new Int64[12]; DataTable iret = new DataTable(); //iCodigo[0] = getExecuteBoleto(pNumeroPedido); //if (t[0] == 0) // return ""; iRetorno = "td{" + "margin: 0;" + "padding: 0;" + "border: 0;" + "outline: 0;" + "font-weight: inherit;" + "font-style: inherit;" + "font-size: 100%;" + "font-family: inherit;" + "vertical-align: none;" + "background-color: white;" + "}" + ""; iRetorno = iBoleto.getHTML(iCodigo).Replace("<style>", "<style>" + iRetorno); return(iRetorno); }
public string executaBoleto(int pNumeroPedido, bool pIsTaxa) { string iRetorno = ""; CarSystem.Banco.NetBoleto iBoleto = new CarSystem.Banco.NetBoleto(6); Int64[] iCodigo = new Int64[1]; iCodigo[0] = getCodigoBoleto(pNumeroPedido, pIsTaxa); if (iCodigo[0] == 0) { return(""); } iRetorno = "td{" + "margin: 0;" + "padding: 0;" + "border: 0;" + "outline: 0;" + "font-weight: inherit;" + "font-style: inherit;" + "font-size: 100%;" + "font-family: inherit;" + "vertical-align: none;" + "background-color: white;" + "}" + ""; iRetorno = iBoleto.getHTML(iCodigo).Replace("<style>", "<style>" + iRetorno); return(iRetorno); }
public string getExecuteBoleto(int pNumeroPedido) { CarSystem.Banco.NetBoleto iBoleto = new CarSystem.Banco.NetBoleto(6); System.Data.DataTable iTabela = new System.Data.DataTable(); string iRetorno = ""; if (getString != null) { try { using (SqlConnection conn = new SqlConnection(getString.ConnectionString)) { conn.Open(); SqlCommand cmd = new SqlCommand("Venda.pro_getBoletoVendas", conn); cmd.CommandTimeout = 160; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@pNumeroPedido", pNumeroPedido); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(iTabela); Int64[] ret = new Int64[iTabela.Rows.Count]; int i = 0; foreach (DataRow dw in iTabela.Rows) { ret[i] = Convert.ToInt64(dw[0].ToString()); i++; } iRetorno = "td{" + "margin: 0;" + "padding: 0;" + "border: 0;" + "outline: 0;" + "font-weight: inherit;" + "font-style: inherit;" + "font-size: 100%;" + "font-family: inherit;" + "vertical-align: none;" + "background-color: white;" + "}" + ""; iRetorno = iBoleto.getHTML(ret).Replace("<style body=>", "<style>" + iRetorno); return(iRetorno); } } catch (Exception ex) { throw new Exception("class:" + this.GetType().Name + "\r\n Method:" + System.Reflection.MethodBase.GetCurrentMethod().Name + "\r\n" + ex.Message); } } return(""); }