ClientesPaginaGeneralFicheros.cs
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9 
10 using sage.ew.ewbase;
11 using sage.ew.interficies;
13 using sage.ew.formul;
14 
15 namespace sage.ew.cliente.UserControls
16 {
22  {
23  #region PROPIEDADES PRIVADAS
24 
25 
26  #endregion PROPIEDADES PRIVADAS
27 
28 
29  #region PROPIEDADES PUBLICAS
30 
34  public Cliente _oCliente
35  {
36  get { return (Cliente)this._ewMante; }
37  }
38 
39 
43  public string _Cliente
44  {
45  get { return this._ewMante._Codigo; }
46  }
47 
48 
49  #endregion PROPIEDADES PUBLICAS
50 
51 
52  #region CONSTRUCTOR
53 
54 
59  {
60  InitializeComponent();
61  }
62 
63 
69  public ClientesPaginaGeneralFicheros(ewMante toCliente, FormBase loForm = null)
70  {
71  InitializeComponent();
72 
73  if (!this.DesignMode)
74  {
75  this.eventosControles();
76 
77  this._ewMante = toCliente;
78 
79  this._oForm = loForm;
80 
81  this.constructorVarios();
82  }
83  }
84 
85 
89  private void constructorVarios()
90  {
91  // Configurar selector ficheros
92  // Sobre .NET sin FOX esta variable no esta informada
93  string lcIniServ = Convert.ToString(sage.ew.global.EW_GLOBAL._GetVariable("wc_iniservidor")).TrimEnd();
94  if (string.IsNullOrWhiteSpace(lcIniServ))
95  lcIniServ = System.IO.Path.GetTempPath().TrimEnd();
96 
97  this.SelFicheroImagen._PathDestino = lcIniServ + @"COMUNES\FOTOS\";
98 
99 
100  // Pestaña de ficheros asociados si es Hera la eliminamos, no debe salir.
101  // En principio ocultando la pestaña ya deberia ser suficiente para ocultar el resto de controles que hay dentro.
102  //
103  this.ewpanelImagenesArticulo.Visible = false;
104  this.ewImageMante.Visible = true;
105  this.ewImageMante.Dock = DockStyle.Fill;
106 
107  int screenHeight = Screen.PrimaryScreen.Bounds.Height;
108  if (screenHeight <= 900)
109  {
110  ewpanel2.Height -= 85;
111  ewImageMante.Height -= 85;
112  }
113  }
114 
115 
116  #endregion CONSTRUCTOR
117 
118 
119  #region METODOS PROTECTED OVERRIDE
120 
121 
125  protected override void eventosControles()
126  {
127  }
128 
129 
130  #endregion METODOS PROTECTED OVERRIDE
131 
132 
133  #region METODOS PRIVADOS
134 
135 
136  #endregion METODOS PRIVADOS
137 
138 
139  #region METODOS PUBLICOS
140 
141 
146  public override void _BloquearControles(bool llReadOnlyPaginas)
147  {
148  SelFicheroImagen._ReadOnly = llReadOnlyPaginas;
149  ewImageMante._ReadOnly = llReadOnlyPaginas;
150  }
151 
152 
156  public override void _Binding()
157  {
158  // Provoco la recarga del ManteTRel de ficheros si no estuviese cargado con los datos del cliente
159  this.ewImageMante._Imagenes = this._oCliente._TRelImagenes;
160  }
161 
162 
163  #endregion METODOS PUBLICOS
164  }
165 
166 }
Clase de negocio base para mantenimientos
Definition: clsEwBase.cs:1643
Definición de la interfície necesaria para las páginas(tabPage) a utilizar en formularios de tipo For...
Definition: ITabMante.cs:13
override void _Binding()
Bindear los objetos contenidos en la página (interficie ITabMante)
override string _Codigo
PE-102491: override de _Codigo para que en el Set podamos convertir el número que nos llega a código ...
Usercontrol para la subpestaña "Ficheros asociados" de la pestaña "General" del formulario frmCliente...
Clase EW_GLOBAL para gestionar las variables públicas de Eurowin, variables de empresa, variables de anchuras de campo, variables de mascaras, etc.
Definition: EW_GLOBAL.cs:46
ClientesPaginaGeneralFicheros(ewMante toCliente, FormBase loForm=null)
Constructor
Formulario base de Eurowin
Definition: clsFormul.cs:400
override void eventosControles()
Programación de eventos de los controles contenido en este UserControl.
override void _BloquearControles(bool llReadOnlyPaginas)
Bloquear controles del usercontrol (interficie ITabMante)
Clase base para usercontrols en los que se alojará todo el contenido de determinadas pestañas de mant...