Beispiel #1
0
        public void ExportMatchTb()
        {
            if (this.mDataGridMatchTb.CurrentRow == null)
            {
                return;
            }
            List <GaoShan.Sales.Model.Info_matchTb> ltMatchTb = mDataGridMatchTb.GetDataSource <GaoShan.Sales.Model.Info_matchTb>();
            FolderBrowserDialog dialog = new FolderBrowserDialog();

            dialog.Description = "请选择配套表保存路径";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                string path = dialog.SelectedPath;

                foreach (GaoShan.Sales.Model.Info_matchTb info in ltMatchTb)
                {
                    Sales.UI.Report.FmMatchTbManagerReport report = new Sales.UI.Report.FmMatchTbManagerReport();

                    report.Show(info, this.reoGridMatchTb);
                    string fileName = System.IO.Path.Combine(path, info.MatchTb_Name + ".xlsx");
                    this.reoGridMatchTb.Save(fileName);
                }
                MessageBox.Show("导出完成");
            }
        }
Beispiel #2
0
        private void MDataGridMatchTb_CurrentRowChanged(object sender, EventArgs e)
        {
            if (mDataGridMatchTb.CurrentRow == null)
            {
                return;
            }
            GaoShan.Sales.Model.Info_matchTb info = mDataGridMatchTb.GetCurrentEntity() as GaoShan.Sales.Model.Info_matchTb;

            Sales.UI.Report.FmMatchTbManagerReport report = new Sales.UI.Report.FmMatchTbManagerReport();
            //report.GridControl = this.reoGridMatchTb;
            report.Show(info, this.reoGridMatchTb);
        }