2 using System.Collections.Generic;
12 namespace sage.ew.botones
19 #region PROPIEDADES PRIVADAS 21 private string _cAnyActual = Convert.ToString(EW_GLOBAL._GetVariable(
"wc_any"));
31 protected string _cClave =
"";
36 protected string _cMante =
"";
50 #region PROPIEDADES PUBLICAS 57 get {
return _oGrid; }
58 set { _oGrid = value; }
66 get {
return _cClave; }
67 set { _cClave = value; }
75 get {
return _oListado; }
76 set { _oListado = value; }
92 this._oListado = toListado;
93 this._oGrid = toGridViewList;
94 this._cMante = tcMante;
95 this._cClave = tcClave;
97 this.Click +=
new EventHandler(btNavigate_Click);
109 #region METODOS PRIVADAS 111 private void btNavigate_Click(
object sender, EventArgs e)
113 DataRow loRowOriSel = null;
116 int lnIndex = oBtNvg.
_oGrid.CurrentCellAddress.Y;
118 if (oBtNvg.
_oListado != null && oBtNvg.
_oGrid != null && !
string.IsNullOrWhiteSpace(oBtNvg.
_cClave) && !String.IsNullOrWhiteSpace(oBtNvg.
_cMante) && lnIndex > -1)
121 DataRow loRowSel = ((DataRowView)oBtNvg.
_oGrid.Rows[lnIndex].DataBoundItem).Row;
122 int lnId = ((loRowSel != null) ? Convert.ToInt32(loRowSel[
"_ids50"]) : -1);
125 DataRow[] loRows =
new DataRow[0];
130 loRows = ldtOri.Select(String.Format(
"_ids50 = {0}", lnId));
135 if (loRowOriSel.Table.Columns.Contains(oBtNvg.
_Clave) && loRowOriSel != null)
137 String lcCodigo = Convert.ToString(loRowOriSel[oBtNvg.
_Clave]);
139 if (!String.IsNullOrEmpty(lcCodigo.Trim()))
142 if (loRowOriSel.Table.Columns.Contains(
"ejercicio"))
144 if (!
string.IsNullOrWhiteSpace(Convert.ToString(loRowOriSel[
"ejercicio"])) && _cAnyActual != Convert.ToString(loRowOriSel[
"ejercicio"]))
146 FUNCTIONS._MessageBox(
"No se permite la navegación a mantenimientos/documentos de otro ejercicio diferente al ejercicio activo (" + _cAnyActual +
").", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, DialogResult.OK);
164 private string NombreMante(btNavigateMante toButtonNavigateMante,
string tcCodigoMante)
166 string lcMante = toButtonNavigateMante._cMante.ToUpper();
168 if (lcMante ==
"CLIENTES" && functions.FUNCTIONS.Es_ClientePotencial(tcCodigoMante))
DataTable _ResultadoOriginalCombinado
Resultado despues de añadir las columnas perssonalizadas
string _Clave
Clave interna que servirá para navegar a la pantalla que corresponda ...
btNavigateMante()
Constructor
Interficie de listados que todo listado de Eurowin TPV deberá cumplir para toda clase que se defina c...
gridViewList _oGrid
Referencia a la grid del listado ...
List< String > _oClaves
Lista de Claves
void _NavigateMante(string tcKeyNavigate, DataRow trRowList, String tcNombreMante, String tcCodigo)
Método que permite capturar cuando el usuario pulsa sobre un botón añadido a traves de las columnas d...
btNavigateMante(IListados toListado, gridViewList toGridViewList, String tcMante, String tcClave)
Constructor
Clase de grid de listados, esta es la grid que se mostrará en el formulario de resultados de un lista...
string _cClave
Clave interna que servirá para navegar a la pantalla que corresponda ...
string _cMante
Clave interna que servirá para navegar a la pantalla que corresponda ...
IListados _oListado
Referencia interna al objeto Listados ...
Botón para navegación a documentos desde pantalla que muestra el resultado de un listado.