EtiquetasCliente.cs
2 using sage.ew.global;
4 using sage.ew.reports;
5 using System;
6 using System.Collections.Generic;
7 using System.Data;
8 using System.IO;
9 using System.Linq;
10 using System.Windows.Forms;
11 using System.Xml;
12 
13 namespace sage.ew.cliente.Clases
14 {
15 
19  public class EtiquetasCliente
20  {
21  #region PROPIEDADES
22 
26  public const string _cPathBase = @"\reports\sage.ew.reports\etiquetas\base\";
27 
31  public const string _cPathPersonalizado = @"\reports\sage.ew.reports\etiquetas\personalizados\";
32 
36  public const string _cReportBase = "template.template";
37 
38  private string _cPathEtiquetas = string.Empty;
39 
43  public string _TipoEtiqueta
44  {
45  get
46  {
47  return _cTipoEtiqueta;
48  }
49  set
50  {
51  _cTipoEtiqueta = value;
52  }
53  }
54  private string _cTipoEtiqueta = string.Empty;
55 
59  public List<EtiquetaCliente> _EtiquetasCliente = new List<EtiquetaCliente>();
60 
61  private string _cTerminalActual = Convert.ToString(EW_GLOBAL._GetVariable("wc_terminal")).ToString().Trim();
62 
63  private DataTable ldtEtiqueta = new DataTable();
64 
65  private IEtiquetasClienteDA _etiquetasClienteDA;
66 
67  #endregion
68 
69  #region PUBLIC METHODS
70 
75  {
77  }
78 
84  public DataTable _GetDirecciones(string tcCodigo)
85  {
86  DataTable table = new DataTable();
87 
88  table = _etiquetasClienteDA.GetDirecciones(tcCodigo);
89 
90  return table;
91  }
92 
98  public DataTable _GetContactos(string tcCodigo)
99  {
100  DataTable table = new DataTable();
101 
102  table = _etiquetasClienteDA.GetContactos(tcCodigo);
103 
104  return table;
105  }
106 
110  public void _Load()
111  {
112  ldtEtiqueta = new DataTable();
113  string lcEtiqueta = string.Empty;
114 
115  //inicializar de nuevo la lista de etiquetas
116  _EtiquetasCliente = new List<EtiquetaCliente>();
117 
118  //buscar en la carpeta lcPathEuroterm \reports\etiquetas\_TipoEtiqueta
119  if (string.IsNullOrWhiteSpace(_TipoEtiqueta))
120  return;
121 
122  //Cargar otras propiedades de cada etiqueta a partir de la tabla Etiquetas de Comunes, campo Config
123  ldtEtiqueta = _etiquetasClienteDA.Load(_TipoEtiqueta, "");
124 
125  ComprobarEtiquetaTerminalActual(ldtEtiqueta);
126 
127  ldtEtiqueta = _etiquetasClienteDA.Load(_TipoEtiqueta, "");
128 
129  //Ruta base de les etiquetes: euroserv + pathbase + tipoetiqueta
130  _cPathEtiquetas = Convert.ToString(EW_GLOBAL._GetVariable("wc_iniservidor")).ToString().Trim() + _cPathBase + _TipoEtiqueta + @"\";
131 
132  //buscar los ficheros de extensión ".report"
133  string[] filePaths = { };
134  try
135  {
136  filePaths = Directory.GetFiles(_cPathEtiquetas, "*.report")
137  .Select(path => Path.GetFileNameWithoutExtension(path))
138  .ToArray();
139  }
140  catch (Exception ex)
141  {
142  //TODO : Que fem quan no trobem els recursos o el path del servidor es incorrecte?
143  sage.ew.functions.FUNCTIONS._MessageBox(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
144  return;
145  }
146 
147  foreach (DataRow ldrRow in ldtEtiqueta.Rows)
148  {
149  lcEtiqueta = Convert.ToString(ldrRow["nombre"]).Trim();
150 
151  string lcRutaPersonalizado = Convert.ToString(EW_GLOBAL._GetVariable("wc_iniservidor")).ToString().Trim() + _cPathPersonalizado + _TipoEtiqueta + @"\";
152 
153  // Primer mirar al personalizado
154  _cPathEtiquetas = lcRutaPersonalizado;
155 
156  if (!File.Exists(_cPathEtiquetas + lcEtiqueta + ".report"))
157  //path de las etiquetas
158  _cPathEtiquetas = Convert.ToString(EW_GLOBAL._GetVariable("wc_iniservidor")).ToString().Trim() + _cPathBase + _TipoEtiqueta + @"\";
159 
160 
161  if (File.Exists(_cPathEtiquetas + lcEtiqueta + ".report"))
162  {
163  EtiquetaCliente loEtiqueta = new EtiquetaCliente();
164  loEtiqueta._TipoEtiqueta = _TipoEtiqueta;
165  loEtiqueta._Nombre = lcEtiqueta;
166 
167  //cargamos las propiedades de la etiqueta de la configuración del XML
168  XmlDocument doc = new XmlDocument();
169  doc.LoadXml(ldrRow["config"].ToString());
170  XmlElement root = doc.DocumentElement;
171  XmlNodeList nodes = root.SelectNodes("//*"); //obtener todos los nodos
172  foreach (XmlNode node in nodes)
173  {
174  switch (node.Name)
175  {
176  case "impresora":
177  loEtiqueta._Impresora = node.InnerText;
178  break;
179 
180  case "impresoraEtiqueta":
181  loEtiqueta._ImpresoraEtiqueta = Convert.ToBoolean(node.InnerText);
182  break;
183 
184  case "predeterminada":
185  loEtiqueta._Predeterminada = Convert.ToBoolean(node.InnerText);
186  break;
187  }
188  }
189 
190  _EtiquetasCliente.Add(loEtiqueta);
191  }
192  }
193 
194  bool llTrobat = false;
195  foreach (string lcFile in filePaths)
196  {
197  llTrobat = false;
198  foreach (EtiquetaCliente item in _EtiquetasCliente)
199  {
200  if (item._Nombre == lcFile)
201  {
202  llTrobat = true;
203  break;
204  }
205 
206  }
207 
208  if (!llTrobat)
209  {
210  EtiquetaCliente loEtiqueta = new EtiquetaCliente();
211  loEtiqueta._TipoEtiqueta = _TipoEtiqueta;
212  loEtiqueta._Nombre = lcFile;
213  _EtiquetasCliente.Add(loEtiqueta);
214  }
215  }
216  }
217 
218  #endregion PUBLIC METHODS
219 
220  #region PRIVATE METHODS
221 
222  private void ComprobarEtiquetaTerminalActual(DataTable ldtEtiqueta)
223  {
224  DataTable ldtEtiqTerminal = new DataTable();
225 
226  if (ldtEtiqueta != null && ldtEtiqueta.Rows.Count > 0)
227  {
228  List<string> valoresNombre = ldtEtiqueta.AsEnumerable()
229  .Select(d => d.Field<string>("nombre")).Distinct().ToList();
230 
231  if (valoresNombre.Count > 0)
232  {
233  var nombresTerminal = ldtEtiqueta.AsEnumerable().Where(r => r.Field<string>("terminal").ToString().Trim() == _cTerminalActual).Select(g => g.Field<string>("nombre")).ToList();
234  if (nombresTerminal.Count != valoresNombre.Count)
235  {
236  foreach (string loVal in valoresNombre)
237  {
238  if (!nombresTerminal.Contains(loVal))
239  {
240  DataRow loRegistro = ldtEtiqueta.AsEnumerable().Where(r => r.Field<string>("nombre").ToString() == loVal).Select(g => g).FirstOrDefault();
241  if (loRegistro != null)
242  {
243  _etiquetasClienteDA.Insert(loRegistro, _TipoEtiqueta);
244  }
245  }
246  }
247  }
248  }
249  }
250  }
251 
252  #endregion PRIVATE METHODS
253 
254 
255  #region classes
256 
260  public class EtiquetaCliente : interficies.IEtiquetasPropiedades
261  {
262  #region PROPIEDADES
263 
264  private string _cPathEtiquetas = string.Empty;
265 
266  private string _cNombre = string.Empty;
267  private string _cImpresora = string.Empty;
268  private bool _bImpresoraEtiqueta = false;
269  private bool _bPredeterminada = false;
270  private string _cTipoEtiqueta = string.Empty;
271  private string _cReportBase = EtiquetasCliente._cReportBase;
272 
273  private IEtiquetasClienteDA _etiquetasClienteDA;
274 
278  private List<string> _lstFields = new List<string>()
279  {
280  "codigo", "definicion", "direccion", "postal", "poblacion", "provincia", "contacto"
281  };
282 
287  public DataTable _DataTable
288  {
289  get
290  {
291  //PE-87024: inicializamos el Datatable vacío con los campos de la lista
292  if (_oDataTable.Columns.Count == 0)
293  {
294  foreach (string field in _lstFields)
295  {
296  _oDataTable.Columns.Add(field);
297  }
298  _oDataTable.TableName = _cTableName; //nombre fijo para utilizar luego en todas las etiquetas de sage report
299  }
300  return _oDataTable;
301  }
302  set
303  {
304  _oDataTable = value;
305  }
306  }
307  private DataTable _oDataTable = new DataTable();
311  private string _cTableName = "cliente";
312 
316  public string _TipoEtiqueta
317  {
318  get
319  {
320  return _cTipoEtiqueta;
321  }
322  set
323  {
324  _cTipoEtiqueta = value.ToLower();
325  }
326  }
327 
331  public string _ReportBase
332  {
333  get
334  {
335  return _cReportBase;
336  }
337  set
338  {
339  _cReportBase = value;
340  }
341  }
342 
343 
347  public string _Nombre
348  {
349  get
350  {
351  return _cNombre;
352  }
353  set
354  {
355  _cNombre = value.ToLower();
356  }
357  }
358 
362  public string _Impresora
363  {
364  get
365  {
366  return _cImpresora;
367  }
368  set
369  {
370  _cImpresora = value;
371  }
372  }
373 
377  public bool _ImpresoraEtiqueta
378  {
379  get
380  {
381  return _bImpresoraEtiqueta;
382  }
383  set
384  {
385  _bImpresoraEtiqueta = value;
386  }
387  }
388 
392  public bool _Predeterminada
393  {
394  get
395  {
396  return _bPredeterminada;
397  }
398  set
399  {
400  _bPredeterminada = value;
401  }
402  }
403 
404  #endregion
405 
406  #region CONSTRUCTORS
407 
412  {
413  _etiquetasClienteDA = DependencyInjector.Instance.Retrieve<IEtiquetasClienteDA>();
414  }
415 
416  //PE-99647 Asumir la impresión de etiquetas de envio
421  public EtiquetaCliente(List<string> tlisCampos)
422  {
423  _etiquetasClienteDA = DependencyInjector.Instance.Retrieve<IEtiquetasClienteDA>();
424 
425  //Sobreescribo la lista de campos prefijados
426  _lstFields = tlisCampos;
427 
428  }
429 
430  #endregion
431 
432  #region PUBLIC METHODS
433 
437  public void _Save()
438  {
439  string lcSql = string.Empty;
440  DataTable ldtEtiqueta = new DataTable();
441  string lcXmlConfig = string.Empty;
442 
443 
444  //En caso de que la etiqueta esté marcada como predeterminada habremos de desmarcar todas las demás del mismo tipo como predeterminadas.
445  //y cuando se guarde la etiqueta actual estaremos seguros que es la única Predeterminada
446  if (this._Predeterminada)
447  {
448  DataTable ldtEtiquetasTipo = new DataTable();
449 
450  EtiquetasCliente loEtiquetasCliente = new EtiquetasCliente();
451  loEtiquetasCliente._TipoEtiqueta = _TipoEtiqueta;
452  loEtiquetasCliente._Load();
453 
454  foreach (EtiquetaCliente e in loEtiquetasCliente._EtiquetasCliente)
455  {
456  e._Predeterminada = false;
457  e._Save();
458  }
459  }
460 
461  ldtEtiqueta = _etiquetasClienteDA.Load(_TipoEtiqueta, _Nombre);
462  lcXmlConfig = _EtiquetaConfigToXml();
463 
464  if (ldtEtiqueta != null && ldtEtiqueta.Rows.Count > 0)
465  {
466 
467  _etiquetasClienteDA.Update(_TipoEtiqueta, _Nombre, lcXmlConfig);
468 
469  }
470  else
471  {
472  _etiquetasClienteDA.Insert(_TipoEtiqueta, _Nombre, lcXmlConfig);
473 
474 
475  }
476  }
477 
481  public void _Design()
482  {
483  //Sage Reports
484 
485  botones.Clases.btImprimir btImprimir1 = new botones.Clases.btImprimir();
486 
487  //establecemos tipo de report Etiqueta
488  btImprimir1._TipoReport = Report.TipoReport.Etiqueta;
489  //establecemos el tipo de etiqueta y el nombre para saber el report y su carpeta
490  btImprimir1._TipoEtiqueta = _TipoEtiqueta;
491  btImprimir1._Report = _Nombre + ".report";
492 
493  //asignamos un Datatable vacío con todos los campos para poder hacer un design del report
494  btImprimir1._DataTable = _DataTable;
495  btImprimir1._Title = btImprimir1._DataTable.TableName;
496 
497  btImprimir1._Filtros.Clear();
498 
499  btImprimir1._Edit();
500  }
501 
506  public void _Print()
507  {
508  //Sage Reports
509  botones.Clases.btImprimir btImprimir1 = new botones.Clases.btImprimir();
510  btImprimir1._TipoReport = Report.TipoReport.Etiqueta;
511  //establecemos el tipo de etiqueta y el nombre para saber el report y su carpeta
512  btImprimir1._TipoEtiqueta = _TipoEtiqueta;
513  btImprimir1._Report = _Nombre + ".report";
514 
515  btImprimir1._Filtros.Clear();
516 
517  btImprimir1._DataTable = _DataTable;
518  btImprimir1._Title = "cliente";
519 
520  btImprimir1._Printer = _Impresora;
521 
522  btImprimir1._Print();
523  }
524 
529  public bool _Comprobar()
530  {
531 
532  // Comprobar si ya existe la etiqueta, que estamos creando
533  // Las etiquetas se guardan en el servidor, por lo que ya no es importante el terminal y el usuario
534  DataTable ldtEtiqueta = _etiquetasClienteDA.Load(_TipoEtiqueta, _Nombre);
535 
536  if (ldtEtiqueta != null && ldtEtiqueta.Rows.Count > 0)
537  return false;
538 
539 
540  string lcRutaPersonalizado = Convert.ToString(EW_GLOBAL._GetVariable("wc_iniservidor")).ToString().Trim() + _cPathPersonalizado + _TipoEtiqueta + @"\";
541 
542  // Primer mirar al personalizado
543  _cPathEtiquetas = lcRutaPersonalizado;
544 
545  if (!File.Exists(_cPathEtiquetas + _ReportBase))
546  //path de las etiquetas
547  _cPathEtiquetas = Convert.ToString(EW_GLOBAL._GetVariable("wc_iniservidor")).ToString().Trim() + _cPathBase + _TipoEtiqueta + @"\";
548 
549  //si el fichero no existe, copiamos
550  //copiar el Sage Reports standar para el tipo concreto
551  if (File.Exists(_cPathEtiquetas + _ReportBase))
552  {
553 
554  //si no existe la carpeta temporal la creamos
555  if (!(Directory.Exists(lcRutaPersonalizado)))
556  {
557  Directory.CreateDirectory(lcRutaPersonalizado);
558  }
559 
560  if (Directory.Exists(lcRutaPersonalizado))
561  {
562  File.Copy(_cPathEtiquetas + _ReportBase, lcRutaPersonalizado + _Nombre + ".report", true);
563 
564  _Treure_Solo_Lectura(lcRutaPersonalizado + _Nombre + ".report");
565  }
566  }
567 
568  return true;
569  }
570 
574  public void _Delete()
575  {
576 
577  // Primer mirar al personalizado
578  _cPathEtiquetas = Convert.ToString(EW_GLOBAL._GetVariable("wc_iniservidor")).ToString().Trim() + _cPathPersonalizado + _TipoEtiqueta + @"\";
579 
580  if (!File.Exists(_cPathEtiquetas + _Nombre + ".report"))
581  //path de las etiquetas
582  _cPathEtiquetas = Convert.ToString(EW_GLOBAL._GetVariable("wc_iniservidor")).ToString().Trim() + _cPathBase + _TipoEtiqueta + @"\";
583  else
584  {
585  //borrar fichero de report, NOMÉS els PERSONALIZADOS
586  if (File.Exists(_cPathEtiquetas + _Nombre + ".report"))
587  {
588  _Treure_Solo_Lectura(_cPathEtiquetas + _Nombre + ".report"); // 90318
589 
590  File.Delete(_cPathEtiquetas + _Nombre + ".report");
591  }
592  }
593 
594 
595  _etiquetasClienteDA.Delete(_TipoEtiqueta, _Nombre);
596 
597  }
598 
602  public DialogResult _Show()
603  {
604  //lanzar el formulario frmEtiquetasPropiedades con la propia etiqueta
605  formul.Forms.frmEtiquetasPropiedades loForm = new formul.Forms.frmEtiquetasPropiedades();
606  loForm._Etiqueta = (interficies.IEtiquetasPropiedades)this;
607  loForm._ShowDialog(); //Bug 114218 Cambiar .ShowDialog() por ._ShowDialog()
608  return loForm.DialogResult;
609  }
610 
611  #endregion
612 
613  #region PRIVATE METHODS
614 
619  private string _EtiquetaConfigToXml()
620  {
621  XmlDocument doc = new XmlDocument();
622  XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
623  doc.AppendChild(docNode);
624 
625  XmlNode etiquetaNode = doc.CreateElement("etiqueta");
626  doc.AppendChild(etiquetaNode);
627 
628  //Nombre
629  XmlNode nombreNode = doc.CreateElement("nombre");
630  nombreNode.InnerText = _Nombre;
631  etiquetaNode.AppendChild(nombreNode);
632 
633  //Tipo
634  XmlNode tipoNode = doc.CreateElement("tipo");
635  tipoNode.InnerText = _TipoEtiqueta;
636  etiquetaNode.AppendChild(tipoNode);
637 
638  //Impresora
639  XmlNode impresoraNode = doc.CreateElement("impresora");
640  impresoraNode.InnerText = _Impresora;
641  etiquetaNode.AppendChild(impresoraNode);
642 
643  //ImpresoraEtiqueta
644  XmlNode impresoraEtiquetaNode = doc.CreateElement("impresoraEtiqueta");
645  impresoraEtiquetaNode.InnerText = _ImpresoraEtiqueta.ToString();
646  etiquetaNode.AppendChild(impresoraEtiquetaNode);
647 
648  //Predeterminada
649  XmlNode predeterminadaNode = doc.CreateElement("predeterminada");
650  predeterminadaNode.InnerText = _Predeterminada.ToString();
651  etiquetaNode.AppendChild(predeterminadaNode);
652 
653  return doc.OuterXml;
654  }
655 
656  private void _Treure_Solo_Lectura(String tcFile)
657  {
658  FileAttributes loattributes = File.GetAttributes(tcFile);
659 
660  if ((loattributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
661  {
662  // fico l'arxiu de NO SOLO LECTURA
663  loattributes = loattributes & ~FileAttributes.ReadOnly;
664  File.SetAttributes(tcFile, loattributes);
665  }
666  }
667 
668  #endregion
669  }
670 
674  public class EtiquetaImprimir
675  {
679  private LotesConfig _oLotesConfig = (LotesConfig)EW_GLOBAL._GetVariable("wo_lotesconfig");
680 
681  private IEtiquetasClienteDA _etiquetasClienteDA;
682 
683  #region PROPIEDADES PUBLICAS
684 
688  public bool _Sel { get; set; } = false;
689 
693  public string _Codigo
694  {
695  get
696  {
697  return _cCodigo;
698  }
699  set
700  {
701  if (_cCodigo != value)
702  {
703  _cCodigo = value;
704 
705  _Cliente = new Cliente(value);
706 
707  _Nombre = _Cliente._Nombre;
708 
709  if (!string.IsNullOrWhiteSpace(_Nombre))
710  {
711  _Direccion = _Cliente._Direccion;
712  _Postal = _Cliente._CodPost; ;
713  _Poblacion = _Cliente._Poblacion;
714  _Provincia = _Cliente._Provincia;
715  _Contacto = _Cliente._Contacto;
716 
717  _Etiquetas = 1;
718  }
719  }
720  }
721  }
722  private string _cCodigo = string.Empty;
723 
727  public string _Nombre { get; set; } = string.Empty;
728 
729 
730 
734  public string _Direccion { get; set; } = string.Empty;
735 
739  public string _Postal { get; set; } = string.Empty;
740 
744  public string _Poblacion { get; set; } = string.Empty;
745 
749  public string _Provincia { get; set; } = string.Empty;
750 
754  public string _Contacto { get; set; } = string.Empty;
755 
759  public int _Etiquetas { get; set; } = 0;
760 
761  internal Cliente _Cliente { get; set; } = new Cliente();
762 
763 
764 
765  #endregion PROPIEDADES PUBLICAS
766 
771  {
772  _etiquetasClienteDA = DependencyInjector.Instance.Retrieve<IEtiquetasClienteDA>();
773  }
774 
775 
779  public EtiquetaImprimir(Cliente toCliente, int tnEnv_Cli, int tnEtiquetas)
780  {
781  _etiquetasClienteDA = DependencyInjector.Instance.Retrieve<IEtiquetasClienteDA>();
782 
783  _Sel = true;
784 
785  _cCodigo = toCliente._Codigo;
786  _Nombre = toCliente._Nombre;
787 
788  if (tnEtiquetas < 0)
789  {
790  tnEtiquetas = 0;
791  }
792  _Etiquetas = tnEtiquetas;
793 
794  _Cliente = toCliente;
795 
796  if (tnEnv_Cli > 0)
797  {
798  Dictionary<string, object> loDic = toCliente._Direccion_Predeterminada(tnEnv_Cli);
799 
800  _Direccion = loDic["direccion"].ToString();
801  _Postal = loDic["codpos"].ToString();
802  _Poblacion = loDic["poblacion"].ToString();
803  _Provincia = loDic["provincia"].ToString();
804  }
805  else
806  {
807  _Direccion = _Cliente._Direccion;
808  _Postal = _Cliente._CodPost; ;
809  _Poblacion = _Cliente._Poblacion;
810  _Provincia = _Cliente._Provincia;
811  }
812 
813  _Contacto = _Cliente._Contacto;
814  }
815 
819  public EtiquetaImprimir(DataRow tdrLin)
820  {
821  _etiquetasClienteDA = DependencyInjector.Instance.Retrieve<IEtiquetasClienteDA>();
822 
823  _Sel = Convert.ToBoolean(tdrLin["SELECCIONADAS"]);
824 
825  _Codigo = Convert.ToString(tdrLin["CLIENTE"]).Trim();
826  _Nombre = Convert.ToString(tdrLin["DEFINICION"]).Trim();
827 
828  _Cliente = new Cliente(_Codigo);
829 
830  if (string.IsNullOrWhiteSpace(_Nombre))
831  {
832  _Nombre = _Cliente._Nombre;
833  }
834 
835  _Direccion = _Cliente._Direccion;
836  _Postal = _Cliente._CodPost; ;
837  _Poblacion = _Cliente._Poblacion;
838  _Provincia = _Cliente._Provincia;
839  _Contacto = _Cliente._Contacto;
840 
841 
842  _Etiquetas = Convert.ToInt32(tdrLin["ETIQUETAS"]);
843 
844  }
845  }
846 
847  #endregion
848  }
849 
850 }
string _TipoEtiqueta
propiedad publica para el tipo de etiqueta a partir del cual se cargaran las etiquetas en _Load ...
bool _Predeterminada
nos indica que es la impresora predeterminada
DataTable Load(string tcTipoEtiqueta, string tcNombre)
Método para cargar los registros de las etiquetas
EtiquetaImprimir()
Inicializa una nueva instancia de la clase LotePesadas
override string _Codigo
PE-102491: override de _Codigo para que en el Set podamos convertir el número que nos llega a código ...
EtiquetaImprimir(Cliente toCliente, int tnEnv_Cli, int tnEtiquetas)
Inicializa una nueva instancia de la clase EtiquetaImprimir
object Retrieve(Type T)
Resuelve objeto de tipo T
override string _Nombre
Nombre del cliente a partir del campo NOMBRE de la tabla CLIENTES de la base de datos de GESTION de E...
void _Save()
método _Save para guardar en la base de datos las propiedades de la Etiqueta en la tabla de COMUNES!E...
bool _Comprobar()
Método para comprobar si la etiqueta es correcta
DataTable GetContactos(string tcCodigo)
Método para cargar los contactos del cliente
Clase para la gestión de las etiquetas de cliente
Clase para cargar la configuración del módulo de LOTES
Definition: LotesConfig.cs:12
bool Delete(string tcTipoEtiqueta, string tcNombre)
Método para eliminar los registros de las etiquetas
void _Print()
Método para lanzar la impresión de la Etiqueta a partir de un DataTable El datatable debe tener los c...
Dictionary< string, object > _Direccion_Predeterminada(int tnDireccion=0)
Devuelve en un diccionario la dirección predeterminada del cliente
Clase para uso de funciones genéricas
Definition: functions.cs:146
const string _cReportBase
Report base del que se copiaran los nuevos reports
EtiquetaImprimir(DataRow tdrLin)
Inicializa una nueva instancia de la clase EtiquetaImprimir
DataTable _GetDirecciones(string tcCodigo)
Método para cargar las direcciones del cliente
DataTable _GetContactos(string tcCodigo)
Método para cargar los contactos del cliente
TipoReport
Enum para saber TipoReport
Definition: Report.cs:57
EtiquetaCliente(List< string > tlisCampos)
Constructor con parámetros
DataTable GetDirecciones(string tcCodigo)
Método para cargar las direcciones del cliente
bool Insert(DataRow loRegistro, string TipoEtiqueta)
Método para la inserción de registros
void _Load()
método para cargar la lista de etiquetas en _Etiquetas a partir del _TipoEtiqueta ...
void _Design()
Método para lanzar el diseño de la Etiqueta
void _Delete()
borrar una etiqueta (borrar de la tabla etiquetas y borrar el fichero .report)
bool Update(string tcTipoEtiqueta, string tcNombre, string tcXml)
Método para la actualización de registros
Clase Inyector de dependencias para resolver las dependencias
DialogResult _Show()
Método para lanzar el formulario frmEtiquetasPropiedades