2 using System.Collections.Generic;
3 using System.ComponentModel;
25 #region PROPIEDADES PRIVADAS 31 private bool _lReadOnly =
false;
34 #endregion PROPIEDADES PRIVADAS 37 #region PROPIEDADES PUBLICAS 45 get {
return (
Empresa)this._ewMante; }
52 public string _Empresa
54 get {
return this._ewMante.
_Codigo; }
58 #endregion PROPIEDADES PUBLICAS 72 InitializeComponent();
76 this.eventosControles();
77 this.constructorVarios();
92 InitializeComponent();
96 this.eventosControles();
98 this._ewMante = toEmpresa;
100 this._oForm = loForm;
102 this.constructorVarios();
110 private void constructorVarios()
116 #endregion CONSTRUCTOR 119 #region METODOS PROTECTED OVERRIDE 134 #endregion METODOS PROTECTED OVERRIDE 137 #region METODOS PRIVADOS 186 private void crearDirectorioLibros()
188 string lcRutaServidor = Convert.ToString(EW_GLOBAL._GetVariable(
"wc_iniservidor"));
189 if (!
string.IsNullOrEmpty(lcRutaServidor))
191 string lcRutaLibros = Path.Combine(lcRutaServidor.ToUpper(),
"LIBROS\\");
192 if (!Directory.Exists(lcRutaLibros))
193 Directory.CreateDirectory(lcRutaLibros);
200 #endregion METODOS PRIVADOS 203 #region MÉTODOS PUBLICOS OVERRIDE 212 this._lReadOnly = llReadOnlyPaginas;
214 this.ewtxtCodRegistro.ReadOnly = llReadOnlyPaginas;
215 this.ewtxtNumeroTomo.ReadOnly = llReadOnlyPaginas;
216 this.ewtxtNumLibro.ReadOnly = llReadOnlyPaginas;
217 this.ewtxtNumSeccion.ReadOnly = llReadOnlyPaginas;
218 this.ewtxtNumFolio.ReadOnly = llReadOnlyPaginas;
219 this.ewtxtNumHoja.ReadOnly = llReadOnlyPaginas;
220 this.ewtxtTipoRegPublico.ReadOnly = llReadOnlyPaginas;
221 this.ewtxtOtros.ReadOnly = llReadOnlyPaginas;
222 this.ewtxtRegMercantil.ReadOnly = llReadOnlyPaginas;
224 this.txtRutaLegaLibros._ReadOnly = llReadOnlyPaginas;
235 this.ewtxtCodRegistro.DataBindings.Clear();
236 this.ewtxtNumeroTomo.DataBindings.Clear();
237 this.ewtxtNumLibro.DataBindings.Clear();
238 this.ewtxtNumSeccion.DataBindings.Clear();
239 this.ewtxtNumFolio.DataBindings.Clear();
240 this.ewtxtNumHoja.DataBindings.Clear();
241 this.ewtxtTipoRegPublico.DataBindings.Clear();
242 this.ewtxtOtros.DataBindings.Clear();
243 this.ewtxtRegMercantil.DataBindings.Clear();
244 this.txtRutaLegaLibros.DataBindings.Clear();
247 if (!
string.IsNullOrWhiteSpace(this._oEmpresa._Codigo))
251 if (
string.IsNullOrWhiteSpace(this._oEmpresa._RutaLibros))
258 this.crearDirectorioLibros();
262 string lcIniServidor = Path.Combine(Convert.ToString(EW_GLOBAL._GetVariable(
"wc_iniservidor")).ToUpper(),
"LIBROS\\");
263 this._oEmpresa._RutaLibros = lcIniServidor;
265 this.txtRutaLegaLibros.DataBindings.Clear();
266 this.txtRutaLegaLibros.DataBindings.Add(
"_Text", this._oEmpresa,
"_RutaLibros",
true);
267 this.txtRutaLegaLibros.Refresh();
271 this.bindearControlPropiedadMante(ewtxtCodRegistro, _ewMante, nameof(ewtxtCodRegistro.Text), nameof(this._oEmpresa._CodigoAdministracion));
272 this.bindearControlPropiedadMante(ewtxtNumeroTomo, _ewMante, nameof(ewtxtNumeroTomo.Text), nameof(this._oEmpresa._NumeroTomoRegistro));
273 this.bindearControlPropiedadMante(ewtxtNumLibro, _ewMante, nameof(ewtxtNumLibro.Text), nameof(this._oEmpresa._NumeroLibroRegistro));
274 this.bindearControlPropiedadMante(ewtxtNumSeccion, _ewMante, nameof(ewtxtNumSeccion.Text), nameof(this._oEmpresa._NumeroSeccionRegistro));
275 this.bindearControlPropiedadMante(ewtxtNumFolio, _ewMante, nameof(ewtxtNumFolio.Text), nameof(this._oEmpresa._NumeroFolioRegistro));
276 this.bindearControlPropiedadMante(ewtxtNumHoja, _ewMante, nameof(ewtxtNumHoja.Text), nameof(this._oEmpresa._NumeroHojaRegistro));
277 this.bindearControlPropiedadMante(ewtxtTipoRegPublico, _ewMante, nameof(ewtxtTipoRegPublico.Text), nameof(this._oEmpresa._TipoRegistroPublico));
278 this.bindearControlPropiedadMante(ewtxtOtros, _ewMante, nameof(ewtxtOtros.Text), nameof(this._oEmpresa._OtrosRegistro));
279 this.bindearControlPropiedadMante(ewtxtRegMercantil, _ewMante, nameof(ewtxtRegMercantil.Text), nameof(this._oEmpresa._RegistroMercantil));
280 this.bindearControlPropiedadMante(txtRutaLegaLibros, _ewMante, nameof(txtRutaLegaLibros._Text), nameof(this._oEmpresa._RutaLibros));
284 this.ewtxtCodRegistro.Text =
"";
285 this.ewtxtNumeroTomo.Text =
"";
286 this.ewtxtNumLibro.Text =
"";
287 this.ewtxtNumSeccion.Text =
"";
288 this.ewtxtNumFolio.Text =
"";
289 this.ewtxtNumHoja.Text =
"";
290 this.ewtxtTipoRegPublico.Text =
"";
291 this.ewtxtOtros.Text =
"";
292 this.ewtxtRegMercantil.Text =
"";
293 this.txtRutaLegaLibros._Text =
"";
308 switch (tcNombreDato)
310 case "NmbreDatoConsultar":
322 #endregion MÉTODOS PUBLICOS OVERRIDE Clase de negocio base para mantenimientos
Definición de la interfície necesaria para las páginas(tabPage) a utilizar en formularios de tipo For...
Classe empresa basada en sage.ew.ewmante
EmpresaPaginaGeneralDatosRegistrales()
Constructor vacío.
EmpresaPaginaGeneralDatosRegistrales(ewMante toEmpresa, FormBase loForm=null)
Constructor
Usercontrol para la pestaña "General" –> "Datos registrales" del formulario frmEmpresa. Debe cumpliar ITabMante (_ewMante, _ BloquearControles(), _Binding())
override string _Codigo
Sobreescribe el metodo _Codigo para cargar la configuración del TPV cuando se estableza el valor del ...
override object _ObtenerDato(string tcNombreDato)
Responde a la ficha de empresa cuando ésta le consulta al usercontrol de pestaña General.DatosRegistrales por el valor de algún dato interno de la pestaña.
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).
_EstadosMantenimiento
Declaro un enum para los estados del mantenimiento.
override void _Binding()
Bindear los objetos contenidos en la página (interficie ITabMante)