/// <summary> /// Cargar la ayuda de liquidaciones /// </summary> /// <param name="LIQU_Codigo"></param> /// <param name="x_IncluirPendientes"></param> public void AyudaLiquidacion(String LIQU_Codigo, Boolean x_IncluirPendientes) { try { System.Data.DataTable dtAyuda = new System.Data.DataTable(); ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>(); _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL() { FilterName = "@psinEMPR_Codigo", FilterValue = Controls.Entorno.ItemEmpresa.EMPR_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2 }); _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL() { FilterName = "@pvchLIQU_Codigo", FilterValue = LIQU_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20 }); dtAyuda = Client.GetDTLiquidacion("CAJ_LIQUSS_TodosAyuda", _listFilters); if (dtAyuda.Rows.Count == 0) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No se encontraron coincidencias."); } else if (dtAyuda.Rows.Count == 1) { LIQU_Codigo = dtAyuda.Rows[0]["LIQU_Codigo"].ToString(); Item = Client.GetOneLiquidacion(Controls.Entorno.ItemEmpresa.EMPR_Codigo, LIQU_Codigo); LView.SetItem(CAJ006LiquidacionAgentesPresenter.TBusqueda.Apertura); } else { int i = 0; List <Infrastructure.WinForms.Controls.ColumnaAyuda> _columnas = new List <Infrastructure.WinForms.Controls.ColumnaAyuda>(); _columnas.Add(new Infrastructure.WinForms.Controls.ColumnaAyuda() { Index = i++, ColumnName = "LIQU_Codigo", ColumnCaption = "Código", Alineacion = DataGridViewContentAlignment.MiddleCenter, Width = 80, DataType = typeof(System.String), Format = null }); _columnas.Add(new Infrastructure.WinForms.Controls.ColumnaAyuda() { Index = i++, ColumnName = "LIQU_Fecha", ColumnCaption = "Fecha", Alineacion = DataGridViewContentAlignment.MiddleRight, Width = 80, DataType = typeof(System.String), Format = "dd/MM/yyyy" }); _columnas.Add(new Infrastructure.WinForms.Controls.ColumnaAyuda() { Index = i++, ColumnName = "ENTC_DocIden", ColumnCaption = "R.U.C.", Alineacion = DataGridViewContentAlignment.MiddleLeft, Width = 80, DataType = typeof(System.String), Format = null }); _columnas.Add(new Infrastructure.WinForms.Controls.ColumnaAyuda() { Index = i++, ColumnName = "ENTC_RazonSocial", ColumnCaption = "Razon Social", Alineacion = DataGridViewContentAlignment.MiddleLeft, Width = 200, DataType = typeof(System.String), Format = null }); _columnas.Add(new Infrastructure.WinForms.Controls.ColumnaAyuda() { Index = i++, ColumnName = "LIQU_Estado_Text", ColumnCaption = "Estado", Alineacion = DataGridViewContentAlignment.MiddleLeft, Width = 100, DataType = typeof(System.String), Format = null }); Infrastructure.WinForms.Controls.Ayuda x_Ayuda = new Infrastructure.WinForms.Controls.Ayuda("Ayuda - Liquidaciones ", dtAyuda, false, _columnas); x_Ayuda.Width = x_Ayuda.Width + 150; if (x_Ayuda.ShowDialog() == System.Windows.Forms.DialogResult.OK) { LIQU_Codigo = x_Ayuda.Respuesta.Rows[0]["LIQU_Codigo"].ToString(); Item = Client.GetOneLiquidacion(Controls.Entorno.ItemEmpresa.EMPR_Codigo, LIQU_Codigo); LView.SetItem(CAJ006LiquidacionAgentesPresenter.TBusqueda.Apertura); } else { } } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, "Ha ocurrido un error al utilizar la ayuda de Liquidaciones.", ex); } }