private void xfViewSalesOrder_Load(object sender, EventArgs e)
        {
            try
            {
                var oBr = new BRSales();

                oBe.NUM_ACCI = 12;

                var oList = oBr.SVPR_REPO_LIST(oBe);

                gdcResults.DataSource = oList;
                gdvResults.BestFitColumns();
                for (int i = 0; i < gdvResults.Columns.Count; i++)
                {
                    gdvResults.Columns[i].OptionsColumn.AllowEdit = false;
                    gdvResults.Columns[i].OptionsColumn.AllowFocus = false;
                    gdvResults.Columns[i].OptionsColumn.ReadOnly = true;

                    var Type = gdvResults.Columns[i].ColumnType;

                    if (Type.Name.ToUpper().Equals("DECIMAL"))
                    {
                        gdvResults.Columns[i].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                        gdvResults.Columns[i].DisplayFormat.FormatString = "n2";
                        gdvResults.Columns[i].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                        gdvResults.Columns[i].SummaryItem.DisplayFormat = "{0:#,##0.00}";
                        gdvResults.Columns[i].Width = gdvResults.Columns[i].Width + 20;
                    }
                }
                oBe.NUM_ACCI = 13;

                var oList02 = oBr.SVPR_REPO_LIST(oBe);

                gdcResults01.DataSource = oList02;
                gdvResults01.BestFitColumns();
                for (int i = 0; i < gdvResults01.Columns.Count; i++)
                {
                    gdvResults01.Columns[i].OptionsColumn.AllowEdit = false;
                    gdvResults01.Columns[i].OptionsColumn.AllowFocus = false;
                    gdvResults01.Columns[i].OptionsColumn.ReadOnly = true;

                    var Type = gdvResults01.Columns[i].ColumnType;

                    if (Type.Name.ToUpper().Equals("DECIMAL"))
                    {
                        gdvResults01.Columns[i].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                        gdvResults01.Columns[i].DisplayFormat.FormatString = "n2";
                        gdvResults01.Columns[i].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                        gdvResults01.Columns[i].SummaryItem.DisplayFormat = "{0:#,##0.00}";
                        gdvResults01.Columns[i].Width = gdvResults01.Columns[i].Width + 20;
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void sbSearch_Click(object sender, EventArgs e)
        {
            try
            {
                var oBe = new BEReport();
                var oBr = new BRSales();

                oBe.COD_COMP = SESSION_COMP;
                oBe.FEC_DESD = deFEC_DESD.DateTime;
                oBe.FEC_HAST = deFEC_HAST.DateTime;
                oBe.NUM_ACCI = 5;

                var oList = oBr.SVPR_REPO_LIST(oBe);

                gdcResults.DataSource = oList;
                gdvResults.BestFitColumns();
                for (int i = 0; i < gdvResults.Columns.Count; i++)
                {
                    gdvResults.Columns[i].OptionsColumn.AllowEdit = false;
                    gdvResults.Columns[i].OptionsColumn.AllowFocus = false;
                    gdvResults.Columns[i].OptionsColumn.ReadOnly = true;

                    var Type = gdvResults.Columns[i].ColumnType;

                    if (Type.Name.ToUpper().Equals("DECIMAL"))
                    {
                        gdvResults.Columns[i].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                        gdvResults.Columns[i].DisplayFormat.FormatString = "n2";
                        gdvResults.Columns[i].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                        gdvResults.Columns[i].SummaryItem.DisplayFormat = "{0:#,##0.00}";
                        gdvResults.Columns[i].Width = gdvResults.Columns[i].Width + 20;
                    }
                }
                //gdvResults.OptionsView.ColumnAutoWidth=true;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void xfCommittedArticles_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            deFEC_DESD.DateTime = DateTime.Today;
            deFEC_HAST.DateTime = DateTime.Today;

            var oBe = new BEReport();
            var oBr = new BRSales();

            oBe.COD_COMP = SESSION_COMP;
            oBe.FEC_DESD = deFEC_DESD.DateTime;
            oBe.FEC_HAST = deFEC_HAST.DateTime;
            oBe.NUM_ACCI = 10;

            var oList = oBr.SVPR_REPO_LIST(oBe);

            gdcResults.DataSource = oList;
            gdvResults.BestFitColumns();
            for (int i = 0; i < gdvResults.Columns.Count; i++)
            {
                gdvResults.Columns[i].OptionsColumn.AllowEdit = false;
                gdvResults.Columns[i].OptionsColumn.AllowFocus = false;
                gdvResults.Columns[i].OptionsColumn.ReadOnly = true;

                var Type = gdvResults.Columns[i].ColumnType;

                if (Type.Name.ToUpper().Equals("DECIMAL"))
                {
                    gdvResults.Columns[i].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                    gdvResults.Columns[i].DisplayFormat.FormatString = "n2";
                    gdvResults.Columns[i].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                    gdvResults.Columns[i].SummaryItem.DisplayFormat = "{0:#,##0.00}";
                    gdvResults.Columns[i].Width = gdvResults.Columns[i].Width + 20;
                }
                else if (Type.Name.ToUpper().Equals("INT32"))
                {
                    gdvResults.Columns[i].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                    gdvResults.Columns[i].SummaryItem.DisplayFormat = "{0:#,##0.00}";
                    gdvResults.Columns[i].Width = gdvResults.Columns[i].Width + 20;
                }
            }
        }