private void InitList() { if (viewFacade == null) { viewFacade = new ReportViewConfigFacade(this.DataProvider); } this.txtSelected.Value = ";"; this.lstSelected.Items.Clear(); object[] objs = viewFacade.GetReportCenterViewByUser(this.GetUserCode()); if (objs != null) { for (int i = 0; i < objs.Length; i++) { ReportCenterView viewField = (ReportCenterView)objs[i]; string strText = languageComponent1.GetString(viewField.ReportCode); lstSelected.Items.Add(new ListItem(strText, viewField.ReportCode)); txtSelected.Value += viewField.ReportCode + ";"; } } objs = viewFacade.GetReportCenterViewDefault(); lstUnSelected.Items.Clear(); if (objs != null) { for (int i = 0; i < objs.Length; i++) { ReportCenterView viewField = (ReportCenterView)objs[i]; if (this.txtSelected.Value.IndexOf(";" + viewField.ReportCode + ";") < 0) { string strText = languageComponent1.GetString(viewField.ReportCode); lstUnSelected.Items.Add(new ListItem(strText, viewField.ReportCode)); } } } }
private void InitUIFromViewConfig() { BenQGuru.eMES.WebQuery.ReportViewConfigFacade rptFacade = new ReportViewConfigFacade(this.DataProvider); object[] objs = rptFacade.GetReportCenterViewByUser(this.GetUserCode()); if (objs != null) { this.trQuantityTitle.Visible = false; this.trquantityData.Visible = false; this.trYieldTitle.Visible = false; this.trYieldData.Visible = false; this.trOQCTitle.Visible = false; this.trOQCData.Visible = false; this.tblMain.Rows.Remove(this.trQuantityTitle); this.tblMain.Rows.Remove(this.trquantityData); this.tblMain.Rows.Remove(this.trYieldTitle); this.tblMain.Rows.Remove(this.trYieldData); this.tblMain.Rows.Remove(this.trOQCTitle); this.tblMain.Rows.Remove(this.trOQCData); this.tblMain.Rows.Remove(this.trBottom); this.tblMain.Rows.Clear(); for (int i = 0; i < objs.Length; i++) { ReportCenterView view = (ReportCenterView)objs[i]; if (view.ReportCode == ReportCenterViewCode.Quantity) { this.trQuantityTitle.Visible = true; this.trquantityData.Visible = true; this.tblMain.Rows.Add(this.trQuantityTitle); this.tblMain.Rows.Add(this.trquantityData); if (view.Height > 0) { this.trquantityData.Height = Convert.ToInt32(view.Height).ToString(); } } if (view.ReportCode == ReportCenterViewCode.YieldPercent) { this.trYieldTitle.Visible = true; this.trYieldData.Visible = true; this.tblMain.Rows.Add(this.trYieldTitle); this.tblMain.Rows.Add(this.trYieldData); if (view.Height > 0) { this.trYieldData.Height = Convert.ToInt32(view.Height).ToString(); } } if (view.ReportCode == ReportCenterViewCode.OQC) { this.trOQCTitle.Visible = true; this.trOQCData.Visible = true; this.tblMain.Rows.Add(this.trOQCTitle); this.tblMain.Rows.Add(this.trOQCData); if (view.Height > 0) { this.trOQCData.Height = Convert.ToInt32(view.Height).ToString(); } } if (view.ReportCode == ReportCenterViewCode.TSInfo) { this.trTSInfoChartTitle.Visible = true; this.trTSInfoChartData.Visible = true; this.tblMain.Rows.Add(this.trTSInfoChartTitle); this.tblMain.Rows.Add(this.trTSInfoChartData); this.OWCChartSpaceTSInfo.Height = Unit.Pixel(Convert.ToInt32(view.Height)); this.OWCChartSpaceTSInfo.Width = Unit.Pixel(Convert.ToInt32(view.Width)); this.trTSInfoChartData.Height = Convert.ToInt32(view.Height).ToString(); this.OWCChartSpaceTSInfo.Style.Add("visibility", "hidden"); this.OWCChartSpaceTSInfo.Style.Add("display", "none"); } } this.tblMain.Rows.Add(this.trBottom); } }