FtpUserData.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 namespace sage.addons.offline.Negocio.Clases
7 {
8  internal class FtpUserData : IEquatable<FtpUserData>
9  {
10  public string server { get; set; } = string.Empty;
11  public string user { get; set; } = string.Empty;
12  public string password { get; set; } = string.Empty;
13  public decimal port { get; set; } = 21;
14  public string proxy { get; set; } = string.Empty;
15  public bool ftp_activo { get; set; } = true;
16  public string rutaserv { get; set; } = string.Empty;
17  public string carpetaserv { get; set; } = string.Empty;
18  public bool use_ssl_tls { get; set; } = false;
19  public bool validate_server_cert { get; set; } = false;
20  protected internal string error_message { get; set; } = string.Empty;
21 
27  public bool Equals(FtpUserData other)
28  {
29  return server.Equals(other.server) &&
30  user.Equals(other.user) &&
31  password.Equals(other.password) &&
32  port.Equals(other.port) &&
33  proxy.Equals(other.proxy) &&
34  rutaserv.Equals(other.rutaserv) &&
35  ftp_activo.Equals(other.ftp_activo) &&
36  use_ssl_tls.Equals(other.use_ssl_tls) &&
37  validate_server_cert.Equals(other.validate_server_cert);
38  }
39 
44  public string ToRemoteUri()
45  {
46  string lcRemoteUri = $"{server}:{port}";
47 
48  if (!lcRemoteUri.StartsWith("ftp:"))
49  {
50  lcRemoteUri = "ftp://" + lcRemoteUri;
51  }
52 
53  return lcRemoteUri;
54  }
55  }
56 }
Es como el tipo de entrada asientos pero por negocio, sin formulario, pq quiero que me haga las propu...