コード例 #1
0
 private void UiVistaInventario_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e)
 {
     if (e.ControllerRow >= 0)
     {
         var registro = (Inventario)UiVistaInventario.GetRow(e.ControllerRow);
         registro.IS_SELECTD = (e.Action == CollectionChangeAction.Add);
     }
     else
     {
         if (!UsuarioSeleccionoListaInventarioCompleta)
         {
             return;
         }
         for (var i = 0; i < UiVistaInventario.RowCount; i++)
         {
             var registro = (Inventario)UiVistaInventario.GetRow(i);
             if (registro == null)
             {
                 continue;
             }
             registro.IS_SELECTD = (UiVistaInventario.SelectedRowsCount != 0);
         }
         UsuarioSeleccionoListaInventarioCompleta = false;
     }
 }
コード例 #2
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (UiVistaInventario.DataSource == null)
            {
                InteraccionConUsuarioServicio.Mensaje(
                    "No se encontraron datos para generar el reporte, por favor, verifique y vuelva a intentar.");
            }
            else
            {
                var listaDeInventario = new List <MasterPackMaestroDetalle>();
                for (var i = 0; i < UiVistaInventario.RowCount; i++)
                {
                    listaDeInventario.Add((MasterPackMaestroDetalle)UiVistaInventario.GetRow(i));
                }
                var reporte = new Reportes.MasterPackInventario
                {
                    DataSource        = ListToDataTableClass.ListToDataTable(listaDeInventario),
                    DataMember        = "AcuerdoComercial",
                    RequestParameters = false
                };
                reporte.Parameters["ImagenLogo"].Value = InteraccionConUsuarioServicio.ObtenerLogo();
                reporte.FillDataSource();

                using (var printTool = new ReportPrintTool(reporte))
                {
                    printTool.ShowRibbonPreviewDialog();
                }
            }
        }
コード例 #3
0
 private void MarcarInventarioSeleccionado()
 {
     try
     {
         for (var i = 0; i < UiVistaInventario.RowCount; i++)
         {
             var registro = (Inventario)UiVistaInventario.GetRow(i);
             if (registro.IS_SELECTD)
             {
                 UiVistaInventario.SelectRow(i);
             }
             else
             {
                 UiVistaInventario.UnselectRow(i);
             }
         }
     }
     catch (Exception ex)
     {
         InteraccionConUsuarioServicio.Alerta(ex.Message);
     }
 }
コード例 #4
0
        private void ExportalAExcel()
        {
            if (UiVistaBloqueoDeInventario.DataSource == null)
            {
                return;
            }
            if (UiVistaInventario.RowCount <= 0)
            {
                return;
            }

            var dialog = new SaveFileDialog
            {
                DefaultExt = "xlsx",
                Filter     = @"Archivos de excel (*.xlsx)|*.xlsx"
            };

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            UiVistaInventario.ExportToXlsx(dialog.FileName);
        }
コード例 #5
0
 private void UiBotonContraer_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     UiVistaInventario.CollapseAllGroups();
 }
コード例 #6
0
 private void UiBotonExpandir_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     UiVistaInventario.ExpandAllGroups();
 }