Ejemplo n.º 1
0
        public ScadenzeDetails(ScadenzeInfo info)
        {
            info_ = info;
            InitializeComponent();
            dbcon_ = DependencyService.Get <ISQLiteDb>().GetConnection();
            Title  = info.CliDesc;

            GridTableSummaryRow summaryRow1 = new GridTableSummaryRow();

            summaryRow1.Title            = "Totale {Totale} - Num. : {ScaCount}";
            summaryRow1.ShowSummaryInRow = true;
            summaryRow1.Position         = Position.Bottom;
            summaryRow1.SummaryColumns.Add(new GridSummaryColumn()
            {
                Name        = "Totale",
                MappingName = "sca_importo",
                Format      = "{Sum:c}",
                SummaryType = SummaryType.DoubleAggregate
            });
            summaryRow1.SummaryColumns.Add(new GridSummaryColumn()
            {
                Name        = "ScaCount",
                MappingName = "sca_num",
                Format      = "{Count:#,#}",
                SummaryType = SummaryType.CountAggregate
            });
            dataGrid.TableSummaryRows.Add(summaryRow1);
        }
        public ScadenzeElenco()
        {
            InitializeComponent();
            swipeIndex_               = 0;
            swipeData_                = null;
            leftImage                 = null;
            first                     = true;
            dbcon_                    = DependencyService.Get <ISQLiteDb>().GetConnection();
            dataGrid.ColumnSizer      = Syncfusion.SfDataGrid.XForms.ColumnSizer.LastColumnFill;
            dataGrid.GridLongPressed += DataGrid_GridLongPressed;

            GridTableSummaryRow summaryRow1 = new GridTableSummaryRow();

            summaryRow1.Title            = "Totale {Totale} - Numero Cli. : {CliCount}";
            summaryRow1.ShowSummaryInRow = true;
            summaryRow1.Position         = Position.Bottom;
            summaryRow1.SummaryColumns.Add(new GridSummaryColumn()
            {
                Name        = "Totale",
                MappingName = "CliTotale",
                Format      = "{Sum:c}",
                SummaryType = SummaryType.DoubleAggregate
            });
            summaryRow1.SummaryColumns.Add(new GridSummaryColumn()
            {
                Name        = "CliCount",
                MappingName = "CliDesc",
                Format      = "{Count:#,#}",
                SummaryType = SummaryType.CountAggregate
            });
            dataGrid.TableSummaryRows.Add(summaryRow1);

            if (Device.Idiom == TargetIdiom.Phone && Device.RuntimePlatform == Device.Android)
            {
                searchBar.HeightRequest = 40;
            }
        }
 void OnSwipeStarted(object sender, Syncfusion.SfDataGrid.XForms.SwipeStartedEventArgs e)
 {
     swipeIndex_ = e.RowIndex;
     swipeData_  = (ScadenzeInfo)e.RowData;
 }