Esempio n. 1
0
 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));
             }
         }
     }
 }
Esempio n. 2
0
 protected void cmdSave_ServerClick(object sender, EventArgs e)
 {
     if (viewFacade == null)
     {
         viewFacade = new ReportViewConfigFacade(this.DataProvider);
     }
     viewFacade.UpdateReportCenterViewList(this.GetUserCode(), this.txtSelected.Value);
     this.Page.RegisterStartupScript("close_window", "<script>window.returnValue='OK';window.close();</script>");
 }