Пример #1
0
        private void btnPreview_Click(object sender, EventArgs e)
        {
            bool fgCheck = false;
            if (selection1.SelectedCount == 0)
            {

                fgCheck = false;
                MessageBox.Show("请先选择需要预览的采购结算单");
            }
            else if (selection1.SelectedCount != 1)
            {
                fgCheck = false;
                MessageBox.Show("每次只能预览一张采购结算单");
            }
            else
            {
                fgCheck = true;

            }
            if (fgCheck == true)
            {
                int RowIndex = selection1.GetSelectedRowIndex(0);
                int RowHandle = gridView1.GetRowHandle(RowIndex);
                string strCGJSDID = gridView1.GetRowCellValue(RowHandle, colCGJSDID).ToString();
                MakeStrArry(strCGJSDID);
                XtraReportCGJSD report = new XtraReportCGJSD(GetTempDataSet(strCGJSDID), StrArrySetRepotr);
                report.ShowPreviewDialog();

            }
        }