| | |
| | | this.DialogResult = DialogResult.OK; |
| | | this.Close(); |
| | | } |
| | | |
| | | private void btnExcelFilePath_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | if (e.Button.Tag.ToString() == "Import") |
| | | { |
| | | var dlg = new System.Windows.Forms.OpenFileDialog(); |
| | | dlg.Filter = "EXCEL 文件(*.xls)|*.xls"; |
| | | dlg.CheckFileExists = true; |
| | | if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) |
| | | return; |
| | | this.btnExcelFilePath.Text = dlg.FileName; |
| | | this.pumpChartExcelImportCtrl1.SetBindingData(btnExcelFilePath.Text); |
| | | } |
| | | else if (e.Button.Tag.ToString() == "Download") |
| | | { |
| | | var dlg = new SaveFileDialog(); |
| | | dlg.Title = "模板导出路径"; |
| | | dlg.Filter = "Excel文件|*.xls"; |
| | | if (dlg.ShowDialog() == DialogResult.OK) |
| | | { |
| | | var fileName = dlg.FileName; |
| | | Yw.WinFrmUI.PhartExcelHelper.ExportPumpTemplate(fileName); |
| | | TipFormHelper.ShowSucceed("导出成功!"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |