2 using System.Collections.Generic;
7 using System.ComponentModel;
31 public delegate
void _Click_Before_Handler(
object sender, ref Boolean tlOk);
41 private string _cEmpresa =
string.Empty;
42 private string _cLetra =
string.Empty;
43 private string _cNumero =
string.Empty;
54 return _eTipoDocumentoGeneral;
58 _eTipoDocumentoGeneral = value;
59 switch (_eTipoDocumentoGeneral)
62 this.Text =
"Ver depósito de venta";
65 this.Text =
"Ver depósito de compra";
75 public string _Empresa
79 if (EW_GLOBAL._EsEjecutable &&
string.IsNullOrWhiteSpace(_cEmpresa))
80 _cEmpresa = Convert.ToString(EW_GLOBAL._GetVariable(
"wc_empresa"));
94 public virtual string _Letra
98 return _cLetra.Trim().PadRight(2);
102 _cLetra = value.Trim().PadRight(2);
110 public virtual string _Numero
114 if (_cNumero != null)
115 _cNumero.Trim().PadLeft(10);
121 _cNumero = value.Trim().PadLeft(10);
125 #region Constructores 135 this.Text =
"Ver depósito de venta";
136 this.Size =
new System.Drawing.Size(140, 40);
137 this.Click +=
new EventHandler(btNavegarDeposito_Click);
145 this._eTipoDocumentoGeneral = toTipoDocumentoGeneral;
147 switch (toTipoDocumentoGeneral)
150 this.Text =
"Ver depósito de venta";
153 this.Text =
"Ver depósito de compra";
157 this.Size =
new System.Drawing.Size(140, 40);
158 this.Click +=
new EventHandler(btNavegarDeposito_Click);
169 this.Text =
"Ver depósito de venta";
170 this.Size =
new System.Drawing.Size(140, 40);
175 this._cEmpresa = tcEmpresa;
176 this._cNumero = tcNumero;
177 this._cLetra = tcLetra;
179 this.Click +=
new EventHandler(btNavegarDeposito_Click);
182 #endregion Constructores 189 private void btNavegarDeposito_Click(
object sender, EventArgs e)
194 Raise_Click_Before(ref llOk);
195 if (llOk ==
false)
return;
197 switch (this._eTipoDocumentoGeneral)
202 loForm._Mantener_Ejecucion =
true;
203 loForm._Documento._Load(_Empresa, _Numero, _Letra);
204 loForm._ShowDialog();
210 loForm._Mantener_Ejecucion =
true;
211 loForm._Documento._Load(_Empresa, _Numero);
212 loForm._ShowDialog();
224 private void Raise_Click_Before(ref
bool tlOk)
226 var handler = _Click_Before;
229 handler(
this, ref tlOk);
btNavegarDeposito(eTipoDocumentoGeneral toTipoDocumentoGeneral)
Constructor pasando el tipo de documento general (ventas/compras)
Interfaz para garantizar la presencia de los campos Empresa, Numero, Letra con fines de tratamientos ...
Clase de navegación a depósito de venta
btNavegarDeposito(string tcNumero, string tcLetra="", string tcEmpresa="")
si no es passa l'empresa s'agafa el valor de wc_empresa
eTipoDocumentoGeneral
Enumeración pública para definir las diferentes categorias que tenemos de documentos (ventas...
_Click_Before_Handler _Click_Before
_Click_Before_Handler
btNavegarDeposito()
Constructor