示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string seluser = "";

            if (!IsPostBack)
            {
                DataTable dt = new DataTable();
                dt = VSWebBL.ReportsBL.ReportsBL.Ins.GetUserNameList();
                if (dt.Rows.Count > 0)
                {
                    //11/4/2015 NS modified for VSPLUS-2023
                    UserListComboBox.DataSource = dt;
                    UserListComboBox.ValueField = "FullName";
                    UserListComboBox.TextField  = "FullName";
                    UserListComboBox.DataBind();
                    seluser = Session["UserFullName"].ToString();
                    UserListComboBox.Items.FindByText(seluser).Selected = true;
                }
            }
            if (UserListComboBox.SelectedIndex != -1)
            {
                seluser = UserListComboBox.Items[UserListComboBox.SelectedIndex].Text;
            }
            ConfiguratorReports.ConfigUserListXtraRpt report = new ConfiguratorReports.ConfigUserListXtraRpt();
            report.Parameters["UserName"].Value = seluser;
            report.CreateDocument();
            ASPxDocumentViewer1.Report = report;
            ASPxDocumentViewer1.DataBind();
        }
示例#2
0
        protected void UserListComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string seluser = "";

            if (UserListComboBox.SelectedIndex != -1)
            {
                seluser = UserListComboBox.Items[UserListComboBox.SelectedIndex].Text;
            }
            ConfiguratorReports.ConfigUserListXtraRpt report = new ConfiguratorReports.ConfigUserListXtraRpt();
            report.Parameters["UserName"].Value = seluser;
            report.CreateDocument();
            ASPxDocumentViewer1.Report = report;
            ASPxDocumentViewer1.DataBind();
        }