2 using System.Collections.Generic;
10 using System.Windows.Forms;
11 using System.ComponentModel;
27 public docsven.UserControls.gridArtDocVenta _GridArt
29 get {
return _oGridArt; }
30 set { _oGridArt = value; }
32 private docsven.UserControls.gridArtDocVenta _oGridArt;
37 public dynamic _Documento
39 get {
return _oDocumento; }
40 set { _oDocumento = value; }
42 private dynamic _oDocumento;
47 public dynamic _DocLinea
49 get {
return _oDocLinea; }
50 set { _oDocLinea = value; }
52 private dynamic _oDocLinea = null;
54 private dynamic _oLinea;
60 get {
return _oLinea; }
61 set { _oLinea = value; }
76 get {
return this._oFont; }
79 if (value is Font && value != null)
86 private Font _oFont =
new Font(
"Arial", 9.5f);
99 [DefaultValue(
"Desmarcar entregada")]
100 public string _TextoLineaPositivo
102 get {
return this._cTextoLineaPositivo; }
106 this._cTextoLineaPositivo = value;
109 private string _cTextoLineaPositivo =
"Desmarcar entregada";
116 Category(
"Varios_Apariencia"),
117 DefaultValue(typeof(Color),
"Control"),
118 Description(
"Obtiene o establece el color de fondo del control."),
119 DisplayName(
"Color del fondo"),
122 public Color _ForeColorPositivo
124 get {
return this._oForeColorPositivo; }
130 this._oForeColorPositivo = value;
134 private Color _oForeColorPositivo = SystemColors.ControlText;
141 Category(
"Varios_Apariencia"),
142 DefaultValue(typeof(Color),
"Control"),
143 Description(
"Obtiene o establece el color de fondo del control."),
144 DisplayName(
"Color del fondo"),
147 public Color _BackColorPositivo
149 get {
return this._oBackColorPositivo; }
156 this._oBackColorPositivo = value;
160 private Color _oBackColorPositivo = SystemColors.Control;
168 [DefaultValue(
"Marcar entregada")]
169 public string _TextoLineaNegativo
171 get {
return this._cTextoLineaNegativo; }
175 this._cTextoLineaNegativo = value;
178 private string _cTextoLineaNegativo =
"Marcar entregada";
186 Category(
"Varios_Apariencia"),
187 DefaultValue(typeof(Color),
"Control"),
188 Description(
"Obtiene o establece el color de fondo del control."),
189 DisplayName(
"Color del fondo"),
192 public Color _ForeColorNegativo
194 get {
return this._oForeColorNegativo; }
200 this._oForeColorNegativo = value;
204 private Color _oForeColorNegativo = SystemColors.ControlText;
212 Category(
"Varios_Apariencia"),
213 DefaultValue(typeof(Color),
"Control"),
214 Description(
"Obtiene o establece el color de fondo del control."),
215 DisplayName(
"Color del fondo"),
218 public Color _BackColorNegativo
220 get {
return this._oBackColorNegativo; }
226 this._oBackColorNegativo = value;
230 private Color _oBackColorNegativo = Color.Aqua;
240 this.Text =
"Entregar línea";
242 this.Click +=
new EventHandler(btEntrega_Click);
252 if (this._Documento == null)
256 if (!_Documento._Cabecera._Reservar)
258 _Documento._MessageBox(
"No se puede entregar material, si el documento no está reservado.", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, DialogResult.OK);
264 dynamic loLineaActual = null;
265 if (_oDocLinea != null)
267 loLineaActual = _oDocLinea;
271 loLineaActual = _oDocumento._Lineas[_oGridArt._Grid.CurrentRow.Index];
274 if (_GridArt != null && _GridArt._Grid.CurrentRow != null)
276 if (_GridArt._Grid.CurrentRow.Index >= 0 && _GridArt._Grid.CurrentRow.Index < _GridArt._Grid.Rows.Count)
278 if (_Documento._Lineas[_GridArt._Grid.CurrentRow.Index]._Unidades == 0)
280 _Documento._MessageBox(
"No se puede anular una línea en la que no se ha indicado las unidades.", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, DialogResult.OK);
283 _Documento._Lineas[_GridArt._Grid.CurrentRow.Index]._Actualizar_Entrega_Material();
298 if (_GridArt != null && _GridArt._Grid.CurrentRow != null)
300 if (_GridArt._Grid.CurrentRow.Index >= 0 && _GridArt._Grid.CurrentRow.Index < _GridArt._Grid.Rows.Count)
302 if (_Documento._Lineas[_GridArt._Grid.CurrentRow.Index]._Entregado)
304 this.Text = this._TextoLineaPositivo;
308 this.Text = this._TextoLineaNegativo;
void _Refresh()
Reasigna propiedades a las columnas (máscaras precios e importes)
Interfaz utilizada en los controles que se añaden en los perfiles
Clase del botón entregas línea
void btEntrega_Click(object sender, EventArgs e)
btAnularLinea_Click