Esempio n. 1
0
        private void btnExportItem_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (Request["RadioGroup"] == null || Request["RadioGroup"].Length < 0)
                {
                    this.ShowMsg("请选择要导出数据", false);
                    return;
                }

                DataSet ds = PurchaseOrderHelper.GetPurchaseOrderExportItem(int.Parse(Request["RadioGroup"].ToString()));
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    GetExcelReportItem(ds.Tables[0], "POImportAndExport");
                }
                else
                {
                    this.ShowMsg("未查询到数据", false);
                }
            }
            catch (Exception ex)
            {
                this.ShowMsg("导出失败" + ex.Message, false);
            }
        }