public String WriteTrailerFile(RemessaCNAB150 Shipping) { String Result; var File = new String(' ', 150); try { if (File.Length > 150) { throw new Exception("O tamanho do arquivo excede 150 caracteres!"); } Result = File; } catch { throw; } return(Result); }
public String WriteHeaderAllotment(RemessaCNAB150 Shipping, String Ocorrencia) { String Result; String EmpresaNome = Shipping.EmpresaCedente.Nome; if (EmpresaNome.Length > 30) { EmpresaNome = EmpresaNome.Substring(0, 30); } var File = new String(' ', 150); try { if (File.Length > 150) { throw new Exception("O tamanho do arquivo excede 150 caracteres!"); } Result = File; } catch { throw; } return(Result); }