protected override void OnPreRender(EventArgs e) { ////////////////////////////////////// // Init OlapConnectionString string errReturn = OLAPConnector.TryConnect(this.pivotGrid, OLAPConnector.OLAPConnectionString, "ARCube2"); if (!string.IsNullOrEmpty(errReturn)) { Control errorPanel = OLAPConnector.CreateErrorPanel(errReturn); ErrorMsgPlaceHolder.Controls.Add(errorPanel); } base.OnPreRender(e); }
protected void Page_Load(object sender, EventArgs e) { this.Page.Title = Resources.BI.Analysis_ACPageTitle; // Được thực thi khi lần đầu tiên được load hoặc khi Page ReInit if (!Page.IsPostBack) { //this.fieldDebitAmount.Caption = string.Format("{0}{1}", this.fieldDebitAmount.Caption, Resources.BI.Milion_CurrencySymbol); //this.fieldCreditAmount.Caption = string.Format("{0}{1}", this.fieldCreditAmount.Caption, Resources.BI.Milion_CurrencySymbol); //this.fieldBalanceAmount.Caption = string.Format("{0}{1}", this.fieldBalanceAmount.Caption, Resources.BI.Milion_CurrencySymbol); ////////////////////////////////////// // Init OlapConnectionString string errReturn = OLAPConnector.TryConnect(this.pivotGrid, OLAPConnector.OLAPConnectionString, "AccCube"); if (!string.IsNullOrEmpty(errReturn)) { Control errorPanel = OLAPConnector.CreateErrorPanel(errReturn); ErrorMsgPlaceHolder.Controls.AddAt(0, errorPanel); } ////////////////////////////////////// // Init cbbChartType Helpers.InitChartTypeComboBox(cbbChartType, ViewType.Bar); // Init cbbChartType Helpers.InitAppearanceComboBox(this.cbbAppearance, Helpers.AppearanceNameDefault); // Init cbbChartType Helpers.InitPaletteComboBox(this.cbbPalette, Helpers.PaletteNameDefault); // Set Default ChartType Helpers.SetChartType(WebChart, cbbChartType.SelectedItem.Text); // Set Default AppearanceName this.WebChart.AppearanceName = this.cbbAppearance.SelectedItem.Text; // Set Default AppearanceName this.WebChart.PaletteName = this.cbbPalette.SelectedItem.Text; ////////////////////////////////////// // Format for PivotGrid Helpers.FormatCommon_PivotGrid(this.pivotGrid, 0); ////////////////////////////////////// // Format for WebChart Series template Helpers.FormatCommon_ChartControl(this.WebChart, 0); //var diagram = (XYDiagram)this.WebChart.Diagram; //diagram.AxisY.Label.EndText = string.Format(" {0}", Resources.BI.Milion_CurrencySymbol); ////////////////////////////////////// // Format for GridView PopupDrillDown Helpers.InitFormat_GridView(this.gvDrillDown, 1, Lib.IfNOE(Helpers.GetAppSetting(Helpers.PopupGridPageSize), 10)); this.pivotGrid.ClientSideEvents.CellDblClick = Helpers.GetJSCellClickHandler(this.ColumnIndex, this.RowIndex, this.gvDrillDown.ClientInstanceName, null); ////////////////////////////////////// } }